pub struct ShapeRecords { /* private fields */ }Expand description
Recorded shapes stored in parallel columns, ready for GPU upload.
Angle changes leave the body column intact. Original line and arc arguments remain on the CPU so materialisation preserves exactly what the caller supplied; the rects, round rects and path slices that make up most recordings have none, and keep no column for them.
Implementations§
Source§impl ShapeRecords
impl ShapeRecords
Sourcepub fn bodies(&self) -> &[ShapeRecordBody]
pub fn bodies(&self) -> &[ShapeRecordBody]
The angle-independent column, directly usable as GPU instance data.
Sourcepub fn curves(&self) -> &[ShapeRecordCurve]
pub fn curves(&self) -> &[ShapeRecordCurve]
The radius and angle column, directly usable as GPU instance data.
Sourcepub fn occludes(&self, index: usize) -> bool
pub fn occludes(&self, index: usize) -> bool
Whether the record at index is an opaque fill whose interior is worth
laying down ahead of later paint: the test that marks a segment’s
occluders. false past the end.
Sourcepub fn get(&self, index: usize) -> Option<ShapeRecord>
pub fn get(&self, index: usize) -> Option<ShapeRecord>
Reconstructs one complete record, including the original arc arguments.
Sourcepub fn iter(
&self,
) -> impl ExactSizeIterator<Item = ShapeRecord> + DoubleEndedIterator + '_
pub fn iter( &self, ) -> impl ExactSizeIterator<Item = ShapeRecord> + DoubleEndedIterator + '_
Iterates over complete records in draw order without allocating.