Struct ochre::Rasterizer [−][src]
Rasterizes paths.
Implementations
impl Rasterizer
[src]
pub fn new() -> Rasterizer
[src]
Initializes a new rasterizer.
pub fn move_to(&mut self, point: Vec2)
[src]
Begins a new path component starting at the given location.
pub fn line_to(&mut self, point: Vec2)
[src]
Adds a line segment to be rasterized.
pub fn command(&mut self, command: PathCmd)
[src]
Adds a PathCmd
to be rasterized.
pub fn fill(&mut self, path: &[PathCmd], transform: Transform)
[src]
Adds a path to be rasterized as a filled region, applying the given transform.
pub fn stroke(&mut self, path: &[PathCmd], width: f32, transform: Transform)
[src]
Adds a path to be rasterized as a stroke with the given width, applying the given transform.
pub fn finish<B: TileBuilder>(mut self: Self, builder: &mut B)
[src]
Rasterizes the accumulated path data, passing the results to the given
TileBuilder
. Consumes the rasterizer.
The path is rasterized to a set of 8×8 alpha mask tiles and n×8 solid interior spans.
Auto Trait Implementations
impl RefUnwindSafe for Rasterizer
[src]
impl Send for Rasterizer
[src]
impl Sync for Rasterizer
[src]
impl Unpin for Rasterizer
[src]
impl UnwindSafe for Rasterizer
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,