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 | |
parent | b69d90d51a601f15c1fe79b17eedca2ce0d7996d (diff) | |
download | pango-9d284b4ae077552e80acd529559c0108e8d87a71.tar.gz |
doc cleanups
Clean up some headers, and shovel docs around.
Diffstat (limited to 'pango')
-rw-r--r-- | pango/pango-attributes.c | 4 | ||||
-rw-r--r-- | pango/pango-renderer.c | 4 | ||||
-rw-r--r-- | pango/pango-renderer.h | 230 |
3 files changed, 118 insertions, 120 deletions
diff --git a/pango/pango-attributes.c b/pango/pango-attributes.c index 15edfbe8..4db959fd 100644 --- a/pango/pango-attributes.c +++ b/pango/pango-attributes.c @@ -556,7 +556,7 @@ pango_attr_size_new_internal (int size, /** * pango_attr_size_new: - * @size: the font size, in %PANGO_SCALE<!-- -->ths of a point. + * @size: the font size, in %PANGO_SCALEths of a point. * * Create a new font-size attribute in fractional points. * @@ -571,7 +571,7 @@ pango_attr_size_new (int size) /** * pango_attr_size_new_absolute: - * @size: the font size, in %PANGO_SCALE<!-- -->ths of a device unit. + * @size: the font size, in %PANGO_SCALEths of a device unit. * * Create a new font-size attribute in device units. * diff --git a/pango/pango-renderer.c b/pango/pango-renderer.c index 00f90818..889989dd 100644 --- a/pango/pango-renderer.c +++ b/pango/pango-renderer.c @@ -1428,7 +1428,7 @@ pango_renderer_get_matrix (PangoRenderer *renderer) * * 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. + * methods, like in its draw_shape vfunc, for example. * * The returned layout should not be modified while still being * rendered. @@ -1453,7 +1453,7 @@ pango_renderer_get_layout (PangoRenderer *renderer) * * 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. + * methods, like in its draw_shape vfunc, for example. * * The returned layout line should not be modified while still being * rendered. 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 |