GSComponent Class Reference
Inherits from | GSTransformableElement : GSElement : GSShape : NSObject |
Declared in | GSComponent.h |
Properties
anchor
If more than one anchor/_anchor pair would match, this property can be used to set the anchor to use for automatic alignment
@property (nonatomic, strong) NSString *anchor
Discussion
This can be set from the anchor button in the component info box in the UI
component
The base glyph
@property (unsafe_unretained, readonly) GSGlyph
*component
Discussion
This is readonly. To set the base glyph use componentName: newBaseGlyph.name.
See Also
componentName
components are referenced by the glyph name.
@property (strong, nonatomic, nullable) NSString
*componentName
Discussion
If you set the componentName the component value is set and this is used during runtime. So you can change the glyph name of the base glyph during runtime.
pieceSettings
The instance settings do Smart Components.
@property (strong, nonatomic, nullable) GSNotifyingDictionary
*pieceSettings
Discussion
It is a dictionary containing the parameter names as keys and the interpolation position as value.
{
Height = 70;
Width = 70;
}
See Also
-
GSGlyph.partsSettings
Instance Methods
bezierPath
The bezierPath of the component. It is already transformed.
- (NSBezierPath *_Nullable)bezierPath
componentLayer
The Layer that the component is linked to.
- (nullable GSLayer *)componentLayer
Return Value
the Layer that represents the component.
Discussion
The is usually just the layer from the components glyph but might be the computed result of a smart component.
decompose
Decomposes the component to the containing Layer
- (void)decompose
Discussion
It need to parent property set correctly. It calls
[_parent decomposeComponent:self]
.
intersects:
If the component overlaps with the OtherComponent
- (BOOL)intersects:(GSComponent
*)otherComponent
Parameters
- otherComponent
-
The OtherComponent to test overlap.
Return Value
Returns YES if both components do overlap, otherwise NO.
makeFirst
It makes the component the first in the containing Layer
- (void)makeFirst
Discussion
It need to parent property set correctly. It calls
[_parent makeFirstComponent:self]
.
openBezierPath
The bezierPath of open paths of the component. It is already transformed.
- (NSBezierPath *_Nullable)openBezierPath