pub struct Brush {
pub fill_texture_id: TextureId,
pub uv: Rect,
}
Expand description
Controls texturing of a crate::RectShape
.
Fields§
§fill_texture_id: TextureId
If the rect should be filled with a texture, which one?
The texture is multiplied with crate::RectShape::fill
.
uv: Rect
What UV coordinates to use for the texture?
To display a texture, set Self::fill_texture_id
,
and set this to Rect::from_min_max(pos2(0.0, 0.0), pos2(1.0, 1.0))
.
Use Rect::ZERO
to turn off texturing.
Trait Implementations§
impl Copy for Brush
impl Eq for Brush
impl StructuralPartialEq for Brush
Auto Trait Implementations§
impl Freeze for Brush
impl RefUnwindSafe for Brush
impl Send for Brush
impl Sync for Brush
impl Unpin for Brush
impl UnwindSafe for Brush
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