Struct egui::widgets::ImageOptions
source · pub struct ImageOptions {
pub uv: Rect,
pub bg_fill: Color32,
pub tint: Color32,
pub rotation: Option<(Rot2, Vec2)>,
pub rounding: Rounding,
}
Fields§
§uv: Rect
Select UV range. Default is (0,0) in top-left, (1,1) bottom right.
bg_fill: Color32
A solid color to put behind the image. Useful for transparent images.
tint: Color32
Multiply image color with this. Default is WHITE (no tint).
rotation: Option<(Rot2, Vec2)>
Rotate the image about an origin by some angle
Positive angle is clockwise. Origin is a vector in normalized UV space ((0,0) in top-left, (1,1) bottom right).
To rotate about the center you can pass Vec2::splat(0.5)
as the origin.
Due to limitations in the current implementation, this will turn off rounding of the image.
rounding: Rounding
Round the corners of the image.
The default is no rounding (Rounding::ZERO
).
Due to limitations in the current implementation, this will turn off any rotation of the image.
Trait Implementations§
source§impl Clone for ImageOptions
impl Clone for ImageOptions
source§fn clone(&self) -> ImageOptions
fn clone(&self) -> ImageOptions
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ImageOptions
impl Debug for ImageOptions
Auto Trait Implementations§
impl Freeze for ImageOptions
impl RefUnwindSafe for ImageOptions
impl Send for ImageOptions
impl Sync for ImageOptions
impl Unpin for ImageOptions
impl UnwindSafe for ImageOptions
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)