#[repr(i32)]pub enum TextLayoutRoundingPlacement {
Below = 0,
Above = 1,
}Expand description
Where a text block puts the height layout rounding adds to it: below its text (the reference’s placement, the default) or above it (WinUI’s).
Variants§
Below = 0
The text starts at the top of the block (after its padding); the added height is below it. The placement of the reference, and of the Fluent and Simple themes.
Above = 1
The added height is above the text, as WinUI’s TextBlock puts it: the text ends at the bottom of the rounded box. The placement of the WinUI theme.
Implementations§
Source§impl TextLayoutRoundingPlacement
impl TextLayoutRoundingPlacement
Sourcepub fn offset(self, height: f64, scale: f64) -> f64
pub fn offset(self, height: f64, scale: f64) -> f64
How far down a text block with layout rounding moves its text, in device-independent
pixels: height is the height of its content (the text and the vertical padding),
scale the layout scale. Zero for TextLayoutRoundingPlacement::Below, and for a
height that is a whole number of device pixels already.
Trait Implementations§
Source§impl Clone for TextLayoutRoundingPlacement
impl Clone for TextLayoutRoundingPlacement
impl Copy for TextLayoutRoundingPlacement
Source§impl Debug for TextLayoutRoundingPlacement
impl Debug for TextLayoutRoundingPlacement
impl Eq for TextLayoutRoundingPlacement
Source§impl Hash for TextLayoutRoundingPlacement
impl Hash for TextLayoutRoundingPlacement
Source§impl MarkupTyped for TextLayoutRoundingPlacement
impl MarkupTyped for TextLayoutRoundingPlacement
Source§const MARKUP: &'static MarkupType
const MARKUP: &'static MarkupType
The markup metadata of the type.
impl StructuralPartialEq for TextLayoutRoundingPlacement
Auto Trait Implementations§
impl Freeze for TextLayoutRoundingPlacement
impl RefUnwindSafe for TextLayoutRoundingPlacement
impl Send for TextLayoutRoundingPlacement
impl Sync for TextLayoutRoundingPlacement
impl Unpin for TextLayoutRoundingPlacement
impl UnsafeUnpin for TextLayoutRoundingPlacement
impl UnwindSafe for TextLayoutRoundingPlacement
Blanket Implementations§
Source§impl<T> AnyValue for Twhere
T: PartialEq + 'static,
impl<T> AnyValue for Twhere
T: PartialEq + 'static,
fn any_value_as_any(&self) -> &(dyn Any + 'static)
fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool
fn any_value_type_name(&self) -> &'static str
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
Mutably borrows from an owned value. Read more
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more