pub struct ClipState {
context: ClipContext,
context_pool: Pool<ClipContext>,
path_elements: Vec<PathEl>,
raw_clips: Vec<RawClip>,
frames: Vec<ClipFrame>,
revision: u64,
}Expand description
State for managing clip paths across multiple viewports.
Fields§
§context: ClipContextThe currently active clip context.
context_pool: Pool<ClipContext>A pool of reusable clip contexts.
path_elements: Vec<PathEl>A flat factor of path elements storing the original path data of clip paths.
raw_clips: Vec<RawClip>Raw data of the currently active stack of clip paths
frames: Vec<ClipFrame>Stack of pushed clip frames.
revision: u64The current revision.
Implementations§
Source§impl ClipState
impl ClipState
Sourcepub fn get(&self) -> Option<PathDataRef<'_>>
pub fn get(&self) -> Option<PathDataRef<'_>>
Return the current clip path.
Sourcepub fn push_root_viewport(
&mut self,
source_shift: (u16, u16),
strip_generator: &mut StripGenerator,
)
pub fn push_root_viewport( &mut self, source_shift: (u16, u16), strip_generator: &mut StripGenerator, )
Push a new root viewport.
Sourcepub fn pop_root_viewport(&mut self, strip_generator: &mut StripGenerator)
pub fn pop_root_viewport(&mut self, strip_generator: &mut StripGenerator)
Pop the last root viewport.
Sourcepub fn push_clip(
&mut self,
path: &BezPath,
strip_generator: &mut StripGenerator,
fill_rule: Fill,
transform: Affine,
aliasing_threshold: Option<u8>,
)
pub fn push_clip( &mut self, path: &BezPath, strip_generator: &mut StripGenerator, fill_rule: Fill, transform: Affine, aliasing_threshold: Option<u8>, )
Push a clip path.
fn active_shift(&self) -> Affine
fn rebuild_context(&mut self, strip_generator: &mut StripGenerator)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ClipState
impl RefUnwindSafe for ClipState
impl Send for ClipState
impl Sync for ClipState
impl Unpin for ClipState
impl UnsafeUnpin for ClipState
impl UnwindSafe for ClipState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more