pub struct ViewportState {
clip_state: ClipState,
strip_generator: StripGenerator,
strip_generator_stack: Vec<StripGenerator>,
level: Level,
}Expand description
Viewport state storing information about clip state and active strip generators in currently active root viewports.
Fields§
§clip_state: ClipState§strip_generator: StripGenerator§strip_generator_stack: Vec<StripGenerator>§level: LevelImplementations§
Source§impl ViewportState
impl ViewportState
Sourcepub fn clip(&self) -> Option<PathDataRef<'_>>
pub fn clip(&self) -> Option<PathDataRef<'_>>
Return the current clip path.
Sourcepub fn has_root_viewports(&self) -> bool
pub fn has_root_viewports(&self) -> bool
Whether any root viewports are currently pushed.
Sourcepub fn with_generator_and_clip<R>(
&mut self,
f: impl FnOnce(&mut StripGenerator, Option<PathDataRef<'_>>) -> R,
) -> R
pub fn with_generator_and_clip<R>( &mut self, f: impl FnOnce(&mut StripGenerator, Option<PathDataRef<'_>>) -> R, ) -> R
Use the active strip generator together with the current clip.
Sourcepub fn push_clip(
&mut self,
path: &BezPath,
fill_rule: Fill,
transform: Affine,
aliasing_threshold: Option<u8>,
)
pub fn push_clip( &mut self, path: &BezPath, fill_rule: Fill, transform: Affine, aliasing_threshold: Option<u8>, )
Push a new clip path.
Sourcepub fn push_root_viewport(&mut self, filter_data: &FilterData)
pub fn push_root_viewport(&mut self, filter_data: &FilterData)
Push a new root viewport.
Sourcepub fn pop_root_viewport(&mut self)
pub fn pop_root_viewport(&mut self)
Pop the last root viewport.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ViewportState
impl RefUnwindSafe for ViewportState
impl Send for ViewportState
impl Sync for ViewportState
impl Unpin for ViewportState
impl UnsafeUnpin for ViewportState
impl UnwindSafe for ViewportState
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