pub struct ComputedValues {
Show 67 fields baseline_shift: BaselineShift, clip_path: ClipPath, clip_rule: ClipRule, color: Color, color_interpolation_filters: ColorInterpolationFilters, cx: CX, cy: CY, direction: Direction, display: Display, enable_background: EnableBackground, fill: Fill, fill_opacity: FillOpacity, fill_rule: FillRule, filter: Filter, flood_color: FloodColor, flood_opacity: FloodOpacity, font_family: FontFamily, font_size: FontSize, font_stretch: FontStretch, font_style: FontStyle, font_variant: FontVariant, font_weight: FontWeight, glyph_orientation_vertical: GlyphOrientationVertical, height: Height, image_rendering: ImageRendering, letter_spacing: LetterSpacing, lighting_color: LightingColor, marker_end: MarkerEnd, marker_mid: MarkerMid, marker_start: MarkerStart, mask: Mask, opacity: Opacity, overflow: Overflow, r: R, rx: RX, ry: RY, shape_rendering: ShapeRendering, stop_color: StopColor, stop_opacity: StopOpacity, stroke: Stroke, stroke_dasharray: StrokeDasharray, stroke_dashoffset: StrokeDashoffset, stroke_line_cap: StrokeLinecap, stroke_line_join: StrokeLinejoin, stroke_miterlimit: StrokeMiterlimit, stroke_opacity: StrokeOpacity, stroke_width: StrokeWidth, text_anchor: TextAnchor, text_decoration: TextDecoration, text_rendering: TextRendering, transform_property: TransformProperty, unicode_bidi: UnicodeBidi, visibility: Visibility, width: Width, writing_mode: WritingMode, x: X, y: Y, isolation: Isolation, line_height: LineHeight, mask_type: MaskType, mix_blend_mode: MixBlendMode, paint_order: PaintOrder, text_orientation: TextOrientation, vector_effect: VectorEffect, xml_lang: XmlLang, xml_space: XmlSpace, transform: Transform,
}
Expand description

Holds the computed values for the CSS properties of an element.

Fields§

§baseline_shift: BaselineShift§clip_path: ClipPath§clip_rule: ClipRule§color: Color§color_interpolation_filters: ColorInterpolationFilters§cx: CX§cy: CY§direction: Direction§display: Display§enable_background: EnableBackground§fill: Fill§fill_opacity: FillOpacity§fill_rule: FillRule§filter: Filter§flood_color: FloodColor§flood_opacity: FloodOpacity§font_family: FontFamily§font_size: FontSize§font_stretch: FontStretch§font_style: FontStyle§font_variant: FontVariant§font_weight: FontWeight§glyph_orientation_vertical: GlyphOrientationVertical§height: Height§image_rendering: ImageRendering§letter_spacing: LetterSpacing§lighting_color: LightingColor§marker_end: MarkerEnd§marker_mid: MarkerMid§marker_start: MarkerStart§mask: Mask§opacity: Opacity§overflow: Overflow§r: R§rx: RX§ry: RY§shape_rendering: ShapeRendering§stop_color: StopColor§stop_opacity: StopOpacity§stroke: Stroke§stroke_dasharray: StrokeDasharray§stroke_dashoffset: StrokeDashoffset§stroke_line_cap: StrokeLinecap§stroke_line_join: StrokeLinejoin§stroke_miterlimit: StrokeMiterlimit§stroke_opacity: StrokeOpacity§stroke_width: StrokeWidth§text_anchor: TextAnchor§text_decoration: TextDecoration§text_rendering: TextRendering§transform_property: TransformProperty§unicode_bidi: UnicodeBidi§visibility: Visibility§width: Width§writing_mode: WritingMode§x: X§y: Y§isolation: Isolation§line_height: LineHeight§mask_type: MaskType§mix_blend_mode: MixBlendMode§paint_order: PaintOrder§text_orientation: TextOrientation§vector_effect: VectorEffect§xml_lang: XmlLang§xml_space: XmlSpace§transform: Transform

Implementations§

source§

impl ComputedValues

source

pub fn transform(&self) -> Transform

source

pub fn is_overflow(&self) -> bool

source

pub fn is_displayed(&self) -> bool

Whether we should draw the element or skip both space allocation and drawing. https://www.w3.org/TR/SVG2/render.html#VisibilityControl

source

pub fn is_visible(&self) -> bool

Whether we should draw the element or allocate its space but skip drawing. https://www.w3.org/TR/SVG2/render.html#VisibilityControl

source§

impl ComputedValues

source

pub fn baseline_shift(&self) -> BaselineShift

source

pub fn clip_path(&self) -> ClipPath

source

pub fn clip_rule(&self) -> ClipRule

source

pub fn color(&self) -> Color

source

pub fn color_interpolation_filters(&self) -> ColorInterpolationFilters

source

pub fn cx(&self) -> CX

source

pub fn cy(&self) -> CY

source

pub fn direction(&self) -> Direction

source

pub fn display(&self) -> Display

source

pub fn enable_background(&self) -> EnableBackground

source

pub fn fill(&self) -> Fill

source

pub fn fill_opacity(&self) -> FillOpacity

source

pub fn fill_rule(&self) -> FillRule

source

pub fn filter(&self) -> Filter

source

pub fn flood_color(&self) -> FloodColor

source

pub fn flood_opacity(&self) -> FloodOpacity

source

pub fn font_family(&self) -> FontFamily

source

pub fn font_size(&self) -> FontSize

source

pub fn font_stretch(&self) -> FontStretch

source

pub fn font_style(&self) -> FontStyle

source

pub fn font_variant(&self) -> FontVariant

source

pub fn font_weight(&self) -> FontWeight

source

pub fn glyph_orientation_vertical(&self) -> GlyphOrientationVertical

source

pub fn height(&self) -> Height

source

pub fn image_rendering(&self) -> ImageRendering

source

pub fn letter_spacing(&self) -> LetterSpacing

source

pub fn lighting_color(&self) -> LightingColor

source

pub fn marker_end(&self) -> MarkerEnd

source

pub fn marker_mid(&self) -> MarkerMid

source

pub fn marker_start(&self) -> MarkerStart

source

pub fn mask(&self) -> Mask

source

pub fn opacity(&self) -> Opacity

source

pub fn overflow(&self) -> Overflow

source

pub fn r(&self) -> R

source

pub fn rx(&self) -> RX

source

pub fn ry(&self) -> RY

source

pub fn shape_rendering(&self) -> ShapeRendering

source

pub fn stop_color(&self) -> StopColor

source

pub fn stop_opacity(&self) -> StopOpacity

source

pub fn stroke(&self) -> Stroke

source

pub fn stroke_dasharray(&self) -> StrokeDasharray

source

pub fn stroke_dashoffset(&self) -> StrokeDashoffset

source

pub fn stroke_line_cap(&self) -> StrokeLinecap

source

pub fn stroke_line_join(&self) -> StrokeLinejoin

source

pub fn stroke_miterlimit(&self) -> StrokeMiterlimit

source

pub fn stroke_opacity(&self) -> StrokeOpacity

source

pub fn stroke_width(&self) -> StrokeWidth

source

pub fn text_anchor(&self) -> TextAnchor

source

pub fn text_decoration(&self) -> TextDecoration

source

pub fn text_rendering(&self) -> TextRendering

source

pub fn transform_property(&self) -> TransformProperty

source

pub fn unicode_bidi(&self) -> UnicodeBidi

source

pub fn visibility(&self) -> Visibility

source

pub fn width(&self) -> Width

source

pub fn writing_mode(&self) -> WritingMode

source

pub fn x(&self) -> X

source

pub fn y(&self) -> Y

source

pub fn isolation(&self) -> Isolation

source

pub fn line_height(&self) -> LineHeight

source

pub fn mask_type(&self) -> MaskType

source

pub fn mix_blend_mode(&self) -> MixBlendMode

source

pub fn paint_order(&self) -> PaintOrder

source

pub fn text_orientation(&self) -> TextOrientation

source

pub fn vector_effect(&self) -> VectorEffect

source

pub fn xml_lang(&self) -> XmlLang

source

pub fn xml_space(&self) -> XmlSpace

source

fn set_value(&mut self, computed: ComputedValue)

source

fn get_value(&self, id: PropertyId) -> ComputedValue

Trait Implementations§

source§

impl Clone for ComputedValues

source§

fn clone(&self) -> ComputedValues

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ComputedValues

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for ComputedValues

source§

fn default() -> ComputedValues

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.