Struct forma_render::styling::Image
source · pub struct Image { /* private fields */ }Implementations§
source§impl Image
impl Image
sourcepub fn from_srgba(
data: &[[u8; 4]],
width: usize,
height: usize
) -> Result<Self, ImageError>
pub fn from_srgba(
data: &[[u8; 4]],
width: usize,
height: usize
) -> Result<Self, ImageError>
Creates an image from sRGB color channels and linear alpha.
The boxed array size must match the image dimensions.
pub fn from_linear_rgba(
data: &[[f32; 4]],
width: usize,
height: usize
) -> Result<Self, ImageError>
pub fn id(&self) -> ImageId
pub fn width(&self) -> u32
pub fn height(&self) -> u32
Trait Implementations§
impl Eq for Image
Auto Trait Implementations§
impl RefUnwindSafe for Image
impl Send for Image
impl Sync for Image
impl Unpin for Image
impl UnwindSafe for Image
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.