pub struct PaintSurface {
pub order: DrawOrder,
pub bounds: Bounds<ScaledPixels>,
pub content_mask: ContentMask<ScaledPixels>,
pub source: SurfaceSource,
}Fields§
§order: DrawOrder§bounds: Bounds<ScaledPixels>§content_mask: ContentMask<ScaledPixels>§source: SurfaceSourceThe pixels to composite, and the transport they arrived on.
Implementations§
Source§impl PaintSurface
impl PaintSurface
Sourcepub fn to_quad_record(&self) -> Quad
pub fn to_quad_record(&self) -> Quad
Encode this surface into the quad instance record the backends’ shaders read.
The geometry and the content-mask clip are the quad path’s rather than a second
implementation of them, which is the whole reason the surface rides PaintSurface and not
a primitive of its own. The surface carries no opacity, y-flip or corner radii yet: the
element sets no rounded corners, and the payload is sampled straight through, so the record
is the plain one a quad with no styling would build.
Trait Implementations§
Source§impl Clone for PaintSurface
impl Clone for PaintSurface
Source§impl Debug for PaintSurface
impl Debug for PaintSurface
Source§impl From<PaintSurface> for Primitive
impl From<PaintSurface> for Primitive
Source§fn from(surface: PaintSurface) -> Self
fn from(surface: PaintSurface) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PaintSurface
impl RefUnwindSafe for PaintSurface
impl Send for PaintSurface
impl Sync for PaintSurface
impl Unpin for PaintSurface
impl UnsafeUnpin for PaintSurface
impl UnwindSafe for PaintSurface
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