[][src]Struct raqote::DrawTarget

pub struct DrawTarget { /* fields omitted */ }

Methods

impl DrawTarget[src]

pub fn new(width: i32, height: i32) -> DrawTarget[src]

pub fn width(&self) -> i32[src]

pub fn height(&self) -> i32[src]

pub fn set_transform(&mut self, transform: &Transform)[src]

pub fn get_transform(&self) -> &Transform[src]

pub fn push_clip_rect(&mut self, rect: IntRect)[src]

pub fn pop_clip(&mut self)[src]

pub fn push_clip(&mut self, path: &Path)[src]

pub fn push_layer(&mut self, opacity: f32)[src]

Pushes a new layer as the drawing target. This is used for implementing group opacity effects.

pub fn pop_layer(&mut self)[src]

Draws the most recently pushed layer to the drawing target with the pushed opacity applied.

pub fn draw_image_at(
    &mut self,
    x: f32,
    y: f32,
    image: &Image,
    options: &DrawOptions
)
[src]

Draws an image at x, y

pub fn mask(&mut self, src: &Source, x: i32, y: i32, mask: &Mask)[src]

pub fn stroke(
    &mut self,
    path: &Path,
    src: &Source,
    style: &StrokeStyle,
    options: &DrawOptions
)
[src]

pub fn fill(&mut self, path: &Path, src: &Source, options: &DrawOptions)[src]

pub fn clear(&mut self, solid: SolidSource)[src]

pub fn draw_text(
    &mut self,
    font: &Font,
    point_size: f32,
    text: &str,
    start: Point,
    src: &Source,
    options: &DrawOptions
)
[src]

Note: text positioning works very poorly because of limitations and bugs in font-kit

pub fn draw_glyphs(
    &mut self,
    font: &Font,
    point_size: f32,
    ids: &[u32],
    positions: &[Point],
    src: &Source,
    options: &DrawOptions
)
[src]

Note: text positioning works very poorly because of limitations and bugs in font-kit

pub fn get_data(&self) -> &[u32][src]

pub fn get_data_u8_mut(&mut self) -> &mut [u8][src]

pub fn into_vec(self) -> Vec<u32>[src]

Take ownership of the buffer backing the DrawTarget

pub fn write_png<P: AsRef<Path>>(&self, path: P) -> Result<(), EncodingError>[src]

Auto Trait Implementations

impl !Send for DrawTarget

impl !Sync for DrawTarget

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]