pub struct RendererMclip<PF: PixelFormat> { /* private fields */ }Expand description
Renderer that supports multiple independent clipping rectangles.
Port of C++ renderer_mclip<PixelFormat>.
Each rendering call is automatically repeated for every clip box.
Implementations§
Source§impl<PF: PixelFormat> RendererMclip<PF>
impl<PF: PixelFormat> RendererMclip<PF>
pub fn new(ren: RendererBase<PF>) -> Self
pub fn ren(&self) -> &RendererBase<PF>
pub fn ren_mut(&mut self) -> &mut RendererBase<PF>
Sourcepub fn add_clip_box(&mut self, x1: i32, y1: i32, x2: i32, y2: i32)
pub fn add_clip_box(&mut self, x1: i32, y1: i32, x2: i32, y2: i32)
Add a clip box. The box is normalized and clipped to the buffer bounds.
Sourcepub fn reset_clipping(&mut self, visibility: bool)
pub fn reset_clipping(&mut self, visibility: bool)
Reset clipping. If visibility is true, adds the full buffer as a clip box.
pub fn bounding_clip_box(&self) -> &RectI
pub fn clip_box_count(&self) -> usize
pub fn copy_pixel(&mut self, x: i32, y: i32, c: &PF::ColorType)
pub fn blend_pixel( &mut self, x: i32, y: i32, c: &PF::ColorType, cover: CoverType, )
pub fn pixel(&self, x: i32, y: i32) -> PF::ColorType
pub fn copy_hline(&mut self, x1: i32, y: i32, x2: i32, c: &PF::ColorType)
pub fn blend_hline( &mut self, x1: i32, y: i32, x2: i32, c: &PF::ColorType, cover: CoverType, )
pub fn blend_vline( &mut self, x: i32, y1: i32, y2: i32, c: &PF::ColorType, cover: CoverType, )
pub fn blend_solid_hspan( &mut self, x: i32, y: i32, len: i32, c: &PF::ColorType, covers: &[CoverType], )
pub fn blend_color_hspan( &mut self, x: i32, y: i32, len: i32, colors: &[PF::ColorType], covers: &[CoverType], cover: CoverType, )
Auto Trait Implementations§
impl<PF> Freeze for RendererMclip<PF>where
PF: Freeze,
impl<PF> RefUnwindSafe for RendererMclip<PF>where
PF: RefUnwindSafe,
impl<PF> Send for RendererMclip<PF>where
PF: Send,
impl<PF> Sync for RendererMclip<PF>where
PF: Sync,
impl<PF> Unpin for RendererMclip<PF>where
PF: Unpin,
impl<PF> UnwindSafe for RendererMclip<PF>where
PF: UnwindSafe,
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