Class SketchReader
java.lang.Object
com.codename1.art.SketchReader
Reads Sketch files (Sketch 43 and later: a ZIP of JSON) into an ArtDocument.
Every page becomes a group under the root; the first page is visible and the document is sized to its content. Artboards become clipping frames, groups and shape groups keep their structure, symbol instances are expanded from their masters with text, image and nested symbol overrides applied, and fills, borders, shadows, inner shadows, the four blurs, blend modes, opacity, rotation, flips and clipping masks are read and rendered.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe most layers read.static final intHow deep groups may nest before a file is refused.static final intThe deepest symbol nesting expanded. -
Method Summary
-
Field Details
-
MAX_SYMBOL_DEPTH
public static final int MAX_SYMBOL_DEPTHThe deepest symbol nesting expanded.- See Also:
-
MAX_LAYERS
public static final int MAX_LAYERSThe most layers read.- See Also:
-
MAX_NESTING
public static final int MAX_NESTINGHow deep groups may nest before a file is refused.- See Also:
-
-
Method Details
-
read
Reads a Sketch file.
Parameters
in: the file; read to its end, not closed
- Throws:
IOException
-