plushie/widget/image
Image widget builder.
Types
Crop rectangle for image cropping (integer pixel values).
pub type Crop {
Crop(x: Int, y: Int, width: Int, height: Int)
}
Constructors
-
Crop(x: Int, y: Int, width: Int, height: Int)
Option type for image properties.
pub type Opt {
Width(length.Length)
Height(length.Length)
ContentFit(content_fit.ContentFit)
Rotation(Float)
Opacity(Float)
BorderRadius(Float)
FilterMethod(filter_method.FilterMethod)
Expand(Bool)
Scale(Float)
CropOpt(Crop)
Alt(String)
Description(String)
Decorative(Bool)
A11y(a11y.A11y)
}
Constructors
-
Width(length.Length) -
Height(length.Length) -
ContentFit(content_fit.ContentFit) -
Rotation(Float) -
Opacity(Float) -
BorderRadius(Float) -
FilterMethod(filter_method.FilterMethod) -
Expand(Bool) -
Scale(Float) -
CropOpt(Crop) -
Alt(String) -
Description(String) -
Decorative(Bool) -
A11y(a11y.A11y)
Values
pub fn content_fit(
img: Image,
cf: content_fit.ContentFit,
) -> Image
Set how content is fitted within the widget bounds.
pub fn filter_method(
img: Image,
f: filter_method.FilterMethod,
) -> Image
Set the image filter method.
pub fn height_animated(
img: Image,
animation: node.PropValue,
) -> Image
Set height to an animation descriptor (Transition, Spring, or Sequence).
The descriptor must be pre-encoded via its module’s encode function.
pub fn opacity_animated(
img: Image,
animation: node.PropValue,
) -> Image
Set opacity to an animation descriptor (Transition, Spring, or Sequence).
The descriptor must be pre-encoded via its module’s encode function.
pub fn rotation_animated(
img: Image,
animation: node.PropValue,
) -> Image
Set rotation to an animation descriptor (Transition, Spring, or Sequence).
The descriptor must be pre-encoded via its module’s encode function.
pub fn width_animated(
img: Image,
animation: node.PropValue,
) -> Image
Set width to an animation descriptor (Transition, Spring, or Sequence).
The descriptor must be pre-encoded via its module’s encode function.