Struct ComputedValues

Source
pub struct ComputedValues {
Show 69 fields baseline_shift: BaselineShift, clip_path: ClipPath, clip_rule: ClipRule, color: Color, color_interpolation_filters: ColorInterpolationFilters, cx: CX, cy: CY, direction: Direction, display: Display, dominant_baseline: DominantBaseline, 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, white_space: WhiteSpace, 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§dominant_baseline: DominantBaseline§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§white_space: WhiteSpace§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 dominant_baseline(&self) -> DominantBaseline

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 white_space(&self) -> WhiteSpace

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 duplicate 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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

Source§

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,

Source§

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>,

Source§

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>,

Source§

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

impl<T> ErasedDestructor for T
where T: 'static,