[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog backend/render_handler_agg_style.h [relea
From: |
Udo Giacomozzi |
Subject: |
[Gnash-commit] gnash ChangeLog backend/render_handler_agg_style.h [release_0_7_2] |
Date: |
Thu, 02 Nov 2006 10:57:39 +0000 |
CVSROOT: /cvsroot/gnash
Module name: gnash
Branch: release_0_7_2
Changes by: Udo Giacomozzi <udog> 06/11/02 10:57:39
Modified files:
. : ChangeLog
backend : render_handler_agg_style.h
Log message:
Correct and faster implementation of radial gradient fills
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&only_with_tag=release_0_7_2&r1=1.1412.2.43&r2=1.1412.2.44
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/render_handler_agg_style.h?cvsroot=gnash&only_with_tag=release_0_7_2&r1=1.3.2.3&r2=1.3.2.4
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/gnash/gnash/ChangeLog,v
retrieving revision 1.1412.2.43
retrieving revision 1.1412.2.44
diff -u -b -r1.1412.2.43 -r1.1412.2.44
--- ChangeLog 2 Nov 2006 08:58:51 -0000 1.1412.2.43
+++ ChangeLog 2 Nov 2006 10:57:39 -0000 1.1412.2.44
@@ -1,3 +1,8 @@
+2006-11-02 Udo Giacomozzi <address@hidden>
+
+ * backend/render_handler_agg_style.h: Correct and faster
+ implementation of radial gradient fills
+
2006-11-02 Sandro Santilli <address@hidden>
* gui/Makefile.am: always use GTK2_LIBS and GTK2_CFLAGS if USE_GUI_GTK
Index: backend/render_handler_agg_style.h
===================================================================
RCS file: /cvsroot/gnash/gnash/backend/render_handler_agg_style.h,v
retrieving revision 1.3.2.3
retrieving revision 1.3.2.4
diff -u -b -r1.3.2.3 -r1.3.2.4
--- backend/render_handler_agg_style.h 31 Oct 2006 09:40:05 -0000 1.3.2.3
+++ backend/render_handler_agg_style.h 2 Nov 2006 10:57:39 -0000 1.3.2.4
@@ -89,21 +89,6 @@
#define image_accessor_clip_transp agg::image_accessor_clone
-/// Quick hack to make radial gradients work properly. For some strange reason
-/// the xform matrix leads to incorrect results even if it is the same for
-/// linear gradients (which work). This implementation is sub-optimal because
-/// it adds two addition operations for each pixel(?), so this needs to be
-/// solved in another way (ie. calculate correct matrix)
-class my_gradient_radial
-{
- public:
- static AGG_INLINE int calculate(int x, int y, int d)
- {
- x-=512;
- y-=512;
- return int(sqrt(x*x + y*y));
- }
-};
/// AGG bitmap fill style. There are quite a few combinations possible and so
/// the class types are defined outside. The bitmap can be tiled or clipped.
@@ -590,8 +575,7 @@
typedef agg::rgba8 color_type;
typedef agg::span_allocator<color_type> span_allocator_type;
typedef agg::span_interpolator_linear<agg::trans_affine>
interpolator_type;
- //typedef agg::gradient_radial gradient_func_type;
- typedef my_gradient_radial gradient_func_type;
+ typedef agg::gradient_radial gradient_func_type;
typedef gradient_func_type gradient_adaptor_type;
typedef agg::gradient_lut<agg::color_interpolator<agg::rgba8>, 256>
color_func_type;
typedef agg::span_gradient<color_type,
@@ -603,7 +587,12 @@
interpolator_type, gradient_func_type, gradient_adaptor_type,
color_func_type, sg_type> st_type;
- st_type* st = new st_type(fs, mat, cx, 64/2); // div 2 because of
my_gradient_radial
+ // move the center of the radial fill to where it should be
+ gnash::matrix transl;
+ transl.concatenate_translation(-32.0f, -32.0f);
+ transl.concatenate(mat);
+
+ st_type* st = new st_type(fs, transl, cx, 64/2); // div 2 because we
need radius, not diameter
// NOTE: The value 64 is based on the bitmap texture used by other
// Gnash renderers which is normally 64x64 pixels for linear gradients.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog backend/render_handler_agg_style.h [release_0_7_2],
Udo Giacomozzi <=