pub struct Painter { /* private fields */ }
Implementations§
Source§impl Painter
impl Painter
pub fn new(facade: &dyn Facade) -> Painter
pub fn max_texture_side(&self) -> usize
pub fn paint_and_update_textures<T: Surface>( &mut self, display: &Display<WindowSurface>, target: &mut T, pixels_per_point: f32, clipped_primitives: &[ClippedPrimitive], textures_delta: &TexturesDelta, )
Sourcepub fn paint_primitives<T: Surface>(
&mut self,
display: &Display<WindowSurface>,
target: &mut T,
pixels_per_point: f32,
clipped_primitives: &[ClippedPrimitive],
)
pub fn paint_primitives<T: Surface>( &mut self, display: &Display<WindowSurface>, target: &mut T, pixels_per_point: f32, clipped_primitives: &[ClippedPrimitive], )
Main entry-point for painting a frame.
You should call target.clear_color(..)
before
and target.finish()
after this.
pub fn set_texture( &mut self, facade: &dyn Facade, tex_id: TextureId, delta: &ImageDelta, )
pub fn free_texture(&mut self, tex_id: TextureId)
pub fn register_native_texture( &mut self, native: Rc<SrgbTexture2d>, options: TextureOptions, ) -> TextureId
pub fn replace_native_texture( &mut self, id: TextureId, replacing: Rc<SrgbTexture2d>, options: TextureOptions, )
Auto Trait Implementations§
impl !Freeze for Painter
impl !RefUnwindSafe for Painter
impl !Send for Painter
impl !Sync for Painter
impl Unpin for Painter
impl !UnwindSafe for Painter
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.