pub struct QuadTransformState {
map_prim_to_raster: CoordinateSpaceMapping<LayoutPixel, LayoutPixel>,
as_scale_offset: Option<ScaleOffset>,
is_2d_axis_aligned: bool,
prim_spatial_node: SpatialNodeIndex,
raster_spatial_node: SpatialNodeIndex,
device_pixel_scale: DevicePixelScale,
}Expand description
Contains some transform-related information that is computed per primitive cluster.
Fields§
§map_prim_to_raster: CoordinateSpaceMapping<LayoutPixel, LayoutPixel>§as_scale_offset: Option<ScaleOffset>§is_2d_axis_aligned: bool§prim_spatial_node: SpatialNodeIndex§raster_spatial_node: SpatialNodeIndex§device_pixel_scale: DevicePixelScaleImplementations§
Source§impl QuadTransformState
impl QuadTransformState
pub fn new() -> QuadTransformState
pub fn set( &mut self, src_node: SpatialNodeIndex, dst_node: SpatialNodeIndex, spatial_tree: &SpatialTree, scale: DevicePixelScale, )
pub fn is_2d_scale_offset(&self) -> bool
pub fn is_2d_axis_aligned(&self) -> bool
pub fn as_2d_scale_offset(&self) -> Option<&ScaleOffset>
pub fn scale_factors(&self) -> (f32, f32)
pub fn prim_spatial_node_index(&self) -> SpatialNodeIndex
pub fn raster_spatial_node_index(&self) -> SpatialNodeIndex
pub fn device_pixel_scale(&self) -> DevicePixelScale
Auto Trait Implementations§
impl Freeze for QuadTransformState
impl RefUnwindSafe for QuadTransformState
impl Send for QuadTransformState
impl Sync for QuadTransformState
impl Unpin for QuadTransformState
impl UnsafeUnpin for QuadTransformState
impl UnwindSafe for QuadTransformState
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> 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