[][src]Struct nanachi::context::Context

pub struct Context<P, B, I, R> where
    P: Pixel,
    B: Buffer<P>,
    I: BorrowMut<B>,
    R: BorrowMut<RasterizeBuffer>, 
{ pub image: I, pub flatten_tolerance: f64, pub antialiasing: bool, pub join: Join, pub cap: Cap, pub matrix: Matrix2d, // some fields omitted }

Fields

image: Iflatten_tolerance: f64antialiasing: booljoin: Joincap: Capmatrix: Matrix2d

Implementations

impl<P, B, I, R> Context<P, B, I, R> where
    P: Pixel,
    B: Buffer<P>,
    I: BorrowMut<B>,
    R: BorrowMut<RasterizeBuffer>, 
[src]

pub fn low_quality(self) -> Context<P, B, I, R>[src]

Set to low quality.

pub fn high_quality(self) -> Context<P, B, I, R>[src]

Set to high quality.

pub fn fill<FC: FillColor<P>, C: Compositor<P>, FR: FillRule>(
    &mut self,
    path: &Path,
    fill_style: &FillStyle<P, FC, C, FR>
)
[src]

Fill the path with specified FillStyle.

pub fn stroke<FC: FillColor<P>, C: Compositor<P>, FR: FillRule>(
    &mut self,
    path: &Path,
    fill_style: &FillStyle<P, FC, C, FR>,
    width: f64
)
[src]

Draw stroke of the path with specified FillStyle.

pub fn stroke_with_style<FC: FillColor<P>, C: Compositor<P>, FR: FillRule>(
    &mut self,
    path: &Path,
    fill_style: &FillStyle<P, FC, C, FR>,
    width: f64,
    join: &Join,
    cap: &Cap
)
[src]

Draw stroke of the path with specified FillStyle, Join and Cap.

pub fn clear<FC: FillColor<P>>(&mut self, fill_color: &FC)[src]

Clear buffer entirely with specified FillColor

impl<'a, P> Context<P, GenericBuffer<P>, GenericBuffer<P>, RasterizeBuffer> where
    P: Pixel
[src]

pub fn from_pixel(width: u32, height: u32, pixel: P) -> Self[src]

Create Context with a GenericBuffer.

impl<'a, P, B> Context<P, B, &'a mut B, RasterizeBuffer> where
    P: Pixel,
    B: Buffer<P>, 
[src]

pub fn from_image(image: &'a mut B) -> Self[src]

Create Context from the Buffer.

impl<'a, P, B, I, R> Context<P, B, I, R> where
    P: Pixel,
    B: Buffer<P>,
    I: BorrowMut<B>,
    R: BorrowMut<RasterizeBuffer>, 
[src]

pub fn child<'b>(&'b mut self) -> ChildContext<'b, P, B>[src]

Create child Context.

pub fn transformed_context<'b>(
    &'b mut self,
    matrix: &Matrix2d
) -> ChildContext<'b, P, B>
[src]

Create child Context and transform.

Auto Trait Implementations

impl<P, B, I, R> RefUnwindSafe for Context<P, B, I, R> where
    B: RefUnwindSafe,
    I: RefUnwindSafe,
    P: RefUnwindSafe,
    R: RefUnwindSafe

impl<P, B, I, R> Send for Context<P, B, I, R> where
    B: Send,
    I: Send,
    P: Send,
    R: Send

impl<P, B, I, R> Sync for Context<P, B, I, R> where
    B: Sync,
    I: Sync,
    P: Sync,
    R: Sync

impl<P, B, I, R> Unpin for Context<P, B, I, R> where
    B: Unpin,
    I: Unpin,
    P: Unpin,
    R: Unpin

impl<P, B, I, R> UnwindSafe for Context<P, B, I, R> where
    B: UnwindSafe,
    I: UnwindSafe,
    P: UnwindSafe,
    R: UnwindSafe

Blanket Implementations

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

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

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

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

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

impl<T> SetParameter for T

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.