pub struct CanvasGeometry {
pub local_bounds: Option<Rect>,
pub path: Option<Rc<BezPath>>,
}Expand description
Primitive-local geometry prepared before drawing or spatial queries.
An absent bound is conservatively unbounded. Primitives that draw outside their layout rectangle must supply their paint bounds. Paths can retain their prepared command geometry here so selection and drawing do not construct it twice.
Fields§
§local_bounds: Option<Rect>Conservative local paint bounds; None requires inclusion in every region query.
path: Option<Rc<BezPath>>Optional prepared path reused by the primitive during drawing.
Implementations§
Source§impl CanvasGeometry
impl CanvasGeometry
Sourcepub fn for_layout(bounds: (f64, f64)) -> Self
pub fn for_layout(bounds: (f64, f64)) -> Self
Use the layout rectangle for a bounded primitive.
Trait Implementations§
Source§impl Clone for CanvasGeometry
impl Clone for CanvasGeometry
Auto Trait Implementations§
impl !Send for CanvasGeometry
impl !Sync for CanvasGeometry
impl Freeze for CanvasGeometry
impl RefUnwindSafe for CanvasGeometry
impl Unpin for CanvasGeometry
impl UnsafeUnpin for CanvasGeometry
impl UnwindSafe for CanvasGeometry
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
Source§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.