Skip to main content

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.

ParameterTypeDescription
ReturnsDocumentMeta

from_dict()​

from_dict(dict: dict) -> DocumentMeta

Deserializes metadata from a sketch dictionary.

ParameterTypeDescription
dictdict
ReturnsDocumentMeta

to_dict()​

to_dict() -> dict

Serializes the metadata to dictionary fields.

ParameterTypeDescription
Returnsdict

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.

ParameterTypeDescription
dictdict
ReturnsFill

to_dict()​

to_dict() -> dict

Serializes the fill to the reference dictionary shape.

ParameterTypeDescription
Returnsdict

FillStyle​

Fill rendering style.

Values:

  • LINEAR_GRADIENT
  • RADIAL_GRADIENT
  • SOLID