pub struct ShapeRasterizer {
cache: HashMap<(u64, u32, u32, u32), Arc<Frame>>,
cov: Vec<f32>,
path: Path,
edges: Vec<Edge>,
active: Vec<usize>,
xs: Vec<(f32, i32)>,
outline: Vec<[f32; 2]>,
}Fields§
§cache: HashMap<(u64, u32, u32, u32), Arc<Frame>>§cov: Vec<f32>Scratch: one coverage buffer, one polygon soup, one edge table, one outline.
path: Path§edges: Vec<Edge>§active: Vec<usize>§xs: Vec<(f32, i32)>§outline: Vec<[f32; 2]>Implementations§
Source§impl ShapeRasterizer
impl ShapeRasterizer
pub fn new() -> Self
Sourcepub fn size(style: &ShapeStyle, t: f64) -> (f32, f32)
pub fn size(style: &ShapeStyle, t: f64) -> (f32, f32)
Layer size in project px for a style at clip-local time t (before scale).
Sourcepub fn render(&mut self, style: &ShapeStyle, scale: f32, t: f64) -> Arc<Frame>
pub fn render(&mut self, style: &ShapeStyle, scale: f32, t: f64) -> Arc<Frame>
Rasterise at scale (canvas px per project px) for clip-local time t.
fn rasterize( &mut self, style: &ShapeStyle, s: f32, t: f64, lw: u32, lh: u32, bucket: u32, ) -> Frame
Trait Implementations§
Source§impl Default for ShapeRasterizer
impl Default for ShapeRasterizer
Source§fn default() -> ShapeRasterizer
fn default() -> ShapeRasterizer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ShapeRasterizer
impl RefUnwindSafe for ShapeRasterizer
impl Send for ShapeRasterizer
impl Sync for ShapeRasterizer
impl Unpin for ShapeRasterizer
impl UnwindSafe for ShapeRasterizer
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
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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