Class
GSShape
An abstract base class for graphical elements stored in a glyph layer.
Declaration
class GSShapeDeclaration
@interface GSShape : GSBaseObjectDeclaration
class GSShape(GSBaseObject)Overview
Shapes are stacked to form the composition of a GSLayer.
When the parent (layer) of a shape is not set, many of it’s APIs cannot work to their full extend. This is because a shape frequently needs to reference layer metrics, glyph properties, for other font metadata.
Topics
Concrete Subclasses
A graphical path made of nodes.
A reference to another glyph placed as a shape in a glyph layer.
A shape group combines zero or more shapes into a single shape, forming a shape tree.
Creating a Shape
Creates a concrete shape from a Glyphs file dictionary representation.
Finishes loading after the shape has been attached to its layer.
Type and Comparison
The kind of content represented by a shape.
The kind of content represented by the concrete shape.
A structural description used to determine layer compatibility.
Whether another shape has the same concrete class.
Shape Hierarchy
The ID of the parent group.
The direct containing group in the layer’s shape hierarchy.
Invokes a block for each containing group, from the direct parent through the root group.
Naming
An optional label for identifying the shape in user interfaces.
Geometry
Applies an affine transformation to the complete shape.
Applies an affine transformation to selected elements of the shape.
Applies an affine transformation and aligns the resulting coordinates to a grid without registering undo or notifying the layer.
Translates the complete shape by an offset.
Copies corresponding positions and transformation values from another shape.
Drawing
Writes the shape to a pen.
Writes the shape to separate pens for closed paths, open paths, and auxiliary output.
Writes the basic shape representation to a pen without resolving path decorations.
Writes the basic shape representation to a pen, optionally omitting segment object information.
Fill Paint
The effective fill paint.
The solid color used for the fill.
The gradient used for the fill.
Stroke Style
The horizontal size expression used to expand the path into a stroke.
The vertical size expression used to expand the path into a stroke.
The stroke position from
-1on the left to1on the right of the path direction.The construction used at an open stroke endpoint.
The cap at the start of an open path.
The cap at the end of an open path.
The construction used to connect consecutive stroke segments.
The construction used to connect consecutive stroke segments.
Whether the path remains filled when it has a stroke.
Reads the shape’s stroke style into optional output parameters.
Stroke Paint
The effective stroke paint.
The solid color used for the stroke.
The gradient used for the stroke.
Compositing
Whether the shape is excluded from drawing and generated outlines.
The alpha applied to the complete rendered shape.
How the rendered shape is combined with the content behind it.
The shadow cast by the shape.
The shadow drawn inside the shape.
Masking
How a shape masks preceding shapes in the same composition unit.
How the shape masks the preceding shape or shapes in the same composition unit.
Attributes
Scales the stroke width and explicit stroke height by a factor.
Constants
Relationships
Inherits From
Inherited By
Conforms To
Foundation.NSCopying- GSSelectableElementProtocol
- GSUserDataProtocol
ObjectiveC.NSObjectProtocolSwift.CVarArgSwift.CustomDebugStringConvertibleSwift.CustomStringConvertibleSwift.EquatableSwift.Hashable
Relationships
Inherits From
Inherited By
See Also
Shapes
A graphical path made of nodes.
A reference to another glyph placed as a shape in a glyph layer.
A shape group combines zero or more shapes into a single shape, forming a shape tree.