raygeo.sketch.document
DocumentMeta
Locating metadata of a sketch document.
format_version
format_version: int
Sketch file format version.
hidden
hidden: bool
Whether the sketch is hidden.
name
name: str
Display name.
origin_id
origin_id: types.EntityID
Id of the fixed origin point.
uid
uid: str
Asset uid.
copy()
copy() -> DocumentMeta
Creates a copy of the metadata.
| Parameter | Type | Description |
|---|---|---|
| Returns | DocumentMeta |
from_dict()
from_dict(dict: dict) -> DocumentMeta
Deserializes metadata from a sketch dictionary.
| Parameter | Type | Description |
|---|---|---|
dict | dict | |
| Returns | DocumentMeta |
to_dict()
to_dict() -> dict
Serializes the metadata to dictionary fields.
| Parameter | Type | Description |
|---|---|---|
| Returns | dict |
Fill
A filled area bounded by sketch entities.
boundary
boundary: list[tuple[types.EntityID, bool]]
Loop boundary as (entity_id, forward) pairs.
color
color: tuple[float, float, float, float]
Fill RGBA color.
gradient_angle
gradient_angle: float
Gradient angle in radians.
gradient_stops
gradient_stops: list[tuple[float, tuple[float, float, float, float]]]
Gradient stops as (position, rgba) pairs.
style
style: FillStyle
Fill rendering style.
uid
uid: str
Unique fill id.
from_dict()
from_dict(dict: dict) -> Fill
Deserializes a fill from the reference dictionary shape.
| Parameter | Type | Description |
|---|---|---|
dict | dict | |
| Returns | Fill |
to_dict()
to_dict() -> dict
Serializes the fill to the reference dictionary shape.
| Parameter | Type | Description |
|---|---|---|
| Returns | dict |
FillStyle
Fill rendering style.
Values:
LINEAR_GRADIENTRADIAL_GRADIENTSOLID