Pango.Renderer
Description: Reference for Pango.Renderer

### Class

# PangoRenderer

#### Description [src]

    abstract class Pango.Renderer : GObject.Object {
      matrix: PangoMatrix*
    }

`PangoRenderer` is a base class for objects that can render text provided as `PangoGlyphString` or `PangoLayout`.

By subclassing `PangoRenderer` and overriding operations such as `draw_glyphs` and `draw_rectangle`, renderers for particular font backends and destinations can be created.

Available since: | 1.8

#### Ancestors

- GObject

#### Instance methods

###### pango_renderer_activate

Does initial setup before rendering operations on `renderer`.

Available since: 1.8

###### pango_renderer_deactivate

Cleans up after rendering operations on `renderer`.

Available since: 1.8

###### pango_renderer_draw_error_underline

Draw a squiggly line that approximately covers the given rectangle in the style of an underline used to indicate a spelling error.

Available since: 1.8

###### pango_renderer_draw_glyph

Draws a single glyph with coordinates in device space.

Available since: 1.8

###### pango_renderer_draw_glyph_item

Draws the glyphs in `glyph_item` with the specified `PangoRenderer`, embedding the text associated with the glyphs in the output if the output format supports it.

Available since: 1.22

###### pango_renderer_draw_glyphs

Draws the glyphs in `glyphs` with the specified `PangoRenderer`.

Available since: 1.8

###### pango_renderer_draw_layout

Draws `layout` with the specified `PangoRenderer`.

Available since: 1.8

###### pango_renderer_draw_layout_line

Draws `line` with the specified `PangoRenderer`.

Available since: 1.8

###### pango_renderer_draw_rectangle

Draws an axis-aligned rectangle in user space coordinates with the specified `PangoRenderer`.

Available since: 1.8

###### pango_renderer_draw_trapezoid

Draws a trapezoid with the parallel sides aligned with the X axis using the given `PangoRenderer`; coordinates are in device space.

Available since: 1.8

###### pango_renderer_get_alpha

Gets the current alpha for the specified part.

Available since: 1.38

###### pango_renderer_get_color

Gets the current rendering color for the specified part.

Available since: 1.8

###### pango_renderer_get_layout

Gets the layout currently being rendered using `renderer`.

Available since: 1.20

###### pango_renderer_get_layout_line

Gets the layout line currently being rendered using `renderer`.

Available since: 1.20

###### pango_renderer_get_matrix

Gets the transformation matrix that will be applied when rendering.

Available since: 1.8

###### pango_renderer_part_changed

Informs Pango that the way that the rendering is done for `part` has changed.

Available since: 1.8

###### pango_renderer_set_alpha

Sets the alpha for part of the rendering.

Available since: 1.38

###### pango_renderer_set_color

Sets the color for part of the rendering.

Available since: 1.8

###### pango_renderer_set_matrix

Sets the transformation matrix that will be applied when rendering.

Available since: 1.8

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Signals

##### Signals inherited from GObject (1)

###### GObject.Object::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct PangoRendererClass {
      void (* draw_glyphs) (
        PangoRenderer* renderer,
        PangoFont* font,
        PangoGlyphString* glyphs,
        int x,
        int y
      );
      void (* draw_rectangle) (
        PangoRenderer* renderer,
        PangoRenderPart part,
        int x,
        int y,
        int width,
        int height
      );
      void (* draw_error_underline) (
        PangoRenderer* renderer,
        int x,
        int y,
        int width,
        int height
      );
      void (* draw_shape) (
        PangoRenderer* renderer,
        PangoAttrShape* attr,
        int x,
        int y
      );
      void (* draw_trapezoid) (
        PangoRenderer* renderer,
        PangoRenderPart part,
        double y1_,
        double x11,
        double x21,
        double y2,
        double x12,
        double x22
      );
      void (* draw_glyph) (
        PangoRenderer* renderer,
        PangoFont* font,
        PangoGlyph glyph,
        double x,
        double y
      );
      void (* part_changed) (
        PangoRenderer* renderer,
        PangoRenderPart part
      );
      void (* begin) (
        PangoRenderer* renderer
      );
      void (* end) (
        PangoRenderer* renderer
      );
      void (* prepare_run) (
        PangoRenderer* renderer,
        PangoLayoutRun* run
      );
      void (* draw_glyph_item) (
        PangoRenderer* renderer,
        const char* text,
        PangoGlyphItem* glyph_item,
        int x,
        int y
      );
      void (* _pango_reserved2) (
    void
      );
      void (* _pango_reserved3) (
    void
      );
      void (* _pango_reserved4) (
    void
      );

    }

###### Class members

`draw_glyphs` |
    void (* draw_glyphs) (
        PangoRenderer* renderer,
        PangoFont* font,
        PangoGlyphString* glyphs,
        int x,
        int y
      )
| Draws a `PangoGlyphString`
`draw_rectangle` |
    void (* draw_rectangle) (
        PangoRenderer* renderer,
        PangoRenderPart part,
        int x,
        int y,
        int width,
        int height
      )
| Draws a rectangle.
`draw_error_underline` |
    void (* draw_error_underline) (
        PangoRenderer* renderer,
        int x,
        int y,
        int width,
        int height
      )
| Draws a squiggly line that approximately covers the given rectangle in the style of an underline used to indicate a spelling error.
`draw_shape` |
    void (* draw_shape) (
        PangoRenderer* renderer,
        PangoAttrShape* attr,
        int x,
        int y
      )
| Draw content for a glyph shaped with `PangoAttrShape` `x`, `y` are the coordinates of the left edge of the baseline, in user coordinates.
`draw_trapezoid` |
    void (* draw_trapezoid) (
        PangoRenderer* renderer,
        PangoRenderPart part,
        double y1_,
        double x11,
        double x21,
        double y2,
        double x12,
        double x22
      )
| Draws a trapezoidal filled area.
`draw_glyph` |
    void (* draw_glyph) (
        PangoRenderer* renderer,
        PangoFont* font,
        PangoGlyph glyph,
        double x,
        double y
      )
| Draws a single glyph.
`part_changed` |
    void (* part_changed) (
        PangoRenderer* renderer,
        PangoRenderPart part
      )
| Do renderer specific processing when rendering attributes change.
`begin` |
    void (* begin) (
        PangoRenderer* renderer
      )
| Do renderer-specific initialization before drawing.
`end` |
    void (* end) (
        PangoRenderer* renderer
      )
| Do renderer-specific cleanup after drawing.
`prepare_run` |
    void (* prepare_run) (
        PangoRenderer* renderer,
        PangoLayoutRun* run
      )
| Updates the renderer for a new run.
`draw_glyph_item` |
    void (* draw_glyph_item) (
        PangoRenderer* renderer,
        const char* text,
        PangoGlyphItem* glyph_item,
        int x,
        int y
      )
| Draws a `PangoGlyphItem`
`_pango_reserved2` |
    void (* _pango_reserved2) (
    void
      )
| No description available.
`_pango_reserved3` |
    void (* _pango_reserved3) (
    void
      )
| No description available.
`_pango_reserved4` |
    void (* _pango_reserved4) (
    void
      )
| No description available.

#### Virtual methods

###### Pango.RendererClass.begin

Do renderer-specific initialization before drawing.

###### Pango.RendererClass.draw_error_underline

Draw a squiggly line that approximately covers the given rectangle in the style of an underline used to indicate a spelling error.

Available since: 1.8

###### Pango.RendererClass.draw_glyph

Draws a single glyph with coordinates in device space.

Available since: 1.8

###### Pango.RendererClass.draw_glyph_item

Draws the glyphs in `glyph_item` with the specified `PangoRenderer`, embedding the text associated with the glyphs in the output if the output format supports it.

Available since: 1.22

###### Pango.RendererClass.draw_glyphs

Draws the glyphs in `glyphs` with the specified `PangoRenderer`.

Available since: 1.8

###### Pango.RendererClass.draw_rectangle

Draws an axis-aligned rectangle in user space coordinates with the specified `PangoRenderer`.

Available since: 1.8

###### Pango.RendererClass.draw_shape

Draw content for a glyph shaped with `PangoAttrShape` `x`, `y` are the coordinates of the left edge of the baseline, in user coordinates.

###### Pango.RendererClass.draw_trapezoid

Draws a trapezoid with the parallel sides aligned with the X axis using the given `PangoRenderer`; coordinates are in device space.

Available since: 1.8

###### Pango.RendererClass.end

Do renderer-specific cleanup after drawing.

###### Pango.RendererClass.part_changed

Informs Pango that the way that the rendering is done for `part` has changed.

Available since: 1.8

###### Pango.RendererClass.prepare_run

Updates the renderer for a new run.