pub struct Shape {
pub shape: ShapeType,
pub text: Option<ShapeText>,
pub timing: TimingConfig,
pub style: CssStyle,
pub timeline: Vec<TimelineStep>,
pub stagger: Option<f32>,
pub fill: Option<Fill>,
pub stroke: Option<Stroke>,
pub draw_start: Option<Computed<f32>>,
pub path_morph: Option<PathMorph>,
}Fields§
§shape: ShapeType§text: Option<ShapeText>§timing: TimingConfig§style: CssStyle§timeline: Vec<TimelineStep>§stagger: Option<f32>§fill: Option<Fill>§stroke: Option<Stroke>§draw_start: Option<Computed<f32>>Where the visible stroke starts, as a fraction 0..1 of the path’s own
length — the counterpart to draw_progress, which only ever moves the
end. The visible segment is the path between draw_start and
draw_progress; a literal number or an = expr evaluated against
t/t_abs/duration/width/height/fps, the same scope
dash_offset reads. Has no effect unless draw_progress is also
animating (or has already finished, in which case the segment simply
erases from its tail) — matching hold on iris, this is a no-op by
itself. Applied only to stroke; ignored for fill.
path_morph: Option<PathMorph>Keyframes on the shape’s own path data (d), interpolated point by
point when every keyframe shares the same command structure. A
mismatched pair is reported on stderr and holds the earlier
keyframe’s shape rather than snapping — see
rustmotion_core::engine::renderer::interpolate_path_data. Overrides
shape entirely (for both fill and stroke) while present.
Trait Implementations§
Source§impl Animatable for Shape
impl Animatable for Shape
fn animation_effects(&self) -> &[AnimationEffect]
fn timeline_steps(&self) -> &[TimelineStep]
Source§impl<'de> Deserialize<'de> for Shape
impl<'de> Deserialize<'de> for Shape
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for Shape
impl JsonSchema for Shape
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreSource§impl Painter for Shape
impl Painter for Shape
fn paint_content( &self, canvas: &Canvas, layout: &BoxLayout, props: &AnimatedProperties, ctx: &PaintCtx, )
fn intrinsic_size( &self, _available: AvailableSize, _ctx: &MeasureCtx, ) -> Option<(f32, f32)>
Auto Trait Implementations§
impl Freeze for Shape
impl RefUnwindSafe for Shape
impl Send for Shape
impl Sync for Shape
impl Unpin for Shape
impl UnsafeUnpin for Shape
impl UnwindSafe for Shape
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more