Type Definition skia_safe::ImageInfo

source ·
pub type ImageInfo = Handle<SkImageInfo>;

Implementations§

source§

impl ImageInfo

source

pub fn new( dimensions: impl Into<ISize>, ct: ColorType, at: AlphaType, cs: impl Into<Option<ColorSpace>> ) -> Self

source

pub fn from_color_info( dimensions: impl Into<ISize>, color_info: ColorInfo ) -> Self

source

pub fn new_n32( dimensions: impl Into<ISize>, at: AlphaType, cs: impl Into<Option<ColorSpace>> ) -> ImageInfo

source

pub fn new_s32(dimensions: impl Into<ISize>, at: AlphaType) -> ImageInfo

source

pub fn new_n32_premul( dimensions: impl Into<ISize>, cs: impl Into<Option<ColorSpace>> ) -> ImageInfo

source

pub fn new_a8(dimensions: impl Into<ISize>) -> ImageInfo

source

pub fn new_unknown(dimensions: Option<ISize>) -> ImageInfo

source

pub fn width(&self) -> i32

source

pub fn height(&self) -> i32

source

pub fn color_type(&self) -> ColorType

source

pub fn alpha_type(&self) -> AlphaType

source

pub fn color_space(&self) -> Option<ColorSpace>

source

pub fn is_empty(&self) -> bool

source

pub fn color_info(&self) -> &ColorInfo

source

pub fn is_opaque(&self) -> bool

source

pub fn dimensions(&self) -> ISize

source

pub fn bounds(&self) -> IRect

source

pub fn is_gamma_close_to_srgb(&self) -> bool

source

pub fn with_dimensions(&self, new_dimensions: impl Into<ISize>) -> Self

source

pub fn with_alpha_type(&self, new_alpha_type: AlphaType) -> Self

source

pub fn with_color_type(&self, new_color_type: ColorType) -> Self

source

pub fn with_color_space( &self, new_color_space: impl Into<Option<ColorSpace>> ) -> Self

source

pub fn bytes_per_pixel(&self) -> usize

source

pub fn shift_per_pixel(&self) -> usize

source

pub fn min_row_bytes(&self) -> usize

source

pub fn compute_offset( &self, point: impl Into<IPoint>, row_bytes: usize ) -> usize

source

pub fn compute_byte_size(&self, row_bytes: usize) -> usize

source

pub fn compute_min_byte_size(&self) -> usize

source

pub fn valid_row_bytes(&self, row_bytes: usize) -> bool

source

pub fn reset(&mut self) -> &mut Self

Trait Implementations§

source§

impl Debug for ImageInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Send for ImageInfo

source§

impl Sync for ImageInfo