Skip to main content

VisualExtensions

Trait VisualExtensions 

Source
pub trait VisualExtensions {
    // Required method
    fn render_to_with_dpi(
        &self,
        destination: &mut dyn Write,
        dpi: f64,
    ) -> Result<()>;

    // Provided method
    fn render_to(&self, destination: &mut dyn Write) -> Result<()> { ... }
}
Expand description

Extension methods of controls for DevTools.

Required Methods§

Source

fn render_to_with_dpi( &self, destination: &mut dyn Write, dpi: f64, ) -> Result<()>

Render control to the destination stream.

destination is the destination stream; dpi the dpi quality. An error is what writing the image to the stream fails with.

Provided Methods§

Source

fn render_to(&self, destination: &mut dyn Write) -> Result<()>

Render control to the destination stream, at 96 DPI.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl VisualExtensions for Control

Source§

fn render_to_with_dpi( &self, destination: &mut dyn Write, dpi: f64, ) -> Result<()>

Implementors§