pub struct Chunk {
pub transform: Id,
pub space: Space,
pub origin: Vec2,
pub commands: Vec<Command>,
pub cut: Option<Rect>,
pub covers: Vec<Rect>,
pub bounds: Option<Rect>,
pub action: Option<(String, Rect)>,
pub made: Made,
/* private fields */
}Expand description
One scene node’s own commands, in its own coordinates, and their index.
Fields§
§transform: IdIts node’s transform node, which every clip and effect it opens is under.
space: SpaceThe space its coordinates are in: the design’s, or a run child’s.
origin: Vec2Where its coordinates’ origin is in its space’s.
commands: Vec<Command>Its node’s own commands, in paint order and in its own coordinates.
cut: Option<Rect>What cuts it in its space’s coordinates: its clipping frames’ boxes, those inside its space.
covers: Vec<Rect>What it covers for the drawing’s area, in its own coordinates, uncut: each shape, line and blur by itself.
bounds: Option<Rect>What its commands can touch in the design’s coordinates, cut —
None when that is nothing.
action: Option<(String, Rect)>Its node’s interaction, if it has one, in its own coordinates: the
box (0, 0, width, height).
made: MadeThe property-tree nodes its own layers made.
Implementations§
Source§impl Chunk
impl Chunk
Sourcepub fn new(
transform: Id,
space: Space,
origin: Vec2,
(commands, made): (Vec<Command>, Made),
covers: Vec<KRect>,
action: Option<(String, KRect)>,
cut: Option<KRect>,
) -> Chunk
pub fn new( transform: Id, space: Space, origin: Vec2, (commands, made): (Vec<Command>, Made), covers: Vec<KRect>, action: Option<(String, KRect)>, cut: Option<KRect>, ) -> Chunk
The chunk of commands, placed at origin in space and cut by
cut.