Commit ac39ccfb authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

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
parent 6bdca50d
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
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment