PgCairo

Undocumented in source.

Members

Static functions

contextGetFontOptions
FontOption contextGetFontOptions(PgContext context)

Retrieves any font rendering options previously set with pango_cairo_context_set_font_options(). This function does not report options that are derived from the target surface by pango_cairo_update_context()

contextGetResolution
double contextGetResolution(PgContext context)

Gets the resolution for the context. See pango_cairo_context_set_resolution()

contextGetShapeRenderer
PangoCairoShapeRendererFunc contextGetShapeRenderer(PgContext context, void** data)

Sets callback function for context to use for rendering attributes of type %PANGO_ATTR_SHAPE. See #PangoCairoShapeRendererFunc for details.

contextSetFontOptions
void contextSetFontOptions(PgContext context, FontOption options)

Sets the font options used when rendering text with this context. These options override any options that pango_cairo_update_context() derives from the target surface.

contextSetResolution
void contextSetResolution(PgContext context, double dpi)

Sets the resolution for the context. This is a scale factor between points specified in a #PangoFontDescription and Cairo units. The default value is 96, meaning that a 10 point font will be 13 units high. (10 * 96. / 72. = 13.3).

contextSetShapeRenderer
void contextSetShapeRenderer(PgContext context, PangoCairoShapeRendererFunc func, void* data, GDestroyNotify dnotify)

Sets callback function for context to use for rendering attributes of type %PANGO_ATTR_SHAPE. See #PangoCairoShapeRendererFunc for details.

createContext
PgContext createContext(Context cr)

Creates a context object set up to match the current transformation and target surface of the Cairo context. This context can then be used to create a layout using pango_layout_new().

createLayout
PgLayout createLayout(Context cr)

Creates a layout object set up to match the current transformation and target surface of the Cairo context. This layout can then be used for text measurement with functions like pango_layout_get_size() or drawing with functions like pango_cairo_show_layout(). If you change the transformation or target surface for @cr, you need to call pango_cairo_update_layout()

errorUnderlinePath
void errorUnderlinePath(Context cr, double x, double y, double width, double height)

Add a squiggly line to the current path in the specified cairo context that approximately covers the given rectangle in the style of an underline used to indicate a spelling error. (The width of the underline is rounded to an integer number of up/down segments and the resulting rectangle is centered in the original rectangle)

glyphStringPath
void glyphStringPath(Context cr, PgFont font, PgGlyphString glyphs)

Adds the glyphs in @glyphs to the current path in the specified cairo context. The origin of the glyphs (the left edge of the baseline) will be at the current point of the cairo context.

layoutLinePath
void layoutLinePath(Context cr, PgLayoutLine line)

Adds the text in #PangoLayoutLine to the current path in the specified cairo context. The origin of the glyphs (the left edge of the line) will be at the current point of the cairo context.

layoutPath
void layoutPath(Context cr, PgLayout layout)

Adds the text in a #PangoLayout to the current path in the specified cairo context. The top-left corner of the #PangoLayout will be at the current point of the cairo context.

showErrorUnderline
void showErrorUnderline(Context cr, double x, double y, double width, double height)

Draw a squiggly line in the specified cairo context that approximately covers the given rectangle in the style of an underline used to indicate a spelling error. (The width of the underline is rounded to an integer number of up/down segments and the resulting rectangle is centered in the original rectangle)

showGlyphItem
void showGlyphItem(Context cr, string text, PgGlyphItem glyphItem)

Draws the glyphs in @glyph_item in the specified cairo context, embedding the text associated with the glyphs in the output if the output format supports it (PDF for example), otherwise it acts similar to pango_cairo_show_glyph_string().

showGlyphString
void showGlyphString(Context cr, PgFont font, PgGlyphString glyphs)

Draws the glyphs in @glyphs in the specified cairo context. The origin of the glyphs (the left edge of the baseline) will be drawn at the current point of the cairo context.

showLayout
void showLayout(Context cr, PgLayout layout)

Draws a #PangoLayout in the specified cairo context. The top-left corner of the #PangoLayout will be drawn at the current point of the cairo context.

showLayoutLine
void showLayoutLine(Context cr, PgLayoutLine line)

Draws a #PangoLayoutLine in the specified cairo context. The origin of the glyphs (the left edge of the line) will be drawn at the current point of the cairo context.

updateContext
void updateContext(Context cr, PgContext context)

Updates a #PangoContext previously created for use with Cairo to match the current transformation and target surface of a Cairo context. If any layouts have been created for the context, it's necessary to call pango_layout_context_changed() on those layouts.

updateLayout
void updateLayout(Context cr, PgLayout layout)

Updates the private #PangoContext of a #PangoLayout created with pango_cairo_create_layout() to match the current transformation and target surface of a Cairo context.

Meta