Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
pango-types.h File Reference

Go to the source code of this file.

Data Structures

struct  _PangoRectangle
 

Macros

#define PANGO_SCALE   1024
 
#define PANGO_PIXELS(d)   (((int)(d) + 512) >> 10)
 
#define PANGO_PIXELS_FLOOR(d)   (((int)(d)) >> 10)
 
#define PANGO_PIXELS_CEIL(d)   (((int)(d) + 1023) >> 10)
 
#define PANGO_UNITS_FLOOR(d)    ((d) & ~(PANGO_SCALE - 1))
 
#define PANGO_UNITS_CEIL(d)    (((d) + (PANGO_SCALE - 1)) & ~(PANGO_SCALE - 1))
 
#define PANGO_UNITS_ROUND(d)    (((d) + (PANGO_SCALE >> 1)) & ~(PANGO_SCALE - 1))
 
#define PANGO_ASCENT(rect)   (-(rect).y)
 
#define PANGO_DESCENT(rect)   ((rect).y + (rect).height)
 
#define PANGO_LBEARING(rect)   ((rect).x)
 
#define PANGO_RBEARING(rect)   ((rect).x + (rect).width)
 

Typedefs

typedef typedefG_BEGIN_DECLS struct _PangoLogAttr PangoLogAttr
 
typedef struct _PangoEngineLang PangoEngineLang
 
typedef struct _PangoEngineShape PangoEngineShape
 
typedef struct _PangoFont PangoFont
 
typedef struct _PangoFontMap PangoFontMap
 
typedef struct _PangoRectangle PangoRectangle
 
typedef struct _PangoContext PangoContext
 
typedef struct _PangoLanguage PangoLanguage
 
typedef guint32 PangoGlyph
 

Functions

PANGO_AVAILABLE_IN_1_16 int pango_units_from_double (double d) G_GNUC_CONST
 
PANGO_AVAILABLE_IN_1_16 double pango_units_to_double (int i) G_GNUC_CONST
 
PANGO_AVAILABLE_IN_1_16 void pango_extents_to_pixels (PangoRectangle *inclusive, PangoRectangle *nearest)
 

Macro Definition Documentation

◆ PANGO_ASCENT

#define PANGO_ASCENT ( rect)    (-(rect).y)

PANGO_ASCENT: @rect: a PangoRectangle

Extracts the ascent from a PangoRectangle representing glyph extents.

The ascent is the distance from the baseline to the highest point of the character. This is positive if the glyph ascends above the baseline. PANGO_DESCENT: @rect: a PangoRectangle

Extracts the descent from a PangoRectangle representing glyph extents.

The descent is the distance from the baseline to the lowest point of the character. This is positive if the glyph descends below the baseline. PANGO_LBEARING: @rect: a PangoRectangle

Extracts the left bearing from a PangoRectangle representing glyph extents.

The left bearing is the distance from the horizontal origin to the farthest left point of the character. This is positive for characters drawn completely to the right of the glyph origin. PANGO_RBEARING: @rect: a PangoRectangle

Extracts the right bearing from a PangoRectangle representing glyph extents.

The right bearing is the distance from the horizontal origin to the farthest right point of the character. This is positive except for characters drawn completely to the left of the horizontal origin.

Definition at line 225 of file pango-types.h.

◆ PANGO_DESCENT

#define PANGO_DESCENT ( rect)    ((rect).y + (rect).height)

Definition at line 226 of file pango-types.h.

◆ PANGO_LBEARING

#define PANGO_LBEARING ( rect)    ((rect).x)

Definition at line 227 of file pango-types.h.

◆ PANGO_PIXELS

#define PANGO_PIXELS ( d)    (((int)(d) + 512) >> 10)

Definition at line 97 of file pango-types.h.

◆ PANGO_PIXELS_CEIL

#define PANGO_PIXELS_CEIL ( d)    (((int)(d) + 1023) >> 10)

Definition at line 99 of file pango-types.h.

◆ PANGO_PIXELS_FLOOR

#define PANGO_PIXELS_FLOOR ( d)    (((int)(d)) >> 10)

Definition at line 98 of file pango-types.h.

◆ PANGO_RBEARING

#define PANGO_RBEARING ( rect)    ((rect).x + (rect).width)

Definition at line 228 of file pango-types.h.

◆ PANGO_SCALE

#define PANGO_SCALE   1024

PANGO_SCALE:

The scale between dimensions used for Pango distances and device units.

The definition of device units is dependent on the output device; it will typically be pixels for a screen, and points for a printer. PANGO_SCALE is currently 1024, but this may be changed in the future.

When setting font sizes, device units are always considered to be points (as in "12 point font"), rather than pixels. PANGO_PIXELS: @d: a dimension in Pango units.

Converts a dimension to device units by rounding.

Return value: rounded dimension in device units. PANGO_PIXELS_FLOOR: @d: a dimension in Pango units.

Converts a dimension to device units by flooring.

Return value: floored dimension in device units. Since: 1.14 PANGO_PIXELS_CEIL: @d: a dimension in Pango units.

Converts a dimension to device units by ceiling.

Return value: ceiled dimension in device units. Since: 1.14

Definition at line 96 of file pango-types.h.

◆ PANGO_UNITS_CEIL

#define PANGO_UNITS_CEIL ( d)     (((d) + (PANGO_SCALE - 1)) & ~(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

Definition at line 132 of file pango-types.h.

132#define PANGO_UNITS_CEIL(d) \
133 (((d) + (PANGO_SCALE - 1)) & ~(PANGO_SCALE - 1))

◆ PANGO_UNITS_FLOOR

#define PANGO_UNITS_FLOOR ( d)     ((d) & ~(PANGO_SCALE - 1))

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

Definition at line 119 of file pango-types.h.

119#define PANGO_UNITS_FLOOR(d) \
120 ((d) & ~(PANGO_SCALE - 1))

◆ PANGO_UNITS_ROUND

#define PANGO_UNITS_ROUND ( d)     (((d) + (PANGO_SCALE >> 1)) & ~(PANGO_SCALE - 1))

PANGO_UNITS_ROUND: @d: a dimension in Pango units.

Rounds a dimension to whole device units, but does not convert it to device units.

Return value: rounded dimension in Pango units. Since: 1.18

Definition at line 145 of file pango-types.h.

145#define PANGO_UNITS_ROUND(d) \
146 (((d) + (PANGO_SCALE >> 1)) & ~(PANGO_SCALE - 1))

Typedef Documentation

◆ PangoContext

typedef struct _PangoContext PangoContext

Definition at line 44 of file pango-types.h.

◆ PangoEngineLang

Definition at line 35 of file pango-types.h.

◆ PangoEngineShape

Definition at line 36 of file pango-types.h.

◆ PangoFont

typedef struct _PangoFont PangoFont

Definition at line 39 of file pango-types.h.

◆ PangoFontMap

typedef struct _PangoFontMap PangoFontMap

Definition at line 40 of file pango-types.h.

◆ PangoGlyph

PangoGlyph:

A PangoGlyph represents a single glyph in the output form of a string.

Definition at line 54 of file pango-types.h.

◆ PangoLanguage

typedef struct _PangoLanguage PangoLanguage

Definition at line 46 of file pango-types.h.

◆ PangoLogAttr

typedef typedefG_BEGIN_DECLS struct _PangoLogAttr PangoLogAttr

Definition at line 32 of file pango-types.h.

◆ PangoRectangle

Definition at line 42 of file pango-types.h.

Function Documentation

◆ pango_extents_to_pixels()

PANGO_AVAILABLE_IN_1_16 void pango_extents_to_pixels ( PangoRectangle * inclusive,
PangoRectangle * nearest )

◆ pango_units_from_double()

PANGO_AVAILABLE_IN_1_16 int pango_units_from_double ( double d)

◆ pango_units_to_double()

PANGO_AVAILABLE_IN_1_16 double pango_units_to_double ( int i)