Skip to main content

RendererOutlineImage

Struct RendererOutlineImage 

Source
pub struct RendererOutlineImage<'a, PF: PixelFormat, P: ImageLinePattern> { /* private fields */ }
Expand description

Image-patterned outline renderer.

Port of C++ renderer_outline_image<BaseRenderer, ImagePattern>. Renders anti-aliased lines using an image pattern sampled along the stroke.

The generic parameter P is the image line pattern type (e.g., LineImagePattern<PatternFilterBilinearRgba> or LineImagePatternPow2<PatternFilterBilinearRgba>).

Implementations§

Source§

impl<'a, PF: PixelFormat, P: ImageLinePattern> RendererOutlineImage<'a, PF, P>
where PF::ColorType: Default + Clone + From<Rgba8>,

Source

pub fn new(ren: &'a mut RendererBase<PF>, pattern: &'a P) -> Self

Source

pub fn reset_clipping(&mut self)

Source

pub fn set_clip_box(&mut self, x1: f64, y1: f64, x2: f64, y2: f64)

Source

pub fn set_scale_x(&mut self, s: f64)

Source

pub fn scale_x(&self) -> f64

Source

pub fn set_start_x(&mut self, s: f64)

Source

pub fn start_x(&self) -> f64

Source

pub fn subpixel_width(&self) -> i32

Source

pub fn pattern_width(&self) -> i32

Source

pub fn width(&self) -> f64

Trait Implementations§

Source§

impl<'a, PF: PixelFormat, P: ImageLinePattern> OutlineAaRenderer for RendererOutlineImage<'a, PF, P>
where PF::ColorType: Default + Clone + From<Rgba8>,

Source§

fn accurate_join_only(&self) -> bool

Returns true if this renderer only supports accurate (miter) joins. Image pattern renderers return true; solid AA renderers return false.
Source§

fn line0(&mut self, _lp: &LineParameters)

Render a simple line segment (no join information).
Source§

fn line1(&mut self, _lp: &LineParameters, _sx: i32, _sy: i32)

Render a line segment with start join bisectrix.
Source§

fn line2(&mut self, _lp: &LineParameters, _ex: i32, _ey: i32)

Render a line segment with end join bisectrix.
Source§

fn line3(&mut self, lp: &LineParameters, sx: i32, sy: i32, ex: i32, ey: i32)

Render a line segment with both start and end join bisectrices.
Source§

fn semidot( &mut self, _cmp: fn(i32) -> bool, _xc1: i32, _yc1: i32, _xc2: i32, _yc2: i32, )

Render a semi-circular dot (for round caps).
Source§

fn pie(&mut self, _xc: i32, _yc: i32, _x1: i32, _y1: i32, _x2: i32, _y2: i32)

Render a pie slice (for round joins).

Auto Trait Implementations§

§

impl<'a, PF, P> Freeze for RendererOutlineImage<'a, PF, P>

§

impl<'a, PF, P> RefUnwindSafe for RendererOutlineImage<'a, PF, P>

§

impl<'a, PF, P> Send for RendererOutlineImage<'a, PF, P>
where P: Sync, PF: Send,

§

impl<'a, PF, P> Sync for RendererOutlineImage<'a, PF, P>
where P: Sync, PF: Sync,

§

impl<'a, PF, P> Unpin for RendererOutlineImage<'a, PF, P>

§

impl<'a, PF, P> !UnwindSafe for RendererOutlineImage<'a, PF, P>

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> 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<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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.