pub trait IPlatformRenderInterfaceContext: IOptionalFeatureProvider {
// Required methods
fn create_render_target(
&self,
surfaces: &[Arc<dyn IPlatformRenderSurface>],
) -> Rc<dyn IRenderTarget>;
fn create_offscreen_render_target(
&self,
pixel_size: PixelSize,
scaling: Vector,
enable_text_antialiasing: bool,
) -> Rc<dyn IDrawingContextLayerImpl>;
fn is_lost(&self) -> bool;
fn max_offscreen_render_target_pixel_size(&self) -> Option<PixelSize>;
fn dispose(&self);
// Provided methods
fn public_features(&self) -> HashMap<TypeId, Rc<dyn Any>> { ... }
fn is_ready_to_create_render_target(
&self,
_surfaces: &[Arc<dyn IPlatformRenderSurface>],
) -> bool { ... }
}Expand description
A render backend bound to a graphics context (or to software rendering).
Required Methods§
Sourcefn create_render_target(
&self,
surfaces: &[Arc<dyn IPlatformRenderSurface>],
) -> Rc<dyn IRenderTarget>
fn create_render_target( &self, surfaces: &[Arc<dyn IPlatformRenderSurface>], ) -> Rc<dyn IRenderTarget>
Creates a render target for one of the given surfaces.
Sourcefn create_offscreen_render_target(
&self,
pixel_size: PixelSize,
scaling: Vector,
enable_text_antialiasing: bool,
) -> Rc<dyn IDrawingContextLayerImpl>
fn create_offscreen_render_target( &self, pixel_size: PixelSize, scaling: Vector, enable_text_antialiasing: bool, ) -> Rc<dyn IDrawingContextLayerImpl>
Creates an offscreen render target.
Sourcefn max_offscreen_render_target_pixel_size(&self) -> Option<PixelSize>
fn max_offscreen_render_target_pixel_size(&self) -> Option<PixelSize>
The largest offscreen render target the context can create, if limited.
Provided Methods§
Sourcefn public_features(&self) -> HashMap<TypeId, Rc<dyn Any>>
fn public_features(&self) -> HashMap<TypeId, Rc<dyn Any>>
The features of the context that are exposed to user code, by type.
Sourcefn is_ready_to_create_render_target(
&self,
_surfaces: &[Arc<dyn IPlatformRenderSurface>],
) -> bool
fn is_ready_to_create_render_target( &self, _surfaces: &[Arc<dyn IPlatformRenderSurface>], ) -> bool
Whether a render target can be created for the surfaces right now.
Trait Implementations§
Source§impl OwnedDisposableValue for dyn IPlatformRenderInterfaceContext
impl OwnedDisposableValue for dyn IPlatformRenderInterfaceContext
fn dispose_owned(&self)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".