Image
struct · ferroui-controls · v0.5.0
struct Image
Displays an IImage.
Members
TYPEto_refsource_propertyblend_mode_propertystretch_propertystretch_direction_propertyconstructget_alpha_masknewsourceset_sourceblend_modeset_blend_modestretchset_stretchstretch_directionset_stretch_direction
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<Image>
Returns a strong reference to this object.
source_property
fn source_property() -> &'static StyledProperty<Option<Rc<dyn IImage>>>
Defines the Source property.
blend_mode_property
fn blend_mode_property() -> &'static StyledProperty<BitmapBlendingMode>
Defines the BlendMode property.
stretch_property
fn stretch_property() -> &'static StyledProperty<Stretch>
Defines the Stretch property.
stretch_direction_property
fn stretch_direction_property() -> &'static StyledProperty<StretchDirection>
Defines the StretchDirection property.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
get_alpha_mask
fn get_alpha_mask(self: &Self) -> Option<Rc<CompositionBrush>>
Image.GetAlphaMask: a composition brush that shows the alpha of the
image as it is drawn (its source, stretched and placed), for the
Mask of a DropShadow
or another composition effect. The same brush is returned on every
call; it follows the image as it is drawn again (its source, stretch,
size and visibility). None when no compositor is available.
See AlphaMask for how the mask is drawn.
new
fn new() -> Ref<Self>
source
fn source(self: &Self) -> Option<Rc<dyn IImage>>
Gets the image that will be displayed.
set_source
fn set_source(self: &Self, value: Option<Rc<dyn IImage>>)
Sets the image that will be displayed.
blend_mode
fn blend_mode(self: &Self) -> BitmapBlendingMode
Gets the blend mode for the image.
set_blend_mode
fn set_blend_mode(self: &Self, value: BitmapBlendingMode)
Sets the blend mode for the image.
stretch
fn stretch(self: &Self) -> Stretch
Gets a value controlling how the image will be stretched.
set_stretch
fn set_stretch(self: &Self, value: Stretch)
Sets a value controlling how the image will be stretched.
stretch_direction
fn stretch_direction(self: &Self) -> StretchDirection
Gets a value controlling in what direction the image will be stretched.
set_stretch_direction
fn set_stretch_direction(self: &Self, value: StretchDirection)
Sets a value controlling in what direction the image will be stretched.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeControlImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherDerefUpcast<T>Upcast<Image>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleStyledElementImplInteractiveImplInputElementImplControlImplFerroObjectImplVisualImplLayoutableImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.