use cairo_save()/cairo_restore() around calling the virtual function

2007-11-13  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpviewrenderer.c (gimp_view_renderer_draw): use
	cairo_save()/cairo_restore() around calling the virtual function
	instead of restoring the clipping area manually.


svn path=/trunk/; revision=24148
This commit is contained in:
Michael Natterer 2007-11-13 16:00:13 +00:00 committed by Michael Natterer
parent 6bdca50d0b
commit ac39ccfb91
2 changed files with 10 additions and 10 deletions

View File

@ -1,3 +1,9 @@
2007-11-13 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpviewrenderer.c (gimp_view_renderer_draw): use
cairo_save()/cairo_restore() around calling the virtual function
instead of restoring the clipping area manually.
2007-11-13 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpviewrenderervectors.c

View File

@ -606,8 +606,12 @@ gimp_view_renderer_draw (GimpViewRenderer *renderer,
if (renderer->viewable)
{
cairo_save (cr);
GIMP_VIEW_RENDERER_GET_CLASS (renderer)->draw (renderer,
widget, cr, draw_area);
cairo_restore (cr);
}
else
{
@ -630,16 +634,6 @@ gimp_view_renderer_draw (GimpViewRenderer *renderer,
gint height = renderer->height + renderer->border_width;
gdouble x, y;
if (renderer->viewable)
{
/* reset clipping because the draw() implementation is
* allowed to do additional clipping
*/
cairo_reset_clip (cr);
gdk_cairo_rectangle (cr, &render_rect);
cairo_clip (cr);
}
cairo_set_line_width (cr, renderer->border_width);
cairo_set_line_join (cr, CAIRO_LINE_JOIN_ROUND);
gimp_cairo_set_source_color (cr, &renderer->border_color);