Struct webrender::prim_store::PolygonKey
source · pub struct PolygonKey {
pub point_count: u8,
pub points: [PointKey; 32],
pub fill_rule: FillRule,
}
Expand description
To create a fixed-size representation of a polygon, we use a fixed number of points. Our initialization method restricts us to values <= 32. If our constant POLYGON_CLIP_VERTEX_MAX is > 32, the Rust compiler will complain.
Fields§
§point_count: u8
§points: [PointKey; 32]
§fill_rule: FillRule
Implementations§
source§impl PolygonKey
impl PolygonKey
pub fn new(points_layout: &Vec<LayoutPoint>, fill_rule: FillRule) -> Self
Trait Implementations§
source§impl Clone for PolygonKey
impl Clone for PolygonKey
source§fn clone(&self) -> PolygonKey
fn clone(&self) -> PolygonKey
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PolygonKey
impl Debug for PolygonKey
source§impl Hash for PolygonKey
impl Hash for PolygonKey
source§impl InternDebug for PolygonKey
impl InternDebug for PolygonKey
fn on_interned(&self, _uid: ItemUid)
source§impl MallocSizeOf for PolygonKey
impl MallocSizeOf for PolygonKey
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
source§impl PartialEq for PolygonKey
impl PartialEq for PolygonKey
source§impl Serialize for PolygonKey
impl Serialize for PolygonKey
impl Copy for PolygonKey
impl Eq for PolygonKey
impl StructuralPartialEq for PolygonKey
Auto Trait Implementations§
impl Freeze for PolygonKey
impl RefUnwindSafe for PolygonKey
impl Send for PolygonKey
impl Sync for PolygonKey
impl Unpin for PolygonKey
impl UnwindSafe for PolygonKey
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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>
Converts
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>
Converts
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