pub struct FormaContext { /* private fields */ }
Trait Implementations§
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.
Auto Trait Implementations§
impl Freeze for FormaContext
impl !RefUnwindSafe for FormaContext
impl !Send for FormaContext
impl !Sync for FormaContext
impl Unpin for FormaContext
impl !UnwindSafe for FormaContext
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