pub enum BaselineShift {
Baseline,
Sub,
Super,
Top,
Center,
Bottom,
Percentage(Percentage),
Length(LengthValue),
}Expand description
The baseline-shift attribute allows repositioning of the dominant-baseline relative to the dominant-baseline of the parent text content element.
Variants§
Baseline
A length value raises (positive value) or lowers (negative value) the dominant-baseline of the parent text content element by the specified length.
A percentage value raises (positive value) or lowers (negative value) the dominant-baseline of the parent text content element by the specified percentage of the line-height.
Sub
The dominant-baseline is shifted to the default position for subscripts.
Super
The dominant-baseline is shifted to the default position for superscripts.
Top
Align the top edge if the inline box with the top edge of the parent box
Center
Align the centre if the inline box with the centre of the parent box
Bottom
Align the bottom edge if the inline box with the bottom edge of the parent box
Percentage(Percentage)
Raise or lower by a percentage relative to the line-height
Length(LengthValue)
Raise or lower by a specified length
Trait Implementations§
Source§impl Clone for BaselineShift
impl Clone for BaselineShift
Source§fn clone(&self) -> BaselineShift
fn clone(&self) -> BaselineShift
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BaselineShift
impl Debug for BaselineShift
Source§impl<'input> Parse<'input> for BaselineShift
Available on crate feature parse only.
impl<'input> Parse<'input> for BaselineShift
parse only.Source§impl PartialEq for BaselineShift
impl PartialEq for BaselineShift
impl StructuralPartialEq for BaselineShift
Source§impl ToValue for BaselineShift
Available on crate feature serialize only.
impl ToValue for BaselineShift
serialize only.Source§fn write_value<W>(
&self,
dest: &mut Printer<'_, '_, W>,
) -> Result<(), PrinterError>where
W: Write,
fn write_value<W>(
&self,
dest: &mut Printer<'_, '_, W>,
) -> Result<(), PrinterError>where
W: Write,
Source§fn to_value_string(
&self,
options: PrinterOptions<'_>,
) -> Result<String, Error<PrinterErrorKind>>
fn to_value_string( &self, options: PrinterOptions<'_>, ) -> Result<String, Error<PrinterErrorKind>>
self into SVG content and return a string Read moreAuto Trait Implementations§
impl Freeze for BaselineShift
impl RefUnwindSafe for BaselineShift
impl Send for BaselineShift
impl Sync for BaselineShift
impl Unpin for BaselineShift
impl UnsafeUnpin for BaselineShift
impl UnwindSafe for BaselineShift
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,
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