Gravity
Description:
[ CCode ( cprefix = "PANGO_GRAVITY_" , type_id = "pango_gravity_get_type ()" ) ]
[ Version ( since = "1.16" ) ]
public enum Gravity
`PangoGravity` 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 [[email protected]
], and then glyph orientation is controlled using `PangoGravity`.
Not every value in this enumeration makes sense for every usage of `PangoGravity`; for example,
pango_gravity_auto only can be passed to [[email protected]_base_gravity] and can only be returned by [
[email protected]_base_gravity].
See also: [[email protected]]
Content:
Enum values:
- AUTO - Gravity is resolved from the context
matrix
- EAST - Glyphs are rotated 90 degrees
counter-clockwise.
- NORTH - Glyphs are upside-down.
- SOUTH - Glyphs stand upright (default) <img
align="right" valign="center" src="m-south.
- WEST - Glyphs are rotated 90 degrees clockwise.
Static methods:
- public static Gravity get_for_matrix (Matrix? matrix)
Finds the gravity that best matches the rotation component in a
`PangoMatrix`.
- public static Gravity get_for_script (Script script, Gravity base_gravity, GravityHint hint)
Returns the gravity to use in laying out a `PangoItem`.
- public static Gravity get_for_script_and_width (Script script, bool wide, Gravity base_gravity, GravityHint hint)
Returns the gravity to use in laying out a single character or
`PangoItem`.
Methods: