[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash backend/render_handler_agg.cpp ChangeLog
From: |
Udo Giacomozzi |
Subject: |
[Gnash-commit] gnash backend/render_handler_agg.cpp ChangeLog |
Date: |
Thu, 23 Aug 2007 10:11:48 +0000 |
CVSROOT: /cvsroot/gnash
Module name: gnash
Changes by: Udo Giacomozzi <udog> 07/08/23 10:11:48
Modified files:
backend : render_handler_agg.cpp
. : ChangeLog
Log message:
draw_line_strip() now applies masks
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/render_handler_agg.cpp?cvsroot=gnash&r1=1.96&r2=1.97
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4080&r2=1.4081
Patches:
Index: backend/render_handler_agg.cpp
===================================================================
RCS file: /cvsroot/gnash/gnash/backend/render_handler_agg.cpp,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -b -r1.96 -r1.97
--- backend/render_handler_agg.cpp 23 Aug 2007 09:53:03 -0000 1.96
+++ backend/render_handler_agg.cpp 23 Aug 2007 10:11:47 -0000 1.97
@@ -17,7 +17,7 @@
-/* $Id: render_handler_agg.cpp,v 1.96 2007/08/23 09:53:03 udog Exp $ */
+/* $Id: render_handler_agg.cpp,v 1.97 2007/08/23 10:11:47 udog Exp $ */
// Original version by Udo Giacomozzi and Hannes Mayr,
// INDUNET GmbH (www.indunet.it)
@@ -767,6 +767,7 @@
}
+
void draw_line_strip(const void* coords, int vertex_count, const rgba&
color)
// Draw the line strip formed by the sequence of points.
{
@@ -785,16 +786,10 @@
typedef agg::rasterizer_scanline_aa<> ras_type;
ras_type ras;
- agg::scanline_p8 sl;
agg::renderer_scanline_aa_solid<
agg::renderer_base<PixelFormat> > ren_sl(rbase);
- for (unsigned int cno=0; cno<_clipbounds.size(); cno++) {
-
- const geometry::Range2d<int>& bounds = _clipbounds[cno];
-
- apply_clip_box<ras_type> (ras, bounds);
-
+ // -- create path --
agg::path_storage path;
agg::conv_stroke<agg::path_storage> stroke(path);
stroke.width(1);
@@ -811,14 +806,55 @@
mat.transform(&pnt, point(vertex[0], vertex[1]));
path.line_to(pnt.m_x, pnt.m_y);
}
+
+ // -- render --
+
+ if (m_alpha_mask.empty()) {
+
+ // No mask active
+
+ agg::scanline_p8 sl;
+
+ for (unsigned int cno=0; cno<_clipbounds.size(); cno++) {
+
+ const geometry::Range2d<int>& bounds = _clipbounds[cno];
+
+ apply_clip_box<ras_type> (ras, bounds);
+
// The vectorial pipeline
ras.add_path(stroke);
// Set the color and render the scanlines
ren_sl.color(agg::rgba8_pre(color.m_r, color.m_g, color.m_b, color.m_a));
+ agg::render_scanlines(ras, sl, ren_sl);
+
+ }
+
+ } else {
+
+ // Mask is active!
+
+ typedef agg::scanline_u8_am<agg::alpha_mask_gray8> sl_type;
+
+ sl_type sl(m_alpha_mask.back()->get_amask());
+
+ for (unsigned int cno=0; cno<_clipbounds.size(); cno++) {
+
+ const geometry::Range2d<int>& bounds = _clipbounds[cno];
+
+ apply_clip_box<ras_type> (ras, bounds);
+
+ // The vectorial pipeline
+ ras.add_path(stroke);
+
+ // Set the color and render the scanlines
+ ren_sl.color(agg::rgba8_pre(color.m_r, color.m_g, color.m_b,
color.m_a));
agg::render_scanlines(ras, sl, ren_sl);
+
+ }
+
}
} // draw_line_strip
Index: ChangeLog
===================================================================
RCS file: /cvsroot/gnash/gnash/ChangeLog,v
retrieving revision 1.4080
retrieving revision 1.4081
diff -u -b -r1.4080 -r1.4081
--- ChangeLog 23 Aug 2007 09:55:55 -0000 1.4080
+++ ChangeLog 23 Aug 2007 10:11:48 -0000 1.4081
@@ -11,6 +11,7 @@
server/render.cpp, server/render.h: add parameter "masked" to
draw_poly(), adjust calls to this function and implement (un)masked
polygons in AGG renderer (see bug #20655).
+ * backend/render_handler_agg.cpp: draw_line_strip() now applies masks
2007-08-23 Benjamin Wolsey <address@hidden>
- [Gnash-commit] gnash backend/render_handler_agg.cpp ChangeLog,
Udo Giacomozzi <=