diff options
Diffstat (limited to 'pango/pango-types.h')
-rw-r--r-- | pango/pango-types.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/pango/pango-types.h b/pango/pango-types.h index f18225ba..ed86f699 100644 --- a/pango/pango-types.h +++ b/pango/pango-types.h @@ -107,6 +107,32 @@ typedef guint32 PangoGlyph; */ /** + * PANGO_UNITS_FLOOR: + * @d: a dimension in Pango units. + * + * Rounds a dimension down to whole device units, but does not + * convert it to device units. + * + * Return value: rounded down dimension in Pango units. + * Since: 1.50 + */ +#define PANGO_UNITS_FLOOR(d) \ + ((d) & ~(PANGO_SCALE - 1)) + +/** + * PANGO_UNITS_CEIL: + * @d: a dimension in Pango units. + * + * Rounds a dimension up to whole device units, but does not + * convert it to device units. + * + * Return value: rounded up dimension in Pango units. + * Since: 1.50 + */ +#define PANGO_UNITS_CEIL(d) \ + (((d) + (PANGO_SCALE - 1)) & ~(PANGO_SCALE - 1)) + +/** * PANGO_UNITS_ROUND: * @d: a dimension in Pango units. * |