pub struct NativeSurfaceRenderContext { /* private fields */ }Expand description
Renderer adapter for external/native surface targets owned by a host runtime.
Implementations§
Source§impl NativeSurfaceRenderContext
impl NativeSurfaceRenderContext
Sourcepub async fn new(
device: Arc<Device>,
queue: Arc<Queue>,
width: u32,
height: u32,
format: TextureFormat,
) -> Result<Self, String>
pub async fn new( device: Arc<Device>, queue: Arc<Queue>, width: u32, height: u32, format: TextureFormat, ) -> Result<Self, String>
Create a context that can render into external texture views.
pub fn set_pixels_per_point(&mut self, pixels_per_point: f32)
pub fn set_theme_config(&mut self, theme: PlotThemeConfig)
pub fn set_textmark(&mut self, textmark: Option<&str>)
Sourcepub fn render_to_view(
&mut self,
figure: &Figure,
view: &TextureView,
camera: Option<&Camera>,
axes_cameras: Option<&[Camera]>,
) -> Result<RenderResult, String>
pub fn render_to_view( &mut self, figure: &Figure, view: &TextureView, camera: Option<&Camera>, axes_cameras: Option<&[Camera]>, ) -> Result<RenderResult, String>
Render a figure directly into an externally-owned texture view.
Auto Trait Implementations§
impl !Freeze for NativeSurfaceRenderContext
impl !RefUnwindSafe for NativeSurfaceRenderContext
impl Send for NativeSurfaceRenderContext
impl !Sync for NativeSurfaceRenderContext
impl Unpin for NativeSurfaceRenderContext
impl UnsafeUnpin for NativeSurfaceRenderContext
impl !UnwindSafe for NativeSurfaceRenderContext
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more