pango.renderer
Module for [Renderer] class
Types 3
[pango.renderer.Renderer] is a base class for objects that can render text provided as [pango.glyph_string.GlyphString] or [pango.layout.Layout].
By subclassing [pango.renderer.Renderer] and overriding operations such as @draw_glyphs and @draw_rectangle, renderers for particular font backends and destinations can be created.
Methods
RendererGidBuilder builder()Get builder for [pango.renderer.Renderer] Returns: New builder objectvoid activate()Does initial setup before rendering operations on renderer.void deactivate()Cleans up after rendering operations on renderer.void drawErrorUnderline(int x, int y, int width, int height)Draw a squiggly line that approximately covers the given rectangle in the style of an underline used to indicate a spelling error.void drawGlyph(pango.font.Font font, pango.types.Glyph glyph, double x, double y)Draws a single glyph with coordinates in device space.void drawGlyphItem(string text, pango.glyph_item.GlyphItem glyphItem, int x, int y)Draws the glyphs in glyph_item with the specified [pango.renderer.Renderer], embedding the text associated with the glyphs in the output if the output format supports it.void drawGlyphs(pango.font.Font font, pango.glyph_string.GlyphString glyphs, int x, int y)Draws the glyphs in glyphs with the specified [pango.renderer.Renderer].void drawLayout(pango.layout.Layout layout, int x, int y)Draws layout with the specified [pango.renderer.Renderer].void drawLayoutLine(pango.layout_line.LayoutLine line, int x, int y)Draws line with the specified [pango.renderer.Renderer].void drawRectangle(pango.types.RenderPart part, int x, int y, int width, int height)Draws an axis-aligned rectangle in user space coordinates with the specified [pango.renderer.Renderer].void drawTrapezoid(pango.types.RenderPart part, double y1, double x11, double x21, double y2, double x12, double x22)Draws a trapezoid with the parallel sides aligned with the X axis using the given [pango.renderer.Renderer]; coordinates are in device space.ushort getAlpha(pango.types.RenderPart part)Gets the current alpha for the specified part.pango.color.Color getColor(pango.types.RenderPart part)Gets the current rendering color for the specified part.pango.layout.Layout getLayout()Gets the layout currently being rendered using renderer.pango.layout_line.LayoutLine getLayoutLine()Gets the layout line currently being rendered using renderer.pango.matrix.Matrix getMatrix()Gets the transformation matrix that will be applied when rendering.void partChanged(pango.types.RenderPart part)Informs Pango that the way that the rendering is done for part has changed.void setAlpha(pango.types.RenderPart part, ushort alpha)Sets the alpha for part of the rendering.void setColor(pango.types.RenderPart part, pango.color.Color color)Sets the color for part of the rendering.void setMatrix(pango.matrix.Matrix matrix)Sets the transformation matrix that will be applied when rendering.