pub struct Image {
pub source: ImageSource,
pub x_extend: Extend,
pub y_extend: Extend,
pub quality: ImageQuality,
}
Expand description
An image.
Fields§
§source: ImageSource
The underlying pixmap of the image.
x_extend: Extend
Extend mode in the horizontal direction.
y_extend: Extend
Extend mode in the vertical direction.
quality: ImageQuality
Hint for desired rendering quality.
Implementations§
Source§impl Image
impl Image
Sourcepub fn from_peniko_image(image: &Image) -> Self
pub fn from_peniko_image(image: &Image) -> Self
Convert a peniko::Image
to an Image
.
This is a somewhat lossy conversion, as the image data data is transformed to premultiplied RGBA8.
§Panics
This panics if image
has a width
or height
greater than u16::MAX
.
Trait Implementations§
Source§impl EncodeExt for Image
impl EncodeExt for Image
Source§fn encode_into(
&self,
paints: &mut Vec<EncodedPaint>,
transform: Affine,
) -> Paint
fn encode_into( &self, paints: &mut Vec<EncodedPaint>, transform: Affine, ) -> Paint
Encode the gradient and push it into a vector of encoded paints, returning
the corresponding paint in the process. This will also validate the gradient.
impl Sealed for Image
Auto Trait Implementations§
impl Freeze for Image
impl RefUnwindSafe for Image
impl Send for Image
impl Sync for Image
impl Unpin for Image
impl UnwindSafe for Image
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