Author: Carlos Lopez <[email protected]>
Date: Mon Apr 8 17:46:33 2013 +0200
Fix bug #371 - Checkerboard layer renders darker with alpha < 0 in Cairo
---
.../src/modules/mod_geometry/checkerboard.cpp | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/synfig-core/src/modules/mod_geometry/checkerboard.cpp
b/synfig-core/src/modules/mod_geometry/checkerboard.cpp
index cd304d1..59c74b4 100644
--- a/synfig-core/src/modules/mod_geometry/checkerboard.cpp
+++ b/synfig-core/src/modules/mod_geometry/checkerboard.cpp
@@ -252,23 +252,19 @@ CheckerBoard::accelerated_cairorender(Context
context,cairo_surface_t *surface,i
// this will modify the w and h values in pixels.
desc.set_flags(RendDesc::PX_ASPECT|RendDesc::IM_SPAN);
desc.set_tl_br(Point(-newsize[0], +newsize[1]), Point(+newsize[0],
-newsize[1]));
- double subsx(1/desc.get_pw());
- double subsy(1/desc.get_ph());
- double subtx(-desc.get_tl()[0]*subsx);
- double subty(-desc.get_tl()[1]*subsy);
cairo_surface_t* subimage=cairo_surface_create_similar(surface,
CAIRO_CONTENT_COLOR_ALPHA, desc.get_w(), desc.get_h());
cairo_t* subcr=cairo_create(subimage);
cairo_save(subcr);
cairo_set_source_rgba(subcr, r, g, b, a);
cairo_rectangle(subcr, 0, 0, desc.get_w()/2, desc.get_h()/2);
cairo_clip(subcr);
- cairo_paint_with_alpha(subcr, get_amount());
+ cairo_paint(subcr);
cairo_restore(subcr);
cairo_save(subcr);
cairo_set_source_rgba(subcr, r, g, b, a);
cairo_rectangle(subcr, desc.get_w()/2, desc.get_h()/2, desc.get_w()/2,
desc.get_h()/2);
cairo_clip(subcr);
- cairo_paint_with_alpha(subcr, get_amount());
+ cairo_paint(subcr);
cairo_restore(subcr);
cairo_t* cr=cairo_create(surface);
------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire
the most talented Cisco Certified professionals. Visit the
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl