Author: Carlos Lopez <[email protected]>
Date: Fri Oct 12 13:03:22 2012 +0200
Cairo operators: Add support for STRAIGHT_ONTO
---
synfig-core/src/synfig/cairo_operators.cpp | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/synfig-core/src/synfig/cairo_operators.cpp
b/synfig-core/src/synfig/cairo_operators.cpp
index 4e9645e..9f490bc 100644
--- a/synfig-core/src/synfig/cairo_operators.cpp
+++ b/synfig-core/src/synfig/cairo_operators.cpp
@@ -100,6 +100,23 @@ void cairo_paint_with_alpha_operator(cairo_t* acr, float
alpha, Color::BlendMeth
cairo_paint_with_alpha(cr, alpha);
break;
}
+ case Color::BLEND_STRAIGHT_ONTO:
+ {
+ cairo_surface_t*
dest=cairo_copy_target_image(cairo_get_target(cr));
+ cairo_set_operator(cr, CAIRO_OPERATOR_IN);
+ cairo_paint(cr);
+ cairo_surface_t*
source=cairo_copy_target_image(cairo_get_target(cr));
+ cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR);
+ cairo_paint(cr);
+ cairo_set_source_surface(cr, dest, 0, 0);
+ cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
+ cairo_paint(cr);
+ cairo_set_source_surface(cr, source, 0, 0);
+ cairo_paint_with_alpha_operator(cr, alpha,
Color::BLEND_STRAIGHT);
+ cairo_surface_destroy(dest);
+ cairo_surface_destroy(source);
+ break;
+ }
default:
{
cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl