[−][src]Struct tiny_skia::Surface
Implementations
impl Surface
[src]
pub fn new_rgba(width: u32, height: u32) -> Option<Surface>
[src]
pub fn new_rgba_premultiplied(width: u32, height: u32) -> Option<Surface>
[src]
pub fn copy_rgba(
&self,
x: u32,
y: u32,
width: u32,
height: u32
) -> Option<Surface>
[src]
&self,
x: u32,
y: u32,
width: u32,
height: u32
) -> Option<Surface>
pub fn try_clone(&self) -> Option<Surface>
[src]
pub fn save_png<P: AsRef<Path>>(&self, path: P) -> Result<(), EncodingError>
[src]
pub fn width(&self) -> u32
[src]
pub fn height(&self) -> u32
[src]
pub fn alpha_type(&self) -> AlphaType
[src]
pub fn data_u8(&self) -> &[u8]
[src]
pub fn data(&self) -> SurfaceData
[src]
pub fn data_mut(&mut self) -> SurfaceDataMut
[src]
Methods from Deref<Target = Canvas>
pub fn clear(&mut self)
[src]
pub fn fill(&mut self, r: u8, g: u8, b: u8, a: u8)
[src]
pub fn flush(&mut self)
[src]
pub fn set_transform(&mut self, ts: Transform)
[src]
pub fn concat(&mut self, ts: Transform)
[src]
pub fn scale(&mut self, sx: f32, sy: f32)
[src]
pub fn translate(&mut self, dx: f32, dy: f32)
[src]
pub fn get_transform(&self) -> Transform
[src]
pub fn reset_transform(&mut self)
[src]
pub fn draw_path(&mut self, path: &Path, paint: &Paint)
[src]
pub fn draw_rect(&mut self, x: f32, y: f32, w: f32, h: f32, paint: &Paint)
[src]
pub fn draw_surface(
&mut self,
surface: &Surface,
left: f32,
top: f32,
alpha: u8,
blend_mode: BlendMode,
filter_quality: FilterQuality
)
[src]
&mut self,
surface: &Surface,
left: f32,
top: f32,
alpha: u8,
blend_mode: BlendMode,
filter_quality: FilterQuality
)
pub fn draw_surface_rect(
&mut self,
surface: &Surface,
x: f32,
y: f32,
w: f32,
h: f32,
filter_quality: FilterQuality
)
[src]
&mut self,
surface: &Surface,
x: f32,
y: f32,
w: f32,
h: f32,
filter_quality: FilterQuality
)
pub fn set_clip_rect(&mut self, x: f32, y: f32, w: f32, h: f32)
[src]
pub fn save(&mut self)
[src]
pub fn restore(&mut self)
[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Surface
impl !Send for Surface
impl !Sync for Surface
impl Unpin for Surface
impl UnwindSafe for Surface
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,