pub struct CornerRadii {
pub top_left: Property<Numeric>,
pub top_right: Property<Numeric>,
pub bottom_right: Property<Numeric>,
pub bottom_left: Property<Numeric>,
}Expand description
Corner radii, ordered clockwise from top-left.
Pax templates canonically use a list of one to four values such as
corner_radius=[12, 8, 4]. Lists expand using the same clockwise arity rules
as CSS border-radius; a uniform radius may elide the brackets as
corner_radius=12.
The zero-based positional (“magic index”) contract depends on list arity:
[all][top-left/bottom-right, top-right/bottom-left][top-left, top-right/bottom-left, bottom-right][top-left, top-right, bottom-right, bottom-left]
A contextual named object remains available as explicit longhand:
corner_radius={ top_left: 12 top_right: 8 bottom_right: 4 bottom_left: 2 }.
The fully type-qualified constructor also remains valid when explicit type
syntax is useful: corner_radius=CornerRadii { top_left: 12 top_right: 8 bottom_right: 4 bottom_left: 2 }.
Interpolation treats each radius independently; zero produces an angular corner.
Fields§
§top_left: Property<Numeric>Top-left corner radius.
top_right: Property<Numeric>Top-right corner radius.
bottom_right: Property<Numeric>Bottom-right corner radius.
bottom_left: Property<Numeric>Bottom-left corner radius.
Implementations§
Source§impl CornerRadii
impl CornerRadii
Sourcepub fn resolve_in_graph(&self) -> RoundedRectRadii
pub fn resolve_in_graph(&self) -> RoundedRectRadii
Resolves corner radii from the entered UI graph’s settled projections.
Source§impl CornerRadii
impl CornerRadii
Trait Implementations§
Source§impl Clone for CornerRadii
impl Clone for CornerRadii
Source§fn clone(&self) -> CornerRadii
fn clone(&self) -> CornerRadii
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl CoercionRules for CornerRadii
impl CoercionRules for CornerRadii
Source§fn try_coerce(value: PaxValue) -> Result<CornerRadii, String>
fn try_coerce(value: PaxValue) -> Result<CornerRadii, String>
value into Self.Source§fn allows_singleton_stack() -> bool
fn allows_singleton_stack() -> bool
Source§fn is_identity_roundtrip() -> bool
fn is_identity_roundtrip() -> bool
Self preserves the semantics of converting that clone
through ToPaxValue and back with try_coerce. Read moreSource§impl Debug for CornerRadii
impl Debug for CornerRadii
Source§impl Default for CornerRadii
impl Default for CornerRadii
Source§fn default() -> CornerRadii
fn default() -> CornerRadii
Source§impl<'de> Deserialize<'de> for CornerRadii
impl<'de> Deserialize<'de> for CornerRadii
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CornerRadii, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CornerRadii, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl HelperFunctions for CornerRadii
impl HelperFunctions for CornerRadii
Source§fn register_all_functions()
fn register_all_functions()
impl ImplToFromPaxAny for CornerRadii
Source§impl Interpolatable for CornerRadii
impl Interpolatable for CornerRadii
Source§fn interpolate(&self, other: &CornerRadii, t: f64) -> CornerRadii
fn interpolate(&self, other: &CornerRadii, t: f64) -> CornerRadii
Source§impl Into<RoundedRectRadii> for &CornerRadii
impl Into<RoundedRectRadii> for &CornerRadii
Source§fn into(self) -> RoundedRectRadii
fn into(self) -> RoundedRectRadii
Source§impl Serialize for CornerRadii
impl Serialize for CornerRadii
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl ToPaxValue for CornerRadii
impl ToPaxValue for CornerRadii
Source§fn to_pax_value(self) -> PaxValue
fn to_pax_value(self) -> PaxValue
PaxValue.Source§fn nested_properties(&self) -> Vec<UntypedProperty>
fn nested_properties(&self) -> Vec<UntypedProperty>
Source§fn to_pax_value_in_graph(self) -> PaxValuewhere
Self: Sized,
fn to_pax_value_in_graph(self) -> PaxValuewhere
Self: Sized,
Self::to_pax_value reads published value snapshots.Auto Trait Implementations§
impl Freeze for CornerRadii
impl RefUnwindSafe for CornerRadii
impl Send for CornerRadii
impl Sync for CornerRadii
impl Unpin for CornerRadii
impl UnsafeUnpin for CornerRadii
impl UnwindSafe for CornerRadii
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>,
impl<T> PropertyValue for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
Source§fn round_into(self) -> U
fn round_into(self) -> U
Source§impl<T> ToFromPaxAny for Twhere
T: ImplToFromPaxAny,
impl<T> ToFromPaxAny for Twhere
T: ImplToFromPaxAny,
Source§fn to_pax_any(self) -> PaxAny
fn to_pax_any(self) -> PaxAny
PaxAny.Source§fn from_pax_any(pax_any: PaxAny) -> Result<T, String>
fn from_pax_any(pax_any: PaxAny) -> Result<T, String>
PaxAny.