pub struct Forma;
Implementations§
source§impl Forma
impl Forma
pub fn new_context_without_token( size: Size2D<u32>, display_rotation: DisplayRotation ) -> FormaContext
Trait Implementations§
source§impl Backend for Forma
impl Backend for Forma
§type Image = FormaImage
type Image = FormaImage
Buffer-backed image that can be used for rendering or storing pixel data.
§type Context = FormaContext
type Context = FormaContext
Backend’s rendering context.
§type PathBuilder = FormaPathBuilder
type PathBuilder = FormaPathBuilder
Stateful path builder.
§type Raster = FormaRaster
type Raster = FormaRaster
Compact rasterized form of any number of paths.
§type RasterBuilder = FormaRasterBuilder
type RasterBuilder = FormaRasterBuilder
Stateful raster builder.
§type Composition = FormaComposition
type Composition = FormaComposition
Composition of stylized rasters.
source§fn new_context(
token: ClientEnd<BufferCollectionTokenMarker>,
size: Size2D<u32>,
display_rotation: DisplayRotation
) -> FormaContext
fn new_context( token: ClientEnd<BufferCollectionTokenMarker>, size: Size2D<u32>, display_rotation: DisplayRotation ) -> FormaContext
Creates a new rendering context
source§impl Composition<Forma> for FormaComposition
impl Composition<Forma> for FormaComposition
source§impl Context<Forma> for FormaContext
impl Context<Forma> for FormaContext
source§fn pixel_format(&self) -> PixelFormat
fn pixel_format(&self) -> PixelFormat
Returns the context’s pixel format.
source§fn path_builder(&self) -> Option<FormaPathBuilder>
fn path_builder(&self) -> Option<FormaPathBuilder>
Optionally returns a
PathBuilder
. May return None
of old builder is still alive.source§fn raster_builder(&self) -> Option<FormaRasterBuilder>
fn raster_builder(&self) -> Option<FormaRasterBuilder>
Optionally returns a
RasterBuilder
. May return None
of old builder is still alive.source§fn new_image(&mut self, size: Size2D<u32>) -> FormaImage
fn new_image(&mut self, size: Size2D<u32>) -> FormaImage
Creates a new image with
size
.source§fn new_image_from_png<R: Read>(
&mut self,
reader: &mut Reader<R>
) -> Result<FormaImage, Error>
fn new_image_from_png<R: Read>( &mut self, reader: &mut Reader<R> ) -> Result<FormaImage, Error>
Creates a new image from PNG
reader
.source§fn get_image(&mut self, image_index: u32) -> FormaImage
fn get_image(&mut self, image_index: u32) -> FormaImage
Returns the image at
image_index
.source§fn get_current_image(&mut self, context: &ViewAssistantContext) -> FormaImage
fn get_current_image(&mut self, context: &ViewAssistantContext) -> FormaImage
Returns the
context
’s current image.source§fn render_with_clip(
&mut self,
composition: &mut FormaComposition,
clip: Rect<u32>,
image: FormaImage,
ext: &RenderExt<Forma>
)
fn render_with_clip( &mut self, composition: &mut FormaComposition, clip: Rect<u32>, image: FormaImage, ext: &RenderExt<Forma> )
Renders the composition with a clip to the image.
source§impl Ord for Forma
impl Ord for Forma
source§impl PartialEq for Forma
impl PartialEq for Forma
source§impl PartialOrd for Forma
impl PartialOrd for Forma
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl PathBuilder<Forma> for FormaPathBuilder
impl PathBuilder<Forma> for FormaPathBuilder
source§fn line_to(&mut self, point: Point) -> &mut Self
fn line_to(&mut self, point: Point) -> &mut Self
Create line from end-point to point and update end-point.
source§fn quad_to(&mut self, p1: Point, p2: Point) -> &mut Self
fn quad_to(&mut self, p1: Point, p2: Point) -> &mut Self
Create quadratic Bézier from end-point to
p2
with p1
as control point.source§fn cubic_to(&mut self, p1: Point, p2: Point, p3: Point) -> &mut Self
fn cubic_to(&mut self, p1: Point, p2: Point, p3: Point) -> &mut Self
Create cubic Bézier from end-point to
p3
with p1
and p2
as control points.source§fn rat_quad_to(&mut self, p1: Point, p2: Point, w: f32) -> &mut Self
fn rat_quad_to(&mut self, p1: Point, p2: Point, w: f32) -> &mut Self
Create rational quadratic Bézier from end-point to
p2
with p1
as control point
and w
as its weight.source§impl RasterBuilder<Forma> for FormaRasterBuilder
impl RasterBuilder<Forma> for FormaRasterBuilder
impl Copy for Forma
impl Eq for Forma
impl StructuralPartialEq for Forma
Auto Trait Implementations§
impl Freeze for Forma
impl RefUnwindSafe for Forma
impl Send for Forma
impl Sync for Forma
impl Unpin for Forma
impl UnwindSafe for Forma
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more