pub struct RendererOutlineAa<'a, PF: PixelFormat> { /* private fields */ }Expand description
Anti-aliased outline renderer.
Port of C++ renderer_outline_aa<BaseRenderer>.
Renders anti-aliased lines using a distance interpolation technique
with configurable width profile.
Implementations§
Source§impl<'a, PF: PixelFormat> RendererOutlineAa<'a, PF>
impl<'a, PF: PixelFormat> RendererOutlineAa<'a, PF>
pub fn new(ren: &'a mut RendererBase<PF>, profile: &'a LineProfileAa) -> Self
pub fn ren(&self) -> &RendererBase<PF>
pub fn set_color(&mut self, c: PF::ColorType)
pub fn color(&self) -> &PF::ColorType
pub fn subpixel_width(&self) -> i32
pub fn set_clip_box(&mut self, x1: f64, y1: f64, x2: f64, y2: f64)
pub fn reset_clipping(&mut self)
Sourcepub fn line0(&mut self, lp: &LineParameters)
pub fn line0(&mut self, lp: &LineParameters)
Render a simple line (no joins).
Sourcepub fn line1(&mut self, lp: &LineParameters, sx: i32, sy: i32)
pub fn line1(&mut self, lp: &LineParameters, sx: i32, sy: i32)
Render line with start join.
Sourcepub fn line2(&mut self, lp: &LineParameters, ex: i32, ey: i32)
pub fn line2(&mut self, lp: &LineParameters, ex: i32, ey: i32)
Render line with end join.
Sourcepub fn line3(&mut self, lp: &LineParameters, sx: i32, sy: i32, ex: i32, ey: i32)
pub fn line3(&mut self, lp: &LineParameters, sx: i32, sy: i32, ex: i32, ey: i32)
Render line with both joins.
Trait Implementations§
Source§impl<'a, PF: PixelFormat> OutlineAaRenderer for RendererOutlineAa<'a, PF>
impl<'a, PF: PixelFormat> OutlineAaRenderer for RendererOutlineAa<'a, PF>
Source§fn accurate_join_only(&self) -> bool
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)
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)
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)
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)
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.
Auto Trait Implementations§
impl<'a, PF> Freeze for RendererOutlineAa<'a, PF>
impl<'a, PF> RefUnwindSafe for RendererOutlineAa<'a, PF>
impl<'a, PF> Send for RendererOutlineAa<'a, PF>
impl<'a, PF> Sync for RendererOutlineAa<'a, PF>
impl<'a, PF> Unpin for RendererOutlineAa<'a, PF>
impl<'a, PF> !UnwindSafe for RendererOutlineAa<'a, PF>
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