Name
pango.GravityToRotation -- convert gravity to rotation
Synopsis
angle = pango.GravityToRotation(gravity)
Function
Converts a Pango gravity value to its natural rotation in radians.

Note that pmatrix:Rotate() takes angle in degrees, not radians. So, to call pmatrix:Rotate() with the output of this function you should multiply it by (180. / #PI).

This function returns the rotation value corresponding to gravity.

See pcontext:SetBaseGravity() for a list of gravity constants.

Inputs
gravity
gravity to query, should not be #PANGO_GRAVITY_AUTO
Results
angle
the rotation value corresponding to gravity

Show TOC