Pango Interaction

Name

Pango Interaction -- 

Synopsis


#include <gdk/gdk.h>


PangoContext* gdk_pango_context_get         (void);
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);

Description

Details

gdk_pango_context_get ()

PangoContext* gdk_pango_context_get         (void);

Returns : 


gdk_pango_context_set_colormap ()

void        gdk_pango_context_set_colormap  (PangoContext *context,
                                             GdkColormap *colormap);

context : 
colormap : 


struct GdkPangoAttrEmbossed

struct GdkPangoAttrEmbossed
{
  PangoAttribute attr;
  gboolean embossed;
};


struct GdkPangoAttrStipple

struct GdkPangoAttrStipple
{
  PangoAttribute attr;
  GdkBitmap *stipple;
};


gdk_pango_attr_embossed_new ()

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 ()

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 PangoAttribute


gdk_pango_layout_get_clip_region ()

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 PangoLayout
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


gdk_pango_layout_line_get_clip_region ()

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 PangoLayoutLine
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