|
From: Jerry <je...@ch...> - 2007-02-14 14:42:17
|
Hi Paul,
Thanks, that's good news.
Whilst writing my SVG compiler I've found a couple of bugs in my mods to
AGG2D, in the Polygon and Polyline functions. I'll be posting some an update
shortly.
ATB
Jerry.
----- Original Message -----
From: "Paul E Ourada" <pau...@co...>
To: <vec...@li...>
Sent: Tuesday, February 13, 2007 5:49 AM
Subject: Re: [AGG] AGG2D-2.4 port available
> Hi Jerry et. al. -
>
> I have also compiled your port on Ubuntu Linux Edgy. I also ported
> Agg2DDemo to X11 and FreeType using agg_platform_support.cpp/.h
> agg_font_freetype.cpp/.h.
>
> Build environment is Eclipse/g++.
>
> I found that there was a warning regarding int/unsigned int used in
> comparison in an agg-2.4 file, agg_image_accessors.h, in
> image_accessor_clone::span(). This warning came up when instantiating
> templatized function Agg2DRenderer::renderImage() which instantiates the
> templatized function agg::render_scanlines() in several places. The odd
> thing about this warning is that g++ refused to complete the compilation
> - everyplace that agg::render_scanlines() was instantiated was declared
> as an error - or at least that's what showed up in Eclipse. Still, the
> archiver was not kicked off until the warning was resolved (I compiled
> Agg2D as a separate library.)
>
> Code was:
> AGG_INLINE const int8u* span(int x, int y, unsigned len)
> {
> m_x = m_x0 = x;
> m_y = y;
> if(y >= 0 && y < (int)m_pixf->height() &&
> x >= 0 && x+len <= (int)m_pixf->width())
> {
> return m_pix_ptr = m_pixf->pix_ptr(x, y);
> }
> m_pix_ptr = 0;
> return pixel();
> }
>
> Code now is:
> AGG_INLINE const int8u* span(int x, int y, unsigned len)
> {
> m_x = m_x0 = x;
> m_y = y;
> if(y >= 0 && y < (int)m_pixf->height() &&
>>> x >= 0 && (int)(x+len) <= (int)m_pixf->width()) //cast
> x+len to int
> {
> return m_pix_ptr = m_pixf->pix_ptr(x, y);
> }
> m_pix_ptr = 0;
> return pixel();
> }
>
> Jerry, I hope I'm not overstating the obvious, but in your code at the
> top of Agg2DRenderer::renderImage(), you mentioned that you were puzzled
> at needing the const cast. It is due to the fact that renderImage()
> promises that it won't modify the image, but when you pass the reference
> to the image buffer into agg::pixfmt_bgra32::pixfmt_bgra32() (via
> parameterized class, pixfmt_alpha_blend_rgba), that constructor makes no
> such promise. I didn't delve any deeper into the code to ascertain
> whether the promise is actually kept, but I suspect that it is, since
> this method should only be reading the image in order to render it into
> another buffer (I think! :)).
>
> Paul
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier.
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Vector-agg-general mailing list
> Vec...@li...
> https://lists.sourceforge.net/lists/listinfo/vector-agg-general
>
>
|