From 1bca79bccbe3fb2dd214c7fd2d765ea3ac26c387 Mon Sep 17 00:00:00 2001 From: dooglus Date: Wed, 23 Jan 2008 19:58:30 +0000 Subject: [PATCH] First step towards fixing 'straight onto' blending. git-svn-id: http://svn.voria.com/code@1435 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/synfig/layer_pastecanvas.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/synfig-core/trunk/src/synfig/layer_pastecanvas.cpp b/synfig-core/trunk/src/synfig/layer_pastecanvas.cpp index d343530..d68a619 100644 --- a/synfig-core/trunk/src/synfig/layer_pastecanvas.cpp +++ b/synfig-core/trunk/src/synfig/layer_pastecanvas.cpp @@ -392,12 +392,15 @@ Layer_PasteCanvas::accelerated_render(Context context,Surface *surface,int quali // 'straight', then we need to blend transparent pixels with the // clipped areas of this tile, because with the 'straight' blend // method, even transparent pixels have an effect on the layers below - if (blend_method == Color::BLEND_STRAIGHT) + if (blend_method == Color::BLEND_STRAIGHT || blend_method == Color::BLEND_STRAIGHT_ONTO) { Surface clearsurface; Surface::alpha_pen apen(surface->begin()); apen.set_alpha(get_amount()); + + // the area we're about to blit is transparent, so it doesn't + // matter whether we use 'straight' or 'straight onto' here apen.set_blend_method(Color::BLEND_STRAIGHT); /* This represents the area we're pasting into the tile, -- 2.7.4