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
Source§type Image = FormaImage
type Image = FormaImage
Buffer-backed image that can be used for rendering or storing pixel data.
Source§type Context = FormaContext
type Context = FormaContext
Backend’s rendering context.
Source§type PathBuilder = FormaPathBuilder
type PathBuilder = FormaPathBuilder
Stateful path builder.
Source§type Raster = FormaRaster
type Raster = FormaRaster
Compact rasterized form of any number of paths.
Source§type RasterBuilder = FormaRasterBuilder
type RasterBuilder = FormaRasterBuilder
Stateful raster builder.
Source§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 PartialOrd for Forma
impl PartialOrd for Forma
Source§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
Source§fn add_with_transform(
&mut self,
path: &FormaPath,
transform: &Transform2D<f32>,
) -> &mut Self
fn add_with_transform( &mut self, path: &FormaPath, transform: &Transform2D<f32>, ) -> &mut Self
Add a path to the raster with transform.
Source§fn build(self) -> FormaRaster
fn build(self) -> FormaRaster
Builds the raster. Read more
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)