[gtksourceview] docs: clarification of gtk_source_gutter_renderer_draw()
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] docs: clarification of gtk_source_gutter_renderer_draw()
- Date: Mon, 24 Nov 2014 17:48:31 +0000 (UTC)
commit 55ff40271a86ca0e6d89e9a8e8277053ad90a9e3
Author: Sébastien Wilmet <swilmet gnome org>
Date: Mon Nov 24 18:43:08 2014 +0100
docs: clarification of gtk_source_gutter_renderer_draw()
"without padding or margin" can be interpreted differently: does it mean
the padding is not taken into account so it actually _includes_ the
padding, or does it mean that the padding is outside the
background_area?
It turns out that "without padding" meant that the padding is included
in the area delimited by background_area.
gtksourceview/gtksourcegutterrenderer.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/gtksourceview/gtksourcegutterrenderer.c b/gtksourceview/gtksourcegutterrenderer.c
index 2eb8277..e6a1318 100644
--- a/gtksourceview/gtksourcegutterrenderer.c
+++ b/gtksourceview/gtksourcegutterrenderer.c
@@ -827,16 +827,20 @@ gtk_source_gutter_renderer_begin (GtkSourceGutterRenderer *renderer,
* @end: a #GtkTextIter
* @state: a #GtkSourceGutterRendererState
*
- * Main renderering method. Implementations should implement this method to
- * draw onto the cairo context. The @background_area indicates total area of
- * the cell (without padding or margin) to be drawn. The @cell_area indicates
- * the area where content can be drawn (text, images, etc).
+ * Main renderering method. Implementations should implement this method to draw
+ * onto the cairo context. The @background_area indicates the total area of the
+ * cell to be drawn. The @cell_area indicates the area where content can be
+ * drawn (text, images, etc).
+ *
+ * The @background_area is the @cell_area plus the padding on each side (two
+ * times the #GtkSourceGutterRenderer:xpad horizontally and two times the
+ * #GtkSourceGutterRenderer:ypad vertically, so that the @cell_area is centered
+ * inside @background_area).
*
* The @state argument indicates the current state of the renderer and should
* be taken into account to properly draw the different possible states
* (cursor, prelit, selected) if appropriate.
- *
- **/
+ */
void
gtk_source_gutter_renderer_draw (GtkSourceGutterRenderer *renderer,
cairo_t *cr,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]