Class
GSElement
The abstract base class for positioned elements.
Declaration
class GSElementDeclaration
@interface GSElement : GSBaseObjectDeclaration
class GSElement(GSBaseObject)Overview
GSElement provides common geometry and Glyphs source encoding behavior for concrete element types such as anchors, guides, hints, and annotations. Do not create instances of GSElement directly.
Most elements are contained directly by a layer. Some element types are owned by another object and resolve their layer through that owner, so do not assume that parent is a layer. An element can be detached, in which case its layer, glyph, font, and undo manager are unavailable.
The inherited position is expressed in layer coordinates unless the concrete type defines another coordinate system. Concrete subclasses define which geometry participates in bounds, hit testing, and transformations, as well as which additional values are encoded.
Topics
Creating an Element
Creates a concrete element from a Glyphs source representation.
Geometry
Applies an affine transform to the element geometry.
Whether the element can be selected at a point within a tolerance.
A handle rectangle centered on a point for an editor scale.
Encoding
Restores the common element values from a Glyphs source representation.
A property-list representation of the common element values, or
nilwhen all values have their defaults.Appends a Glyphs source representation to a data buffer.
Textual Representation
A concise textual representation of the element.
Relationships
Inherits From
Inherited By
Conforms To
Foundation.NSCopying- GSSelectableElementProtocol
- GSUserDataProtocol
ObjectiveC.NSObjectProtocolSwift.CVarArgSwift.CustomDebugStringConvertibleSwift.CustomStringConvertibleSwift.EquatableSwift.Hashable