pub struct RasterizerSlClipInt { /* private fields */ }Expand description
Scanline rasterizer clipping policy that clips line segments against a viewport rectangle, then converts to 24.8 fixed-point coordinates.
Port of C++ rasterizer_sl_clip<ras_conv_int>.
Implementations§
Source§impl RasterizerSlClipInt
impl RasterizerSlClipInt
pub fn new() -> Self
Sourcepub fn reset_clipping(&mut self)
pub fn reset_clipping(&mut self)
Disable clipping.
Sourcepub fn clip_box(&mut self, x1: i32, y1: i32, x2: i32, y2: i32)
pub fn clip_box(&mut self, x1: i32, y1: i32, x2: i32, y2: i32)
Set the clipping rectangle in 24.8 fixed-point coordinates.
Sourcepub fn move_to_d(&mut self, x: f64, y: f64)
pub fn move_to_d(&mut self, x: f64, y: f64)
Record a move_to from double coordinates (upscales to 24.8).
Sourcepub fn line_to(&mut self, ras: &mut RasterizerCellsAa, x2: i32, y2: i32)
pub fn line_to(&mut self, ras: &mut RasterizerCellsAa, x2: i32, y2: i32)
Clip and emit a line segment to the cell rasterizer.
Implements the 13-case clipping switch from C++ line_to.
Sourcepub fn line_to_d(&mut self, ras: &mut RasterizerCellsAa, x: f64, y: f64)
pub fn line_to_d(&mut self, ras: &mut RasterizerCellsAa, x: f64, y: f64)
Emit a line_to from double coordinates (upscales to 24.8).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RasterizerSlClipInt
impl RefUnwindSafe for RasterizerSlClipInt
impl Send for RasterizerSlClipInt
impl Sync for RasterizerSlClipInt
impl Unpin for RasterizerSlClipInt
impl UnwindSafe for RasterizerSlClipInt
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