pub enum TextAnchor {
Center,
Left,
Right,
Top,
Bottom,
TopLeft,
TopRight,
BottomLeft,
BottomRight,
}Expand description
Text anchor alignment (maps to MapLibre’s horizontal/vertical align).
Variants§
Center
Centered.
Left
Left-aligned.
Right
Right-aligned.
Top
Top-aligned.
Bottom
Bottom-aligned.
TopLeft
Top-left corner.
TopRight
Top-right corner.
BottomLeft
Bottom-left corner.
BottomRight
Bottom-right corner.
Implementations§
Source§impl TextAnchor
impl TextAnchor
Sourcepub fn horizontal_align(self) -> f32
pub fn horizontal_align(self) -> f32
Horizontal alignment factor: 0.0 = left, 0.5 = center, 1.0 = right.
Sourcepub fn vertical_align(self) -> f32
pub fn vertical_align(self) -> f32
Vertical alignment factor: 0.0 = top, 0.5 = center, 1.0 = bottom.
Trait Implementations§
Source§impl Clone for TextAnchor
impl Clone for TextAnchor
Source§fn clone(&self) -> TextAnchor
fn clone(&self) -> TextAnchor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TextAnchor
impl Debug for TextAnchor
Source§impl PartialEq for TextAnchor
impl PartialEq for TextAnchor
impl Copy for TextAnchor
impl StructuralPartialEq for TextAnchor
Auto Trait Implementations§
impl Freeze for TextAnchor
impl RefUnwindSafe for TextAnchor
impl Send for TextAnchor
impl Sync for TextAnchor
impl Unpin for TextAnchor
impl UnsafeUnpin for TextAnchor
impl UnwindSafe for TextAnchor
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
Mutably borrows from an owned value. Read more