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

Implementations§

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.

The optional text argument can be a reuseable CoreGraphicsText struct; a new one will be constructed if None is passed.

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

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

The optional text argument can be a reuseable CoreGraphicsText struct; a new one will be constructed if None is passed.

Trait Implementations§

Executes the destructor for this type. Read more

Fill a shape.

The type of a “brush”. Read more
An associated factory for creating text layouts and related resources.
The type use to represent text layout objects.
The associated type of an image.
Replace a region of the canvas with the provided Color. Read more
Create a new brush resource. Read more
Create a new gradient brush.
Fill a shape, using the even-odd fill rule.
Clip to a [Shape]. Read more
Stroke a [Shape], using the default StrokeStyle.
Stroke a [Shape], providing a custom StrokeStyle.
Returns a reference to a shared Text object. Read more
Save the context state. Read more
Restore the context state. Read more
Finish any pending operations. Read more
Apply a transform. Read more
Create a new Image from a pixel buffer. Read more
Draw an Image into the provided [Rect]. Read more
Draw a specified area of an Image. Read more
Create an Image of the specified region of the context. Read more
Draw a rectangle with Gaussian blur. Read more
Returns the transformations currently applied to the context.
Report an internal error. Read more
Do graphics operations with the context state saved and then restored. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Performs the conversion.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.