pub struct Image {
pub image: ImageHandle,
pub intrinsic: Option<Size<f32>>,
pub fit: ImageFit,
pub sampling: ImageSampling,
pub opacity: f32,
pub colorize: Option<Color>,
pub nine_slice: Option<NineSlice>,
pub horizontal_tiling: ImageTiling,
pub vertical_tiling: ImageTiling,
}Expand description
image drawn into a layout area
Fields§
§image: ImageHandle§intrinsic: Option<Size<f32>>§fit: ImageFit§sampling: ImageSampling§opacity: f32§colorize: Option<Color>§nine_slice: Option<NineSlice>§horizontal_tiling: ImageTiling§vertical_tiling: ImageTilingImplementations§
Source§impl Image
impl Image
Sourcepub fn new(image: impl Into<ImageHandle>) -> Self
pub fn new(image: impl Into<ImageHandle>) -> Self
creates a new Image
Sourcepub fn image(self, value: impl Into<ImageHandle>) -> Self
pub fn image(self, value: impl Into<ImageHandle>) -> Self
sets Self::image
Sourcepub fn sampling(self, value: ImageSampling) -> Self
pub fn sampling(self, value: ImageSampling) -> Self
sets Self::sampling
Sourcepub fn opacity(self, value: f32) -> Self
pub fn opacity(self, value: f32) -> Self
sets Self::opacity
Sourcepub fn colorize(self, value: Option<Color>) -> Self
pub fn colorize(self, value: Option<Color>) -> Self
sets Self::colorize
Sourcepub fn nine_slice(self, value: Option<NineSlice>) -> Self
pub fn nine_slice(self, value: Option<NineSlice>) -> Self
sets Self::nine_slice
Sourcepub fn horizontal_tiling(self, value: ImageTiling) -> Self
pub fn horizontal_tiling(self, value: ImageTiling) -> Self
Sourcepub fn vertical_tiling(self, value: ImageTiling) -> Self
pub fn vertical_tiling(self, value: ImageTiling) -> Self
Source§impl Image
impl Image
Sourcepub fn for_each_patch(
&self,
area: LogicalRect,
scale_factor: f32,
emit: impl FnMut(ImagePatch),
)
pub fn for_each_patch( &self, area: LogicalRect, scale_factor: f32, emit: impl FnMut(ImagePatch), )
resolves image fit and slicing into patches for renderer backends
Trait Implementations§
impl StructuralPartialEq for Image
Auto Trait Implementations§
impl !Send for Image
impl !Sync for Image
impl Forget for Image
impl Freeze for Image
impl Move for Image
impl RefUnwindSafe for Imagewhere
Rc<ImageInner>: RefUnwindSafe,
impl Unpin for Image
impl UnsafeUnpin for Imagewhere
*const RcInner<ImageInner> is !null: UnsafeUnpin,
PhantomData<RcInner<ImageInner>>: UnsafeUnpin,
impl UnwindSafe for Imagewhere
Rc<ImageInner>: UnwindSafe,
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