pub enum Geometry {
Empty,
Bounded(Rect),
Unbounded,
}Expand description
The region an entity’s geometry occupies, in the entity’s own coordinates.
Variants§
Empty
Nothing.
Bounded(Rect)
A shape with these bounds. Already grown by a stroke if there is one: how far a stroke reaches past its path is the stroker’s rule, not this layer’s, and re-deriving it here would be a second copy to disagree.
Unbounded
Fills whatever the clip admits, which is what drawPaint means.
Implementations§
Source§impl Geometry
impl Geometry
Sourcepub fn transformed(self, transform: Affine2) -> Coverage
pub fn transformed(self, transform: Affine2) -> Coverage
Coverage in device coordinates.
The bounding box of the four transformed corners, which is a superset of the transformed shape whenever the transform rotates or shears – a square turned an eighth of a turn needs a box half again its area. A superset is the safe direction: coverage decides what may be skipped and how large an offscreen target is, and both are wrong in a way that shows only if the answer is too small.
Trait Implementations§
impl Copy for Geometry
impl StructuralPartialEq for Geometry
Auto Trait Implementations§
impl Freeze for Geometry
impl RefUnwindSafe for Geometry
impl Send for Geometry
impl Sync for Geometry
impl Unpin for Geometry
impl UnsafeUnpin for Geometry
impl UnwindSafe for Geometry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more