Skip to main content

PlatformRenderInterface

Struct PlatformRenderInterface 

Source
pub struct PlatformRenderInterface { /* private fields */ }
Expand description

Vello platform render interface.

Implementations§

Source§

impl PlatformRenderInterface

Source

pub fn new(options: VelloOptions) -> Self

Creates the render interface of the given options.

Source

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

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl IPlatformRenderInterface for PlatformRenderInterface

Source§

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> ⓘ

Creates a line geometry implementation.
Source§

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>

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> ⓘ

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> ⓘ

Creates a geometry that combines two geometries.
Source§

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> ⓘ

Creates a platform implementation of a glyph run. Read more
Source§

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> ⓘ

Creates a writeable bitmap.
Source§

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>>

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>>

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>>

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>>

Loads a writeable bitmap from a file.
Source§

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>>

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>>

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> ⓘ

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> ⓘ

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>

Creates a backend-specific render context from a platform graphics context (None selects software rendering).
Source§

fn supports_individual_round_rects(&self) -> bool

Whether the backend supports individual corner radii on rounded rectangles.
Source§

fn default_alpha_format(&self) -> AlphaFormat

The default alpha format of the backend.
Source§

fn default_pixel_format(&self) -> PixelFormat

The default pixel format of the backend.
Source§

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

Whether the backend supports regions.
Source§

fn create_region(&self) -> Rc<dyn IPlatformRenderInterfaceRegion>

Creates an empty region.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AutoreleaseSafe for T
where T: ?Sized,

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> ClassDefaults for T
where T: ?Sized,

Source§

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

Source§

fn simd_from(_simd: S, value: T) -> T

Source§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

Source§

fn simd_into(self, simd: S) -> T

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,