[][src]Trait nvg::renderer::Renderer

pub trait Renderer {
    fn edge_antialias(&self) -> bool;
fn create_texture(
        &mut self,
        texture_type: TextureType,
        width: usize,
        height: usize,
        flags: ImageFlags,
        data: Option<&[u8]>
    ) -> Result<ImageId>;
fn delete_texture(&mut self, handle: ImageId) -> Result<()>;
fn update_texture(
        &mut self,
        handle: ImageId,
        x: usize,
        y: usize,
        width: usize,
        height: usize,
        data: &[u8]
    ) -> Result<()>;
fn texture_size(&self, handle: ImageId) -> Result<(usize, usize)>;
fn viewport(
        &mut self,
        extent: Extent,
        device_pixel_ratio: f32
    ) -> Result<()>;
fn cancel(&mut self) -> Result<()>;
fn flush(&mut self) -> Result<()>;
fn fill(
        &mut self,
        paint: &Paint,
        composite_operation: CompositeOperationState,
        scissor: &Scissor,
        fringe: f32,
        bounds: Bounds,
        paths: &[Path]
    ) -> Result<()>;
fn stroke(
        &mut self,
        paint: &Paint,
        composite_operation: CompositeOperationState,
        scissor: &Scissor,
        fringe: f32,
        stroke_width: f32,
        paths: &[Path]
    ) -> Result<()>;
fn triangles(
        &mut self,
        paint: &Paint,
        composite_operation: CompositeOperationState,
        scissor: &Scissor,
        vertexes: &[Vertex]
    ) -> Result<()>; }

Required methods

fn edge_antialias(&self) -> bool

fn create_texture(
    &mut self,
    texture_type: TextureType,
    width: usize,
    height: usize,
    flags: ImageFlags,
    data: Option<&[u8]>
) -> Result<ImageId>

fn delete_texture(&mut self, handle: ImageId) -> Result<()>

fn update_texture(
    &mut self,
    handle: ImageId,
    x: usize,
    y: usize,
    width: usize,
    height: usize,
    data: &[u8]
) -> Result<()>

fn texture_size(&self, handle: ImageId) -> Result<(usize, usize)>

fn viewport(&mut self, extent: Extent, device_pixel_ratio: f32) -> Result<()>

fn cancel(&mut self) -> Result<()>

fn flush(&mut self) -> Result<()>

fn fill(
    &mut self,
    paint: &Paint,
    composite_operation: CompositeOperationState,
    scissor: &Scissor,
    fringe: f32,
    bounds: Bounds,
    paths: &[Path]
) -> Result<()>

fn stroke(
    &mut self,
    paint: &Paint,
    composite_operation: CompositeOperationState,
    scissor: &Scissor,
    fringe: f32,
    stroke_width: f32,
    paths: &[Path]
) -> Result<()>

fn triangles(
    &mut self,
    paint: &Paint,
    composite_operation: CompositeOperationState,
    scissor: &Scissor,
    vertexes: &[Vertex]
) -> Result<()>

Loading content...

Implementors

Loading content...