#[non_exhaustive]pub enum SceneNode {
Show 15 variants
Rect {
rect: Rect,
brush: Brush,
radius: [f32; 4],
},
Border {
rect: Rect,
color: Color,
width: f32,
radius: [f32; 4],
},
Text {
rect: Rect,
text: Arc<str>,
color: Color,
size: f32,
font_family: Option<&'static str>,
text_align: TextAlign,
font_weight: FontWeight,
font_style: FontStyle,
text_decoration: TextDecoration,
letter_spacing: f32,
line_height: f32,
},
Ellipse {
rect: Rect,
brush: Brush,
},
EllipseBorder {
rect: Rect,
color: Color,
width: f32,
},
PushClip {
rect: Rect,
radius: [f32; 4],
},
PopClip,
PushTransform {
transform: Transform,
},
PopTransform,
Image {
rect: Rect,
handle: ImageHandle,
tint: Color,
fit: ImageFit,
},
Shadow {
rect: Rect,
radius: [f32; 4],
elevation: f32,
color: Color,
},
BeginLayer {
rect: Rect,
layer_id: u32,
alpha: f32,
blur_radius_x: f32,
blur_radius_y: f32,
rectangle_edge: bool,
},
EndLayer {
layer_id: u32,
},
CompositeShadow {
layer_id: u32,
blur_px: f32,
offset_px: (f32, f32),
color: Color,
},
Arc {
rect: Rect,
start_angle: f32,
sweep_angle: f32,
stroke_width: f32,
color: Color,
cap: StrokeCap,
},
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Rect
Border
Text
Ellipse
EllipseBorder
PushClip
PopClip
PushTransform
PopTransform
Image
Shadow
Shadow behind a rounded rect, typically driven by StateElevation.
The elevation field controls offset and alpha.
BeginLayer
Mark the start of a graphics layer: the contained subtree is rendered
into an offscreen texture and then composited back into the parent.
alpha is the group-compositing alpha applied at composite time.
blur_radius_x / blur_radius_y are the gaussian blur radii in pixels
applied to the layer before compositing (0.0 = no blur on that axis).
rectangle_edge when true means clamp edge pixels (Rectangle treatment);
when false, out-of-bounds samples are transparent (Unbounded).
Fields
EndLayer
Closes the graphics layer opened by the matching BeginLayer.
CompositeShadow
Draws a blurred drop shadow underneath a previously-rendered layer.
Emitted between EndLayer and the layer’s CompositeLayer. The
quad samples the layer’s texture with a 3x3 Gaussian blur and an
optional vertical offset.
Arc
Arc stroke