Author: Carlos Lopez <[email protected]>
Date: Sat Oct 13 20:26:16 2012 +0200
Cairo operators: add code for DARKEN blend method. The result is not exactly
the same and could be fixed later doing pixel operations.
---
synfig-core/src/synfig/cairo_operators.cpp | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/synfig-core/src/synfig/cairo_operators.cpp
b/synfig-core/src/synfig/cairo_operators.cpp
index 9f490bc..ae93917 100644
--- a/synfig-core/src/synfig/cairo_operators.cpp
+++ b/synfig-core/src/synfig/cairo_operators.cpp
@@ -74,7 +74,6 @@ void cairo_paint_with_alpha_operator(cairo_t* acr, float
alpha, Color::BlendMeth
}
case Color::BLEND_BRIGHTEN:
{
-
cairo_surface_t*
dest=cairo_copy_target_image(cairo_get_target(cr), alpha);
cairo_set_operator(cr, CAIRO_OPERATOR_HSL_LUMINOSITY);
cairo_identity_matrix(cr);
@@ -82,6 +81,15 @@ void cairo_paint_with_alpha_operator(cairo_t* acr, float
alpha, Color::BlendMeth
cairo_surface_destroy(dest);
break;
}
+ case Color::BLEND_DARKEN:
+ {
+ cairo_surface_t*
dest=cairo_copy_target_image(cairo_get_target(cr), alpha);
+ cairo_set_operator(cr, CAIRO_OPERATOR_DARKEN);
+ cairo_identity_matrix(cr);
+ cairo_mask_surface(cr, dest, 0,0);
+ cairo_surface_destroy(dest);
+ break;
+ }
case Color::BLEND_BEHIND:
{
cairo_set_operator(cr, CAIRO_OPERATOR_DEST_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