Type Method
layerData(fromDict:format:) layerDataFromDict:format:error: layerDataFromDict_format_error_
Encodes layer elements as Glyphs property-list data.
Declaration
class func layerData(fromDict dict: [String : Any], format: GSFormatVersion) throws -> DataDeclaration
+ (NSData *) layerDataFromDict:(NSDictionary<NSString *,id> *) dict format:(GSFormatVersion) format error:(NSError **) error;Declaration
layerDataFromDict_format_error_(dict: dict[str, object], format: GSFormatVersion) -> tuple[bytes, NSError]Parameters
dictA dictionary containing model objects grouped by layer element keys.
formatThe Glyphs file format version to use.
Parameters
dictA dictionary containing model objects grouped by layer element keys.
formatThe Glyphs file format version to use.
errorOn failure, information about the error.
Return Value
The encoded data, or nil when an element cannot be encoded.
See Also
Encoding
A property-list representation for the specified Glyphs file format version.
Writes the layer in the specified Glyphs file format.
An attribute representation for the specified Glyphs file format version.
Values deferred until the layer can complete format-dependent decoding.
Stores a value for format-dependent decoding after the layer hierarchy is available.
Completes format-dependent decoding after the layer has been attached to its object hierarchy.