pub struct PlatformRenderInterface { /* private fields */ }Expand description
Vello platform render interface.
Implementations§
Source§impl PlatformRenderInterface
impl PlatformRenderInterface
Sourcepub fn new(options: VelloOptions) -> Self
pub fn new(options: VelloOptions) -> Self
Creates the render interface of the given options.
Sourcepub fn rendering_modes(&self) -> &[VelloRenderingMode]
pub fn rendering_modes(&self) -> &[VelloRenderingMode]
The rendering modes scenes are drawn in, in the order they are tried.
Trait Implementations§
Source§impl Default for PlatformRenderInterface
impl Default for PlatformRenderInterface
Source§impl IPlatformRenderInterface for PlatformRenderInterface
impl IPlatformRenderInterface for PlatformRenderInterface
Source§fn create_ellipse_geometry(&self, rect: Rect) -> Arc<dyn IGeometryImpl> ⓘ
fn create_ellipse_geometry(&self, rect: Rect) -> Arc<dyn IGeometryImpl> ⓘ
Creates an ellipse geometry implementation.
Source§fn create_line_geometry(&self, p1: Point, p2: Point) -> Arc<dyn IGeometryImpl> ⓘ
fn create_line_geometry(&self, p1: Point, p2: Point) -> Arc<dyn IGeometryImpl> ⓘ
Creates a line geometry implementation.
Source§fn create_rectangle_geometry(&self, rect: Rect) -> Arc<dyn IGeometryImpl> ⓘ
fn create_rectangle_geometry(&self, rect: Rect) -> Arc<dyn IGeometryImpl> ⓘ
Creates a rectangle geometry implementation.
Source§fn create_stream_geometry_builder(
&self,
source: Option<&dyn IGeometryImpl>,
) -> Box<dyn IStreamGeometryBuilder>
fn create_stream_geometry_builder( &self, source: Option<&dyn IGeometryImpl>, ) -> Box<dyn IStreamGeometryBuilder>
Creates a builder used to define a stream geometry. Read more
Source§fn create_geometry_group(
&self,
fill_rule: FillRule,
children: &[Arc<dyn IGeometryImpl>],
) -> Arc<dyn IGeometryImpl> ⓘ
fn create_geometry_group( &self, fill_rule: FillRule, children: &[Arc<dyn IGeometryImpl>], ) -> Arc<dyn IGeometryImpl> ⓘ
Creates a geometry group implementation.
Source§fn create_combined_geometry(
&self,
combine_mode: GeometryCombineMode,
g1: Arc<dyn IGeometryImpl>,
g2: Arc<dyn IGeometryImpl>,
) -> Arc<dyn IGeometryImpl> ⓘ
fn create_combined_geometry( &self, combine_mode: GeometryCombineMode, g1: Arc<dyn IGeometryImpl>, g2: Arc<dyn IGeometryImpl>, ) -> Arc<dyn IGeometryImpl> ⓘ
Creates a geometry that combines two geometries.
Source§fn build_glyph_run_geometry(
&self,
glyph_run: &GlyphRun,
) -> Arc<dyn IGeometryImpl> ⓘ
fn build_glyph_run_geometry( &self, glyph_run: &GlyphRun, ) -> Arc<dyn IGeometryImpl> ⓘ
Builds a glyph run geometry.
Source§fn create_glyph_run(
&self,
glyph_typeface: &Rc<GlyphTypeface>,
font_rendering_em_size: f64,
glyph_infos: &[GlyphInfo],
baseline_origin: Point,
) -> Arc<dyn IGlyphRunImpl> ⓘ
fn create_glyph_run( &self, glyph_typeface: &Rc<GlyphTypeface>, font_rendering_em_size: f64, glyph_infos: &[GlyphInfo], baseline_origin: Point, ) -> Arc<dyn IGlyphRunImpl> ⓘ
Creates a platform implementation of a glyph run. Read more
Source§fn create_render_target_bitmap(
&self,
size: PixelSize,
dpi: Vector,
) -> Arc<dyn IRenderTargetBitmapImpl> ⓘ
fn create_render_target_bitmap( &self, size: PixelSize, dpi: Vector, ) -> Arc<dyn IRenderTargetBitmapImpl> ⓘ
Creates a render target bitmap. Read more
Source§fn create_writeable_bitmap(
&self,
size: PixelSize,
dpi: Vector,
format: PixelFormat,
alpha_format: AlphaFormat,
) -> Arc<dyn IWriteableBitmapImpl> ⓘ
fn create_writeable_bitmap( &self, size: PixelSize, dpi: Vector, format: PixelFormat, alpha_format: AlphaFormat, ) -> Arc<dyn IWriteableBitmapImpl> ⓘ
Creates a writeable bitmap.
Source§fn load_bitmap_from_file(
&self,
file_name: &str,
) -> Result<Arc<SharedBitmapImpl>>
fn load_bitmap_from_file( &self, file_name: &str, ) -> Result<Arc<SharedBitmapImpl>>
Loads a bitmap from a file.
Source§fn load_bitmap(&self, stream: &mut dyn Read) -> Result<Arc<SharedBitmapImpl>>
fn load_bitmap(&self, stream: &mut dyn Read) -> Result<Arc<SharedBitmapImpl>>
Loads a bitmap from a stream.
Source§fn load_writeable_bitmap_to_width(
&self,
stream: &mut dyn Read,
width: i32,
interpolation_mode: BitmapInterpolationMode,
) -> Result<Arc<dyn IWriteableBitmapImpl>>
fn load_writeable_bitmap_to_width( &self, stream: &mut dyn Read, width: i32, interpolation_mode: BitmapInterpolationMode, ) -> Result<Arc<dyn IWriteableBitmapImpl>>
Loads a writeable bitmap from a stream, decoded to the given width.
Source§fn load_writeable_bitmap_to_height(
&self,
stream: &mut dyn Read,
height: i32,
interpolation_mode: BitmapInterpolationMode,
) -> Result<Arc<dyn IWriteableBitmapImpl>>
fn load_writeable_bitmap_to_height( &self, stream: &mut dyn Read, height: i32, interpolation_mode: BitmapInterpolationMode, ) -> Result<Arc<dyn IWriteableBitmapImpl>>
Loads a writeable bitmap from a stream, decoded to the given height.
Source§fn load_writeable_bitmap_from_file(
&self,
file_name: &str,
) -> Result<Arc<dyn IWriteableBitmapImpl>>
fn load_writeable_bitmap_from_file( &self, file_name: &str, ) -> Result<Arc<dyn IWriteableBitmapImpl>>
Loads a writeable bitmap from a file.
Source§fn load_writeable_bitmap(
&self,
stream: &mut dyn Read,
) -> Result<Arc<dyn IWriteableBitmapImpl>>
fn load_writeable_bitmap( &self, stream: &mut dyn Read, ) -> Result<Arc<dyn IWriteableBitmapImpl>>
Loads a writeable bitmap from a stream.
Source§fn load_bitmap_to_width(
&self,
stream: &mut dyn Read,
width: i32,
interpolation_mode: BitmapInterpolationMode,
) -> Result<Arc<SharedBitmapImpl>>
fn load_bitmap_to_width( &self, stream: &mut dyn Read, width: i32, interpolation_mode: BitmapInterpolationMode, ) -> Result<Arc<SharedBitmapImpl>>
Loads a bitmap from a stream, decoded to the given width.
Source§fn load_bitmap_to_height(
&self,
stream: &mut dyn Read,
height: i32,
interpolation_mode: BitmapInterpolationMode,
) -> Result<Arc<SharedBitmapImpl>>
fn load_bitmap_to_height( &self, stream: &mut dyn Read, height: i32, interpolation_mode: BitmapInterpolationMode, ) -> Result<Arc<SharedBitmapImpl>>
Loads a bitmap from a stream, decoded to the given height.
Source§fn resize_bitmap(
&self,
bitmap_impl: &dyn IBitmapImpl,
destination_size: PixelSize,
interpolation_mode: BitmapInterpolationMode,
) -> Arc<SharedBitmapImpl> ⓘ
fn resize_bitmap( &self, bitmap_impl: &dyn IBitmapImpl, destination_size: PixelSize, interpolation_mode: BitmapInterpolationMode, ) -> Arc<SharedBitmapImpl> ⓘ
Creates a resized copy of a bitmap.
Source§fn load_bitmap_from_pixels(
&self,
format: PixelFormat,
alpha_format: AlphaFormat,
data: &[u8],
size: PixelSize,
dpi: Vector,
stride: i32,
) -> Arc<SharedBitmapImpl> ⓘ
fn load_bitmap_from_pixels( &self, format: PixelFormat, alpha_format: AlphaFormat, data: &[u8], size: PixelSize, dpi: Vector, stride: i32, ) -> Arc<SharedBitmapImpl> ⓘ
Loads a bitmap from raw pixel data. Read more
Source§fn create_backend_context(
&self,
graphics_api_context: Option<Rc<dyn IPlatformGraphicsContext>>,
) -> Rc<dyn IPlatformRenderInterfaceContext>
fn create_backend_context( &self, graphics_api_context: Option<Rc<dyn IPlatformGraphicsContext>>, ) -> Rc<dyn IPlatformRenderInterfaceContext>
Creates a backend-specific render context from a platform graphics
context (
None selects software rendering).Source§fn supports_individual_round_rects(&self) -> bool
fn supports_individual_round_rects(&self) -> bool
Whether the backend supports individual corner radii on rounded
rectangles.
Source§fn default_alpha_format(&self) -> AlphaFormat
fn default_alpha_format(&self) -> AlphaFormat
The default alpha format of the backend.
Source§fn default_pixel_format(&self) -> PixelFormat
fn default_pixel_format(&self) -> PixelFormat
The default pixel format of the backend.
Source§fn is_supported_bitmap_pixel_format(&self, format: PixelFormat) -> bool
fn is_supported_bitmap_pixel_format(&self, format: PixelFormat) -> bool
Whether bitmaps can be created in the given pixel format.
Source§fn supports_regions(&self) -> bool
fn supports_regions(&self) -> bool
Whether the backend supports regions.
Source§fn create_region(&self) -> Rc<dyn IPlatformRenderInterfaceRegion>
fn create_region(&self) -> Rc<dyn IPlatformRenderInterfaceRegion>
Creates an empty region.
Auto Trait Implementations§
impl Freeze for PlatformRenderInterface
impl RefUnwindSafe for PlatformRenderInterface
impl Send for PlatformRenderInterface
impl Sync for PlatformRenderInterface
impl Unpin for PlatformRenderInterface
impl UnsafeUnpin for PlatformRenderInterface
impl UnwindSafe for PlatformRenderInterface
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more