[][src]Struct piet_cairo::CairoRenderContext

pub struct CairoRenderContext<'a> { /* fields omitted */ }

Methods

impl<'a> CairoRenderContext<'a>[src]

pub fn new(ctx: &mut Context) -> CairoRenderContext[src]

Create a new Cairo back-end.

At the moment, it uses the "toy text API" for text layout, but when we change to a more sophisticated text layout approach, we'll probably need a factory for that as an additional argument.

Trait Implementations

impl<'a> RenderContext for CairoRenderContext<'a>[src]

type Point = Vec2

Cairo mostly uses raw f64, so this is as convenient as anything.

type Coord = f64

The type of 1D measurements, for example stroke width. Read more

type Brush = Brush

The type of a "brush". Read more

type Text = CairoText

An associated factory for creating text layouts and related resources.

type TextLayout = CairoTextLayout

type Image = ImageSurface

The associated type of an image.

fn with_save<impl FnOnce(&mut Self) -> Result<(), Error>>(
    &mut self,
    f: impl FnOnce(&mut Self) -> Result<(), Error>
) -> Result<(), Error> where
    impl FnOnce(&mut Self) -> Result<(), Error>: FnOnce(&mut Self) -> Result<(), Error>, 
[src]

Do graphics operations with the context state saved and then restored. Read more

Auto Trait Implementations

impl<'a> !Send for CairoRenderContext<'a>

impl<'a> !Sync for CairoRenderContext<'a>

Blanket Implementations

impl<T> From for T[src]

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

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> RoundFrom for T[src]

impl<T, U> RoundInto for T where
    U: RoundFrom<T>, 
[src]