[]Struct druid::piet::CoreGraphicsContext

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

Implementations

impl<'a> CoreGraphicsContext<'a>

pub fn new_y_up(ctx: &mut CGContextRef, height: f64) -> CoreGraphicsContext

Create a new context with the y-origin at the top-left corner.

This is not the default for CoreGraphics; but it is the defualt for piet. To map between the two coordinate spaces you must also pass an explicit height argument.

pub fn new_y_down(ctx: &mut CGContextRef) -> CoreGraphicsContext

Create a new context with the y-origin at the bottom right corner.

This is the default for core graphics, but not for piet.

Trait Implementations

impl<'a> Drop for CoreGraphicsContext<'a>

impl<'a> IntoBrush<CoreGraphicsContext<'a>> for Brush

impl<'a> RenderContext for CoreGraphicsContext<'a>

type Brush = Brush

The type of a "brush". Read more

type Text = CoreGraphicsText<'a>

An associated factory for creating text layouts and related resources.

type TextLayout = CoreGraphicsTextLayout

type Image = CGImage

The associated type of an image.

fn fill(
    &mut self,
    shape: impl Shape,
    brush: &impl IntoBrush<CoreGraphicsContext<'a>>
)

Fill a shape.

Auto Trait Implementations

impl<'a> !RefUnwindSafe for CoreGraphicsContext<'a>

impl<'a> Send for CoreGraphicsContext<'a>

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

impl<'a> Unpin for CoreGraphicsContext<'a>

impl<'a> !UnwindSafe for CoreGraphicsContext<'a>

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> RoundFrom<T> for T

impl<T, U> RoundInto<U> for T where
    U: RoundFrom<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self

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.