GSElement Class Reference
| Inherits from | NSObject |
| Conforms to | NSCoding NSCopying |
Tasks
-
positionproperty -
positionPreciseproperty -
– setPositionFast: -
elementDictproperty -
parentproperty -
– initWithElementDict:
Properties
elementDict
Returns/sets the content of the element to store in pList.
@property (unsafe_unretained, nonatomic, nullable) NSDictionary *elementDictpositionPrecise
The unrounded position of the element.
@property (nonatomic, readonly) NSPoint positionPreciseDiscussion
This is used for consecutiv operations to avoid rounding errors
Instance Methods
initWithElementDict:
initialises a element with a dictionary loaded from a pList.
- (instancetype)initWithElementDict:(NSDictionary *)ElementDictParameters
- ElementDict
A dictionary
setPositionFast:
Sets the position without notifying the path and no undo.
- (void)setPositionFast:(NSPoint)positionParameters
- position
The new position
Discussion
This is mostly used to build a new element list that is later added to the layer. Otherwise you need to make sure to anounce the changes. e.g. by calling [GSLayer elementDidChange:].