pub struct ShapeRecorder { /* private fields */ }Expand description
The POD half of a recording as it is written: the shape records with
their brush and stop tables and coalesced segments, and the bounds
those records reach. Plain data throughout, so a scene carries one
across threads; CommandRecording wraps it with the other lane.
Implementations§
Source§impl ShapeRecorder
impl ShapeRecorder
Sourcepub fn tables(&self) -> &RecordTables
pub fn tables(&self) -> &RecordTables
The owned shape columns and their brush, stop and segment tables.
pub fn is_empty(&self) -> bool
Sourcepub fn all_segments(&self) -> Range<u32> ⓘ
pub fn all_segments(&self) -> Range<u32> ⓘ
Every segment, the range a run of the whole recording draws.
Sourcepub fn bounds(&self) -> Option<Rect>
pub fn bounds(&self) -> Option<Rect>
The rect every recorded shape’s pixels lie within; None when
nothing was recorded.
Sourcepub fn fingerprint(&self) -> u64
pub fn fingerprint(&self) -> u64
The tables’ fingerprint; see RecordTables::fingerprint.
Sourcepub fn push_primitive(&mut self, primitive: DrawPrimitive) -> Recorded
pub fn push_primitive(&mut self, primitive: DrawPrimitive) -> Recorded
Records a rect, rounded rect or arc, blended or not; hands any other primitive back untouched.
Sourcepub fn push_shape_primitive(
&mut self,
primitive: DrawPrimitive,
blend_mode: BlendMode,
) -> Recorded
pub fn push_shape_primitive( &mut self, primitive: DrawPrimitive, blend_mode: BlendMode, ) -> Recorded
Records a rect, rounded rect or arc with the supplied blend mode. Returns any other primitive untouched, including blend wrappers.
pub fn push_rect( &mut self, rect: Rect, brush: &Brush, stroke: Option<Stroke>, blend: BlendMode, ) -> Rect
pub fn push_round_rect( &mut self, rect: Rect, brush: &Brush, radii: CornerRadii, stroke: Option<Stroke>, blend: BlendMode, ) -> Rect
Sourcepub fn push_arc(&mut self, rect: Rect, args: &ArcRecordArgs<'_>) -> Rect
pub fn push_arc(&mut self, rect: Rect, args: &ArcRecordArgs<'_>) -> Rect
Records an arc band or annular sector with the rect the primitive carries.
Sourcepub fn push_scope_arc(
&mut self,
args: &ArcRecordArgs<'_>,
geometry: &ArcGeometry,
) -> Rect
pub fn push_scope_arc( &mut self, args: &ArcRecordArgs<'_>, geometry: &ArcGeometry, ) -> Rect
Records an arc the draw scope drew, whose band the scope already normalised: the record keeps the disc around the band as its rect and derives the primitive’s tight bounds only when asked.
Trait Implementations§
Source§impl Clone for ShapeRecorder
impl Clone for ShapeRecorder
Source§fn clone(&self) -> ShapeRecorder
fn clone(&self) -> ShapeRecorder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more