pub type LineWidth = Au;
Expand description
A computed value for -webkit-text-stroke-width.
Aliased Type§
struct LineWidth(pub i32);
Fields§
§0: i32
Implementations
Source§impl Au
impl Au
Sourcepub fn new(value: i32) -> Au
pub fn new(value: i32) -> Au
FIXME(pcwalton): Workaround for lack of cross crate inlining of newtype structs!
pub fn scale_by(self, factor: f32) -> Au
Sourcepub fn scale_by_trunc(self, factor: f32) -> Au
pub fn scale_by_trunc(self, factor: f32) -> Au
Scale, but truncate (useful for viewport-relative units)
pub fn from_f64_au(float: f64) -> Au
pub fn from_px(px: i32) -> Au
Sourcepub fn ceil_to_px(self) -> i32
pub fn ceil_to_px(self) -> i32
Ceil this app unit to the appropriate pixel boundary and return it.
pub fn to_nearest_px(self) -> i32
pub fn to_nearest_pixel(self, pixels_per_px: f32) -> f32
pub fn to_f32_px(self) -> f32
pub fn to_f64_px(self) -> f64
pub fn from_f32_px(px: f32) -> Au
pub fn from_f64_px(px: f64) -> Au
pub fn from_f32_px_trunc(px: f32) -> Au
pub fn from_f64_px_trunc(px: f64) -> Au
pub fn abs(self) -> Au
pub fn max_assign(&mut self, other: Au)
pub fn min_assign(&mut self, other: Au)
Trait Implementations
Source§impl AddAssign for Au
impl AddAssign for Au
Source§fn add_assign(&mut self, other: Au)
fn add_assign(&mut self, other: Au)
Performs the
+=
operation. Read moreSource§impl ComputeSquaredDistance for Au
impl ComputeSquaredDistance for Au
Source§fn compute_squared_distance(&self, other: &Self) -> Result<SquaredDistance, ()>
fn compute_squared_distance(&self, other: &Self) -> Result<SquaredDistance, ()>
Computes the squared distance between two animatable values.
Source§impl<'de> Deserialize<'de> for Au
impl<'de> Deserialize<'de> for Au
Source§fn deserialize<D>(
deserializer: D,
) -> Result<Au, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Au, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl DivAssign<i32> for Au
impl DivAssign<i32> for Au
Source§fn div_assign(&mut self, other: i32)
fn div_assign(&mut self, other: i32)
Performs the
/=
operation. Read moreSource§impl From<CSSPixelLength> for Au
impl From<CSSPixelLength> for Au
Source§fn from(len: CSSPixelLength) -> Self
fn from(len: CSSPixelLength) -> Self
Converts to this type from the input type.
Source§impl From<NonNegative<CSSPixelLength>> for Au
impl From<NonNegative<CSSPixelLength>> for Au
Source§fn from(non_negative_len: NonNegativeLength) -> Self
fn from(non_negative_len: NonNegativeLength) -> Self
Converts to this type from the input type.
Source§impl MallocSizeOf for Au
impl MallocSizeOf for Au
Source§fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Source§impl MulAssign<i32> for Au
impl MulAssign<i32> for Au
Source§fn mul_assign(&mut self, other: i32)
fn mul_assign(&mut self, other: i32)
Performs the
*=
operation. Read moreSource§impl Ord for Au
impl Ord for Au
Source§impl PartialOrd for Au
impl PartialOrd for Au
Source§impl Serialize for Au
impl Serialize for Au
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,
Serialize this value into the given Serde serializer. Read more
Source§impl SubAssign for Au
impl SubAssign for Au
Source§fn sub_assign(&mut self, other: Au)
fn sub_assign(&mut self, other: Au)
Performs the
-=
operation. Read moreSource§impl ToAnimatedValue for Au
impl ToAnimatedValue for Au
Source§type AnimatedValue = CSSPixelLength
type AnimatedValue = CSSPixelLength
The type of the animated value.
Source§fn to_animated_value(self, context: &Context<'_>) -> Self::AnimatedValue
fn to_animated_value(self, context: &Context<'_>) -> Self::AnimatedValue
Converts this value to an animated value.
Source§fn from_animated_value(animated: Self::AnimatedValue) -> Self
fn from_animated_value(animated: Self::AnimatedValue) -> Self
Converts back an animated value into a computed value.
Source§impl ToAnimatedZero for Au
impl ToAnimatedZero for Au
Source§fn to_animated_zero(&self) -> Result<Self, ()>
fn to_animated_zero(&self) -> Result<Self, ()>
Returns a value that, when added with an underlying value, will produce the underlying
value. This is used for SMIL animation’s “by-animation” where SMIL first interpolates from
the zero value to the ‘by’ value, and then adds the result to the underlying value. Read more
Source§impl ToResolvedValue for Au
impl ToResolvedValue for Au
Source§type ResolvedValue = CSSPixelLength
type ResolvedValue = CSSPixelLength
The resolved value type we’re going to be converted to.
Source§fn to_resolved_value(self, context: &Context<'_>) -> Self::ResolvedValue
fn to_resolved_value(self, context: &Context<'_>) -> Self::ResolvedValue
Convert a resolved value to a resolved value.
Source§fn from_resolved_value(resolved: Self::ResolvedValue) -> Self
fn from_resolved_value(resolved: Self::ResolvedValue) -> Self
Convert a resolved value to resolved value form.