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§
Source§impl<'de> Deserialize<'de> for Brush
impl<'de> Deserialize<'de> for Brush
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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