GSElement Class Reference
Inherits from | NSObject |
Conforms to | NSCoding NSCopying |
Tasks
-
position
property -
positionPrecise
property -
– setPositionFast:
-
elementDict
property -
parent
property -
– initWithElementDict:
Properties
elementDict
Returns/sets the content of the element to store in pList.
@property (unsafe_unretained, nonatomic, nullable) NSDictionary *elementDict
positionPrecise
The unrounded position of the element.
@property (nonatomic, readonly) NSPoint positionPrecise
Discussion
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 *)ElementDict
Parameters
- ElementDict
A dictionary
setPositionFast:
Sets the position without notifying the path and no undo.
- (void)setPositionFast:(NSPoint)position
Parameters
- 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:]
.