Pango.Renderer
Description: Reference for Pango.Renderer

### Class

# PangoRenderer

since: 1.8

#### 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`.

since: 1.8

###### pango_renderer_deactivate

Cleans up after rendering operations on `renderer`.

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.

since: 1.8

###### pango_renderer_draw_glyph

Draws a single glyph with coordinates in device space.

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.

since: 1.22

###### pango_renderer_draw_glyphs

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

since: 1.8

###### pango_renderer_draw_layout

Draws `layout` with the specified `PangoRenderer`.

since: 1.8

###### pango_renderer_draw_layout_line

Draws `line` with the specified `PangoRenderer`.

since: 1.8

###### pango_renderer_draw_rectangle

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

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.

since: 1.8

###### pango_renderer_get_alpha

Gets the current alpha for the specified part.

since: 1.38

###### pango_renderer_get_color

Gets the current rendering color for the specified part.

since: 1.8

###### pango_renderer_get_layout

Gets the layout currently being rendered using `renderer`.

since: 1.20

###### pango_renderer_get_layout_line

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

since: 1.20

###### pango_renderer_get_matrix

Gets the transformation matrix that will be applied when rendering.

since: 1.8

###### pango_renderer_part_changed

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

since: 1.8

###### pango_renderer_set_alpha

Sets the alpha for part of the rendering.

since: 1.38

###### pango_renderer_set_color

Sets the color for part of the rendering.

since: 1.8

###### pango_renderer_set_matrix

Sets the transformation matrix that will be applied when rendering.

since: 1.8

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

Please see GObject for a full list of methods.

#### Signals

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

###### GObject::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 structure for `PangoRenderer`.

The following vfuncs take user space coordinates in Pango units and have default implementations: - draw_glyphs - draw_rectangle - draw_error_underline - draw_shape - draw_glyph_item

The default draw_shape implementation draws nothing.

The following vfuncs take device space coordinates as doubles and must be implemented: - draw_trapezoid - draw_glyph.

###### Class members

`draw_glyphs: void (* draw_glyphs) ( PangoRenderer* renderer, PangoFont* font, PangoGlyphString* glyphs, int x, int y )`
  No description available.
`draw_rectangle: void (* draw_rectangle) ( PangoRenderer* renderer, PangoRenderPart part, int x, int y, int width, int height )`
  No description available.
`draw_error_underline: void (* draw_error_underline) ( PangoRenderer* renderer, int x, int y, int width, int height )`
  No description available.
`draw_shape: void (* draw_shape) ( PangoRenderer* renderer, PangoAttrShape* attr, int x, int y )`
  No description available.
`draw_trapezoid: void (* draw_trapezoid) ( PangoRenderer* renderer, PangoRenderPart part, double y1_, double x11, double x21, double y2, double x12, double x22 )`
  No description available.
`draw_glyph: void (* draw_glyph) ( PangoRenderer* renderer, PangoFont* font, PangoGlyph glyph, double x, double y )`
  No description available.
`part_changed: void (* part_changed) ( PangoRenderer* renderer, PangoRenderPart part )`
  No description available.
`begin: void (* begin) ( PangoRenderer* renderer )`
  No description available.
`end: void (* end) ( PangoRenderer* renderer )`
  No description available.
`prepare_run: void (* prepare_run) ( PangoRenderer* renderer, PangoLayoutRun* run )`
  No description available.
`draw_glyph_item: void (* draw_glyph_item) ( PangoRenderer* renderer, const char* text, PangoGlyphItem* glyph_item, int x, int y )`
  No description available.
`_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

No description available.

###### 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.

since: 1.8

###### Pango.RendererClass.draw_glyph

Draws a single glyph with coordinates in device space.

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.

since: 1.22

###### Pango.RendererClass.draw_glyphs

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

since: 1.8

###### Pango.RendererClass.draw_rectangle

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

since: 1.8

###### Pango.RendererClass.draw_shape

No description available.

###### 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.

since: 1.8

###### Pango.RendererClass.end

No description available.

###### Pango.RendererClass.part_changed

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

since: 1.8

###### Pango.RendererClass.prepare_run

No description available.