Enum pango::Gravity [−][src]
#[non_exhaustive] pub enum Gravity { South, East, North, West, Auto, // some variants omitted }
Expand description
The Gravity
type represents the orientation of glyphs in a segment
of text. This is useful when rendering vertical text layouts. In
those situations, the layout is rotated using a non-identity PangoMatrix,
and then glyph orientation is controlled using Gravity
.
Not every value in this enumeration makes sense for every usage of
Gravity
; for example, Auto
only can be passed to
Context::set_base_gravity()
and can only be returned by
Context::base_gravity()
.
See also: GravityHint
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Glyphs stand upright (default)
Glyphs are rotated 90 degrees clockwise
Glyphs are upside-down
Glyphs are rotated 90 degrees counter-clockwise
Gravity is resolved from the context matrix
Implementations
pub fn for_script_and_width(
script: Script,
wide: bool,
base_gravity: Gravity,
hint: GravityHint
) -> Gravity
Trait Implementations
type Checker = GenericValueTypeChecker<Self>
type Checker = GenericValueTypeChecker<Self>
Value type checker.
Get the contained value from a Value
. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Returns the type identifier of Self
.
Auto Trait Implementations
impl RefUnwindSafe for Gravity
impl UnwindSafe for Gravity
Blanket Implementations
Mutably borrows from an owned value. Read more
Returns a SendValue
clone of self
.