pub struct PaintCtx<'surface, Size> {
pub clip: Option<Region>,
/* private fields */
}Expand description
Paint context used by the widgets to paint. It works in local coordinates, translated to screen position.
Fields§
§clip: Option<Region>Implementations§
Source§impl<'screen> PaintCtx<'screen, SizePos>
impl<'screen> PaintCtx<'screen, SizePos>
pub fn to_unsized(&mut self) -> PaintCtx<'_, Unsized>
pub fn update(&mut self, new_size: Size, new_pos: Pos)
Sourcepub fn set_clip_region(&mut self, region: Region)
pub fn set_clip_region(&mut self, region: Region)
This will create an intersection with any previous regions
pub fn create_region(&self) -> Region
pub fn translate_to_global(&self, local: LocalPos) -> Option<Pos>
pub fn to_glyphs<'a>(&mut self, s: &'a str) -> Glyphs<'a>
pub fn place_glyphs( &mut self, glyphs: Glyphs<'_>, pos: LocalPos, ) -> Option<LocalPos>
pub fn set_style(&mut self, style: Style, pos: LocalPos)
pub fn set_attributes(&mut self, attrs: &Attributes<'_>, pos: LocalPos)
pub fn place_glyph( &mut self, glyph: Glyph, input_pos: LocalPos, ) -> Option<LocalPos>
Trait Implementations§
Auto Trait Implementations§
impl<'surface, Size> Freeze for PaintCtx<'surface, Size>where
Size: Freeze,
impl<'surface, Size> !RefUnwindSafe for PaintCtx<'surface, Size>
impl<'surface, Size> !Send for PaintCtx<'surface, Size>
impl<'surface, Size> !Sync for PaintCtx<'surface, Size>
impl<'surface, Size> Unpin for PaintCtx<'surface, Size>where
Size: Unpin,
impl<'surface, Size> UnsafeUnpin for PaintCtx<'surface, Size>where
Size: UnsafeUnpin,
impl<'surface, Size> !UnwindSafe for PaintCtx<'surface, Size>
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