![]() | ![]() | ![]() | GDK Reference Manual | ![]() |
---|
Pango Interaction — Low-level access to Pango
#include <gdk/gdk.h>PangoContext * gdk_pango_context_get (void);PangoContext * gdk_pango_context_get_for_screen (GdkScreen *screen); void gdk_pango_context_set_colormap (PangoContext *context, GdkColormap *colormap); struct GdkPangoAttrEmbossed; struct GdkPangoAttrStipple;PangoAttribute * gdk_pango_attr_embossed_new (gboolean embossed);PangoAttribute * gdk_pango_attr_stipple_new (GdkBitmap *stipple); GdkRegion* gdk_pango_layout_get_clip_region (PangoLayout *layout,gint x_origin,gint y_origin,gint *index_ranges,gint n_ranges); GdkRegion* gdk_pango_layout_line_get_clip_region (PangoLayoutLine *line,gint x_origin,gint y_origin,gint *index_ranges,gint n_ranges);
PangoContext * gdk_pango_context_get (void);
Creates a
The context must be freed when you're finished with it.
When using GTK+, normally you should use
Returns : | a new |
PangoContext * gdk_pango_context_get_for_screen (GdkScreen *screen);
Creates a
The context must be freed when you're finished with it.
When using GTK+, normally you should use
screen : | the GdkScreen for which the context is to be created. |
Returns : | a new |
Since 2.2
void gdk_pango_context_set_colormap (PangoContext *context, GdkColormap *colormap);
Sets the colormap to be used for drawing with context.
If you obtained your context from
context : | a |
colormap : | a GdkColormap |
struct GdkPangoAttrEmbossed { PangoAttribute attr; gboolean embossed; };
A Pango text attribute containing a embossed bitmap to be used when rendering the text.
the | |
the embossed bitmap. |
struct GdkPangoAttrStipple { PangoAttribute attr; GdkBitmap *stipple; };
A Pango text attribute containing a stipple bitmap to be used when rendering the text.
the | |
GdkBitmap *stipple | the stipple bitmap. |
PangoAttribute * gdk_pango_attr_embossed_new (gboolean embossed);
Creates a new attribute containing a embossed bitmap to be used when rendering the text.
embossed : | a bitmap to be set as embossed |
Returns : | new |
PangoAttribute * gdk_pango_attr_stipple_new (GdkBitmap *stipple);
Creates a new attribute containing a stipple bitmap to be used when rendering the text.
stipple : | a bitmap to be set as stipple |
Returns : | new |
GdkRegion* gdk_pango_layout_get_clip_region (PangoLayout *layout,gint x_origin,gint y_origin,gint *index_ranges,gint n_ranges);
Obtains a clip region which contains the areas where the given ranges of text would be drawn. x_origin and y_origin are the same position you would pass to gdk_draw_layout_line(). index_ranges should contain ranges of bytes in the layout's text.
layout : | a |
x_origin : | X pixel where you intend to draw the layout with this clip |
y_origin : | Y pixel where you intend to draw the layout with this clip |
index_ranges : | array of byte indexes into the layout, where even members of array are start indexes and odd elements are end indexes |
n_ranges : | number of ranges in index_ranges, i.e. half the size of index_ranges |
Returns : | a clip region containing the given ranges |
GdkRegion* gdk_pango_layout_line_get_clip_region (PangoLayoutLine *line,gint x_origin,gint y_origin,gint *index_ranges,gint n_ranges);
Obtains a clip region which contains the areas where the given ranges of text would be drawn. x_origin and y_origin are the same position you would pass to gdk_draw_layout_line(). index_ranges should contain ranges of bytes in the layout's text. The clip region will include space to the left or right of the line (to the layout bounding box) if you have indexes above or below the indexes contained inside the line. This is to draw the selection all the way to the side of the layout. However, the clip region is in line coordinates, not layout coordinates.
line : | a |
x_origin : | X pixel where you intend to draw the layout line with this clip |
y_origin : | baseline pixel where you intend to draw the layout line with this clip |
index_ranges : | array of byte indexes into the layout, where even members of array are start indexes and odd elements are end indexes |
n_ranges : | number of ranges in index_ranges, i.e. half the size of index_ranges |
Returns : | a clip region containing the given ranges |
<< Input Devices | X Window System Interaction >> |