pub struct ImageRounded<'ui> { /* private fields */ }
Expand description
Represents a image about to be drawn. Similar to Image
but
with corners rounded with a given radius
Implementations§
Source§impl<'ui> ImageRounded<'ui>
impl<'ui> ImageRounded<'ui>
Sourcepub fn new(
draw_list: &'ui DrawListMut<'_>,
texture_id: TextureId,
p_min: impl Into<Vector2<f32>>,
p_max: impl Into<Vector2<f32>>,
rounding: f32,
) -> ImageRounded<'ui>
pub fn new( draw_list: &'ui DrawListMut<'_>, texture_id: TextureId, p_min: impl Into<Vector2<f32>>, p_max: impl Into<Vector2<f32>>, rounding: f32, ) -> ImageRounded<'ui>
Typically constructed by DrawListMut::add_image_rounded
Sourcepub fn uv_min(self, uv_min: impl Into<Vector2<f32>>) -> ImageRounded<'ui>
pub fn uv_min(self, uv_min: impl Into<Vector2<f32>>) -> ImageRounded<'ui>
Set uv_min (default [0.0, 0.0]
)
Sourcepub fn uv_max(self, uv_max: impl Into<Vector2<f32>>) -> ImageRounded<'ui>
pub fn uv_max(self, uv_max: impl Into<Vector2<f32>>) -> ImageRounded<'ui>
Set uv_max (default [1.0, 1.0]
)
Sourcepub fn col<C>(self, col: C) -> ImageRounded<'ui>
pub fn col<C>(self, col: C) -> ImageRounded<'ui>
Set color tint (default: no tint/white [1.0, 1.0, 1.0, 1.0]
)
Sourcepub fn round_all(self, value: bool) -> ImageRounded<'ui>
pub fn round_all(self, value: bool) -> ImageRounded<'ui>
Set flag to indicate rounding on all all corners.
Sourcepub fn round_top_left(self, value: bool) -> ImageRounded<'ui>
pub fn round_top_left(self, value: bool) -> ImageRounded<'ui>
Set flag to indicate if image’s top-left corner will be rounded.
Sourcepub fn round_top_right(self, value: bool) -> ImageRounded<'ui>
pub fn round_top_right(self, value: bool) -> ImageRounded<'ui>
Set flag to indicate if image’s top-right corner will be rounded.
Sourcepub fn round_bot_left(self, value: bool) -> ImageRounded<'ui>
pub fn round_bot_left(self, value: bool) -> ImageRounded<'ui>
Set flag to indicate if image’s bottom-left corner will be rounded.
Sourcepub fn round_bot_right(self, value: bool) -> ImageRounded<'ui>
pub fn round_bot_right(self, value: bool) -> ImageRounded<'ui>
Set flag to indicate if image’s bottom-right corner will be rounded.
Auto Trait Implementations§
impl<'ui> Freeze for ImageRounded<'ui>
impl<'ui> !RefUnwindSafe for ImageRounded<'ui>
impl<'ui> !Send for ImageRounded<'ui>
impl<'ui> !Sync for ImageRounded<'ui>
impl<'ui> Unpin for ImageRounded<'ui>
impl<'ui> !UnwindSafe for ImageRounded<'ui>
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more