[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash/backend render_handler_agg_style.h
From: |
Udo Giacomozzi |
Subject: |
[Gnash-commit] gnash/backend render_handler_agg_style.h |
Date: |
Thu, 26 Oct 2006 16:34:02 +0000 |
CVSROOT: /cvsroot/gnash
Module name: gnash
Changes by: Udo Giacomozzi <udog> 06/10/26 16:34:02
Modified files:
backend : render_handler_agg_style.h
Log message:
Fixed antialiasing at bitmap edges
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/render_handler_agg_style.h?cvsroot=gnash&r1=1.2&r2=1.3
Patches:
Index: render_handler_agg_style.h
===================================================================
RCS file: /cvsroot/gnash/gnash/backend/render_handler_agg_style.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- render_handler_agg_style.h 26 Oct 2006 08:47:26 -0000 1.2
+++ render_handler_agg_style.h 26 Oct 2006 16:34:02 -0000 1.3
@@ -85,17 +85,27 @@
// Simple hack to get rid of that additional parameter for the
// image_accessor_clip constructor which breaks template usage.
+/*
template <class PixelFormat>
class image_accessor_clip_transp : public agg::image_accessor_clip<PixelFormat>
{
public:
image_accessor_clip_transp(const PixelFormat& pixf) :
agg::image_accessor_clip<PixelFormat>::image_accessor_clip(pixf,
- agg::rgba_pre(0, 0, 0, 0))
+ agg::rgba8(255, 0, 0, 0))
{
}
};
+The image_accessor_clip_transp above does not work correctly. The alpha value
+for the background color supplied to image_accessor_clip seems to be ignored
+(at least for agg::pixfmt_rgb24). Even if alpha=0 you can see that red color
+tone at the borders. So the current workaround is to use image_accessor_clone
+which repeats the pixels at the edges. This should be no problem as the clipped
+bitmap format is most probably only used for rectangular bitmaps anyway.
+*/
+#define image_accessor_clip_transp agg::image_accessor_clone
+
/// 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.