app: add an infrastructure that allows to stroke multiple items at once
In order to avoid visually overlapping lines: - GimpCanvasItem got a "suspend_stroking" API that allows to skip stroking and instead starts a new sub-path - GimpCanvasGroup got a "group_stroking" API that sets suspend_stroking on all its children and does one stroke after calling all items' draw().
This commit is contained in:
@ -52,26 +52,29 @@ struct _GimpCanvasItemClass
|
||||
};
|
||||
|
||||
|
||||
GType gimp_canvas_item_get_type (void) G_GNUC_CONST;
|
||||
GType gimp_canvas_item_get_type (void) G_GNUC_CONST;
|
||||
|
||||
void gimp_canvas_item_draw (GimpCanvasItem *item,
|
||||
GimpDisplayShell *shell,
|
||||
cairo_t *cr);
|
||||
GdkRegion * gimp_canvas_item_get_extents (GimpCanvasItem *item,
|
||||
GimpDisplayShell *shell);
|
||||
void gimp_canvas_item_draw (GimpCanvasItem *item,
|
||||
GimpDisplayShell *shell,
|
||||
cairo_t *cr);
|
||||
GdkRegion * gimp_canvas_item_get_extents (GimpCanvasItem *item,
|
||||
GimpDisplayShell *shell);
|
||||
|
||||
void gimp_canvas_item_set_highlight(GimpCanvasItem *item,
|
||||
gboolean highlight);
|
||||
void gimp_canvas_item_set_highlight (GimpCanvasItem *item,
|
||||
gboolean highlight);
|
||||
|
||||
void gimp_canvas_item_suspend_stroking (GimpCanvasItem *item);
|
||||
void gimp_canvas_item_resume_stroking (GimpCanvasItem *item);
|
||||
|
||||
|
||||
/* protected */
|
||||
|
||||
void _gimp_canvas_item_stroke (GimpCanvasItem *item,
|
||||
GimpDisplayShell *shell,
|
||||
cairo_t *cr);
|
||||
void _gimp_canvas_item_fill (GimpCanvasItem *item,
|
||||
GimpDisplayShell *shell,
|
||||
cairo_t *cr);
|
||||
void _gimp_canvas_item_stroke (GimpCanvasItem *item,
|
||||
GimpDisplayShell *shell,
|
||||
cairo_t *cr);
|
||||
void _gimp_canvas_item_fill (GimpCanvasItem *item,
|
||||
GimpDisplayShell *shell,
|
||||
cairo_t *cr);
|
||||
|
||||
|
||||
#endif /* __GIMP_CANVAS_ITEM_H__ */
|
||||
|
Reference in New Issue
Block a user