diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-07-23 23:36:12 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-07-23 23:36:12 -0400 |
commit | 9d284b4ae077552e80acd529559c0108e8d87a71 (patch) | |
tree | caca9f6710597f3b0a402616cfec3de512bc6b5c /pango/pango-renderer.h | |
parent | b69d90d51a601f15c1fe79b17eedca2ce0d7996d (diff) | |
download | pango-9d284b4ae077552e80acd529559c0108e8d87a71.tar.gz |
doc cleanups
Clean up some headers, and shovel docs around.
Diffstat (limited to 'pango/pango-renderer.h')
-rw-r--r-- | pango/pango-renderer.h | 230 |
1 files changed, 114 insertions, 116 deletions
diff --git a/pango/pango-renderer.h b/pango/pango-renderer.h index 266cc3ed..8a70a88a 100644 --- a/pango/pango-renderer.h +++ b/pango/pango-renderer.h @@ -10,7 +10,7 @@ * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public @@ -79,7 +79,7 @@ struct _PangoRenderer int active_count; /*< public >*/ - PangoMatrix *matrix; /* May be NULL */ + PangoMatrix *matrix; /* May be NULL */ /*< private >*/ PangoRendererPrivate *priv; @@ -106,8 +106,23 @@ struct _PangoRenderer * * 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 + * * Since: 1.8 - **/ + */ struct _PangoRendererClass { /*< private >*/ @@ -116,72 +131,55 @@ struct _PangoRendererClass /* vtable - not signals */ /*< public >*/ - /* All of the following have default implementations - * and take as coordinates user coordinates in Pango units - */ - 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); - - /* Nothing is drawn for shaped glyphs unless this is implemented */ - void (*draw_shape) (PangoRenderer *renderer, - PangoAttrShape *attr, - int x, - int y); + 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); - /* These two must be implemented and take coordinates in - * device space as doubles. - */ - 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 (*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); - /* Notification of change in rendering attributes - */ - void (*part_changed) (PangoRenderer *renderer, - PangoRenderPart part); + void (*part_changed) (PangoRenderer *renderer, + PangoRenderPart part); - /* Paired around drawing operations - */ - void (*begin) (PangoRenderer *renderer); - void (*end) (PangoRenderer *renderer); + void (*begin) (PangoRenderer *renderer); + void (*end) (PangoRenderer *renderer); - /* Hooks into the details of layout rendering - */ - void (*prepare_run) (PangoRenderer *renderer, - PangoLayoutRun *run); + void (*prepare_run) (PangoRenderer *renderer, + PangoLayoutRun *run); - /* All of the following have default implementations - * and take as coordinates user coordinates in Pango units - */ - void (*draw_glyph_item) (PangoRenderer *renderer, - const char *text, - PangoGlyphItem *glyph_item, - int x, - int y); + void (*draw_glyph_item) (PangoRenderer *renderer, + const char *text, + PangoGlyphItem *glyph_item, + int x, + int y); /*< private >*/ @@ -192,58 +190,58 @@ struct _PangoRendererClass }; PANGO_AVAILABLE_IN_1_8 -GType pango_renderer_get_type (void) G_GNUC_CONST; +GType pango_renderer_get_type (void) G_GNUC_CONST; PANGO_AVAILABLE_IN_1_8 void pango_renderer_draw_layout (PangoRenderer *renderer, - PangoLayout *layout, - int x, - int y); + PangoLayout *layout, + int x, + int y); PANGO_AVAILABLE_IN_1_8 void pango_renderer_draw_layout_line (PangoRenderer *renderer, - PangoLayoutLine *line, - int x, - int y); + PangoLayoutLine *line, + int x, + int y); PANGO_AVAILABLE_IN_1_8 void pango_renderer_draw_glyphs (PangoRenderer *renderer, - PangoFont *font, - PangoGlyphString *glyphs, - int x, - int y); + PangoFont *font, + PangoGlyphString *glyphs, + int x, + int y); PANGO_AVAILABLE_IN_1_22 void pango_renderer_draw_glyph_item (PangoRenderer *renderer, - const char *text, - PangoGlyphItem *glyph_item, - int x, - int y); + const char *text, + PangoGlyphItem *glyph_item, + int x, + int y); PANGO_AVAILABLE_IN_1_8 void pango_renderer_draw_rectangle (PangoRenderer *renderer, - PangoRenderPart part, - int x, - int y, - int width, - int height); + PangoRenderPart part, + int x, + int y, + int width, + int height); PANGO_AVAILABLE_IN_1_8 void pango_renderer_draw_error_underline (PangoRenderer *renderer, - int x, - int y, - int width, - int height); + int x, + int y, + int width, + int height); PANGO_AVAILABLE_IN_1_8 void pango_renderer_draw_trapezoid (PangoRenderer *renderer, - PangoRenderPart part, - double y1_, - double x11, - double x21, - double y2, - double x12, - double x22); + PangoRenderPart part, + double y1_, + double x11, + double x21, + double y2, + double x12, + double x22); PANGO_AVAILABLE_IN_1_8 void pango_renderer_draw_glyph (PangoRenderer *renderer, - PangoFont *font, - PangoGlyph glyph, - double x, - double y); + PangoFont *font, + PangoGlyph glyph, + double x, + double y); PANGO_AVAILABLE_IN_1_8 void pango_renderer_activate (PangoRenderer *renderer); @@ -251,35 +249,35 @@ PANGO_AVAILABLE_IN_1_8 void pango_renderer_deactivate (PangoRenderer *renderer); PANGO_AVAILABLE_IN_1_8 -void pango_renderer_part_changed (PangoRenderer *renderer, - PangoRenderPart part); +void pango_renderer_part_changed (PangoRenderer *renderer, + PangoRenderPart part); PANGO_AVAILABLE_IN_1_8 -void pango_renderer_set_color (PangoRenderer *renderer, - PangoRenderPart part, - const PangoColor *color); +void pango_renderer_set_color (PangoRenderer *renderer, + PangoRenderPart part, + const PangoColor *color); PANGO_AVAILABLE_IN_1_8 -PangoColor *pango_renderer_get_color (PangoRenderer *renderer, - PangoRenderPart part); +PangoColor *pango_renderer_get_color (PangoRenderer *renderer, + PangoRenderPart part); PANGO_AVAILABLE_IN_1_38 -void pango_renderer_set_alpha (PangoRenderer *renderer, - PangoRenderPart part, - guint16 alpha); +void pango_renderer_set_alpha (PangoRenderer *renderer, + PangoRenderPart part, + guint16 alpha); PANGO_AVAILABLE_IN_1_38 -guint16 pango_renderer_get_alpha (PangoRenderer *renderer, - PangoRenderPart part); +guint16 pango_renderer_get_alpha (PangoRenderer *renderer, + PangoRenderPart part); PANGO_AVAILABLE_IN_1_8 -void pango_renderer_set_matrix (PangoRenderer *renderer, - const PangoMatrix *matrix); +void pango_renderer_set_matrix (PangoRenderer *renderer, + const PangoMatrix *matrix); PANGO_AVAILABLE_IN_1_8 -const PangoMatrix *pango_renderer_get_matrix (PangoRenderer *renderer); +const PangoMatrix *pango_renderer_get_matrix (PangoRenderer *renderer); PANGO_AVAILABLE_IN_1_20 -PangoLayout *pango_renderer_get_layout (PangoRenderer *renderer); +PangoLayout *pango_renderer_get_layout (PangoRenderer *renderer); PANGO_AVAILABLE_IN_1_20 -PangoLayoutLine *pango_renderer_get_layout_line (PangoRenderer *renderer); +PangoLayoutLine *pango_renderer_get_layout_line (PangoRenderer *renderer); G_END_DECLS |