X Rendering

Name

X Rendering -- 

Synopsis




#define     PANGO_RENDER_TYPE_X
PangoContext* pango_x_get_context           (Display *display);
void        pango_x_context_set_funcs       (PangoContext *context,
                                             PangoGetGCFunc get_gc_func,
                                             PangoFreeGCFunc free_gc_func);
GC          (*PangoGetGCFunc)               (PangoContext *context,
                                             PangoColor *color,
                                             GC base_gc);
void        (*PangoFreeGCFunc)              (PangoContext *context,
                                             GC gc);
void        pango_x_render                  (Display *display,
                                             Drawable d,
                                             GC gc,
                                             PangoFont *font,
                                             PangoGlyphString *glyphs,
                                             gint x,
                                             gint y);
void        pango_x_render_layout_line      (Display *display,
                                             Drawable drawable,
                                             GC gc,
                                             PangoLayoutLine *line,
                                             int x,
                                             int y);
void        pango_x_render_layout           (Display *display,
                                             Drawable drawable,
                                             GC gc,
                                             PangoLayout *layout,
                                             int x,
                                             int y);

Description

Details

PANGO_RENDER_TYPE_X

#define PANGO_RENDER_TYPE_X "PangoRenderX"

A string constant identifying the X renderer. The associated quark (see g_quark_from_string()) is used to identify the renderer in pango_find_map().


pango_x_get_context ()

PangoContext* pango_x_get_context           (Display *display);

Retrieves a PangoContext appropriate for rendering with X fonts on the given display.

display : an X display (As returned by XOpenDisplay().)
Returns : the new PangoContext.


pango_x_context_set_funcs ()

void        pango_x_context_set_funcs       (PangoContext *context,
                                             PangoGetGCFunc get_gc_func,
                                             PangoFreeGCFunc free_gc_func);

Sets the functions that will be used to get GC's in various colors when rendering layouts with this context.

context : a PangoContext.
get_gc_func : function called to create a new GC for a given color.
free_gc_func : function called to free a GC created with get_gc_func.


PangoGetGCFunc ()

GC          (*PangoGetGCFunc)               (PangoContext *context,
                                             PangoColor *color,
                                             GC base_gc);

Specifies the type of the function used to create a new GC for a given color.

context :a PangoContext.
color :the color to create a new GC for.
base_gc :the GC to base the new GC on.
Returns :the new GC.


PangoFreeGCFunc ()

void        (*PangoFreeGCFunc)              (PangoContext *context,
                                             GC gc);

Specifies the type of the function used to free a GC created with the corresponding PangoGetGCFunc function.

context :a PangoContext.
gc :the GC to free.


pango_x_render ()

void        pango_x_render                  (Display *display,
                                             Drawable d,
                                             GC gc,
                                             PangoFont *font,
                                             PangoGlyphString *glyphs,
                                             gint x,
                                             gint y);

Renders a PangoGlyphString onto an X drawable.

display : the X display.
d : the drawable on which to draw string.
gc : the graphics context.
font : the font in which to draw the string.
glyphs : the glyph string to draw.
x : the x position of start of string (in pixels).
y : the y position of baseline (in pixels).


pango_x_render_layout_line ()

void        pango_x_render_layout_line      (Display *display,
                                             Drawable drawable,
                                             GC gc,
                                             PangoLayoutLine *line,
                                             int x,
                                             int y);

Renders a PangoLayoutLine onto an X drawable.

display : the X display.
drawable : the drawable on which to draw.
gc : GC to use for uncolored drawing.
line : a PangoLayoutLine.
x : the x position of start of string (in pixels).
y : the y position of baseline (in pixels).


pango_x_render_layout ()

void        pango_x_render_layout           (Display *display,
                                             Drawable drawable,
                                             GC gc,
                                             PangoLayout *layout,
                                             int x,
                                             int y);

Renders a PangoLayoutLine onto an X drawable.

display : the X display.
drawable : the drawable on which to draw.
gc : GC to use for uncolored drawing.
layout : a PangoLayout.
x : the x position of the left of the layout (in pixels).
y : the y position of the top of the layout (in pixels).