Renderer
Object Hierarchy:
Description:
public class Renderer :
Object
Namespace: Pango
Package: pango
Content:
Creation methods:
Methods:
-
public void activate ()
Does initial setup before rendering operations on renderer.
deactivate should be called when done drawing. Calls such as
draw_layout automatically activate the layout before drawing on it. Calls
to activate and
deactivate can be nested and the renderer will only be initialized and deinitialized once.
-
public virtual void begin ()
-
public void deactivate ()
Cleans up after rendering operations on renderer. See docs for
activate.
-
public virtual void draw_error_underline (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. (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)
-
public virtual void draw_glyph (Font font, Glyph glyph, double x, double y)
Draws a single glyph with coordinates in device space.
-
public virtual void draw_glyph_item (string text, GlyphItem glyph_item, int x, int y)
Draws the glyphs in glyph_item with the specified
Renderer, embedding the text associated with the glyphs in the output if the output
format supports it (PDF for example).
-
public virtual void draw_glyphs (Font font, GlyphString glyphs, int x, int y)
Draws the glyphs in glyphs with the specified
Renderer.
-
public void draw_layout (Layout layout, int x, int y)
Draws layout with the specified Renderer.
-
public void draw_layout_line (LayoutLine line, int x, int y)
-
public virtual void draw_rectangle (RenderPart part, int x, int y, int width, int height)
Draws an axis-aligned rectangle in user space coordinates with the specified
Renderer.
-
public virtual void draw_shape (AttrShape attr, int x, int y)
-
public virtual void draw_trapezoid (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
Renderer; coordinates are in device space.
-
public virtual void end ()
-
public Color get_color (RenderPart part)
Gets the current rendering color for the specified part.
-
public weak Layout get_layout ()
Gets the layout currently being rendered using renderer. Calling this function only makes
sense from inside a subclass's methods, like in its draw_shape() for example.
-
public weak LayoutLine get_layout_line ()
Gets the layout line currently being rendered using renderer. Calling this function only
makes sense from inside a subclass's methods, like in its draw_shape() for example.
-
public Matrix get_matrix ()
Gets the transformation matrix that will be applied when rendering. See
set_matrix.
-
public virtual void part_changed (RenderPart part)
Informs Pango that the way that the rendering is done for part has changed in a way that
would prevent multiple pieces being joined together into one drawing call. For instance, if a subclass of
Renderer was to add a stipple option for drawing underlines, it needs to call
-
public virtual void prepare_run (LayoutRun run)
-
public void set_color (RenderPart part, Color color)
Sets the color for part of the rendering.
-
public void set_matrix (Matrix matrix)
Sets the transformation matrix that will be applied when rendering.
Fields: