pub enum Command {
Show 22 variants
DrawRect {
rect: Rect,
brush: Brush,
z: i32,
transform: Transform2D,
},
DrawRoundedRect {
rrect: RoundedRect,
brush: Brush,
z: i32,
transform: Transform2D,
},
StrokeRect {
rect: Rect,
stroke: Stroke,
brush: Brush,
z: i32,
transform: Transform2D,
},
StrokeRoundedRect {
rrect: RoundedRect,
stroke: Stroke,
brush: Brush,
z: i32,
transform: Transform2D,
},
DrawText {
run: TextRun,
z: i32,
transform: Transform2D,
id: u64,
dynamic: bool,
},
DrawEllipse {
center: [f32; 2],
radii: [f32; 2],
brush: Brush,
z: i32,
transform: Transform2D,
},
FillPath {
path: Path,
color: ColorLinPremul,
z: i32,
transform: Transform2D,
},
StrokePath {
path: Path,
stroke: Stroke,
color: ColorLinPremul,
z: i32,
transform: Transform2D,
},
BoxShadow {
rrect: RoundedRect,
spec: BoxShadowSpec,
z: i32,
transform: Transform2D,
},
HitRegionRect {
id: u32,
rect: Rect,
z: i32,
transform: Transform2D,
},
HitRegionRoundedRect {
id: u32,
rrect: RoundedRect,
z: i32,
transform: Transform2D,
},
HitRegionEllipse {
id: u32,
center: [f32; 2],
radii: [f32; 2],
z: i32,
transform: Transform2D,
},
DrawSvg {
path: PathBuf,
origin: [f32; 2],
max_size: [f32; 2],
z: i32,
transform: Transform2D,
},
DrawImage {
path: PathBuf,
origin: [f32; 2],
size: [f32; 2],
z: i32,
transform: Transform2D,
},
DrawHyperlink {
hyperlink: Hyperlink,
z: i32,
transform: Transform2D,
id: u64,
},
PushClip(ClipRect),
PopClip,
PushTransform(Transform2D),
PopTransform,
PushOpacity(f32),
PopOpacity,
DrawExternalTexture {
rect: Rect,
texture_id: ExternalTextureId,
z: i32,
transform: Transform2D,
opacity: f32,
premultiplied: bool,
},
}Variants§
DrawRect
DrawRoundedRect
StrokeRect
StrokeRoundedRect
DrawText
DrawEllipse
FillPath
Filled path (solid color only for now)
StrokePath
Stroked path (width only; round join/cap for now)
BoxShadow
Box shadow for a rounded rectangle. This is handled by a dedicated pass in PassManager, not by the generic solid fill pipeline.
HitRegionRect
Hit-only regions that do not render. Useful for scene-surface hits or custom zones.
HitRegionRoundedRect
HitRegionEllipse
DrawSvg
SVG draw at a pixel origin with a max pixel size. The path is interpreted relative to the process working directory.
DrawImage
Raster image draw (PNG/JPEG/GIF/WebP) at a pixel origin with a given size. The path is interpreted relative to the process working directory.
DrawHyperlink
Hyperlink with text, optional underline, and click target.
Fields
transform: Transform2DPushClip(ClipRect)
PopClip
PushTransform(Transform2D)
PopTransform
PushOpacity(f32)
Push a CSS-style group opacity for descendant draw commands.
Commands between PushOpacity and PopOpacity are composited to an
intermediate layer, then blended back once with this opacity.
PopOpacity
DrawExternalTexture
Blit an externally-rendered texture (e.g., 3D viewport) into the scene.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
Blanket Implementations§
Source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
Source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
Source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
Source§impl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
impl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
Source§fn arrays_from(colors: C) -> T
fn arrays_from(colors: C) -> T
Source§impl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
impl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
Source§fn arrays_into(self) -> C
fn arrays_into(self) -> C
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
Source§impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
Source§type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
parameters when converting.Source§fn cam16_into_unclamped(
self,
parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>,
) -> T
fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>, ) -> T
self into C, using the provided parameters.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
impl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
Source§fn components_from(colors: C) -> T
fn components_from(colors: C) -> T
Source§impl<T> FromAngle<T> for T
impl<T> FromAngle<T> for T
Source§fn from_angle(angle: T) -> T
fn from_angle(angle: T) -> T
angle.Source§impl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
impl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
Source§fn from_stimulus(other: U) -> T
fn from_stimulus(other: U) -> T
other into Self, while performing the appropriate scaling,
rounding and clamping.Source§impl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
impl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
Source§fn into_angle(self) -> U
fn into_angle(self) -> U
T.Source§impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
Source§type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
parameters when converting.Source§fn into_cam16_unclamped(
self,
parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>,
) -> T
fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>, ) -> T
self into C, using the provided parameters.Source§impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
Source§fn into_color(self) -> U
fn into_color(self) -> U
Source§impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
Source§fn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
Source§impl<T> IntoStimulus<T> for T
impl<T> IntoStimulus<T> for T
Source§fn into_stimulus(self) -> T
fn into_stimulus(self) -> T
self into T, while performing the appropriate scaling,
rounding and clamping.Source§impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
Source§type Error = <C as TryFromComponents<T>>::Error
type Error = <C as TryFromComponents<T>>::Error
try_into_colors fails to cast.Source§fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
Source§impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
Source§fn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
OutOfBounds error is returned which contains
the unclamped color. Read more