pub struct Stroke {
pub color: String,
pub width: f32,
pub dashed: Option<Vec<f32>>,
pub dash_offset: Option<Computed<f32>>,
pub line_cap: LineCap,
pub line_join: LineJoin,
}Fields§
§color: String§width: f32§dashed: Option<Vec<f32>>skia_safe::PathEffect::dash interval list (on-length, off-length,
repeating) — the same spelling and shape arrow/connector/line
already use for their own dashed field. None (the default)
strokes solid, exactly as every Stroke did before this field
existed.
dash_offset: Option<Computed<f32>>Phase offset (px) into dashed’s pattern — skia_safe::PathEffect:: dash’s second argument, hardcoded to 0.0 on arrow/connector/
line today. A literal number is a constant phase; an "= ..."
expression (see crate::expr) is re-evaluated every frame against
the node’s crate::css::FrameClock ($t/$T/$duration/$W/
$H/$fps), the same per-frame mechanism CssStyle’s opacity/
width/height already use — this is what makes a dashed stroke’s
“draw-on” (dash length == path length, offset animating from the
full length down to 0) expressible without the engine’s classic
keyframe/easing AnimatedProperties pipeline.
line_cap: LineCapstroke-linecap. Default LineCap::Butt — skia’s own default, so
a stroke that never set this renders byte-identical to before this
field existed.
line_join: LineJoinstroke-linejoin. Default LineJoin::Miter — skia’s own default,
same backward-compatibility guarantee as line_cap above.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Stroke
impl<'de> Deserialize<'de> for Stroke
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 Stroke
impl JsonSchema for Stroke
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 moreAuto Trait Implementations§
impl Freeze for Stroke
impl RefUnwindSafe for Stroke
impl Send for Stroke
impl Sync for Stroke
impl Unpin for Stroke
impl UnsafeUnpin for Stroke
impl UnwindSafe for Stroke
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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