cecilio | 7 May 19:12
Picon

Occasional crash rendering a bitmap

Hi,

I'm using AGG to render documents with texts, images and music scores.
While testing rendering images, I've been experiencing occasional
crashes. Problem was finally located in file
agg_span_image_filter_rgba.h, in method [line 61]:
    void generate(color_type* span, int x, int y, unsigned len)

I've found that the crashes were caused because variable 'y' was
assigned a negative value in line 67:
    base_type::interpolator().coordinates(&x, &y);

I don't know the reason. It is a random issue. In a loop of
re-rendering the same bitmap, it will run 15 to 20 times OK before
crashing. So I tried to by-pass the problem by adding the following
lines [new lines 68 & 69]
    if (y < 0) y = 0;   //CSG. 7/May/2012. Bug by-pass.
    if (x < 0) x = 0;   //CSG. 7/May/2012. Bug by-pass.

Now, everything seems to work OK and I have no longer experienced any
problem. Also, I have not noticed any 'glitch' in the drawings.due to
this hack.

I'm just posting this just in case anyone is interested, although it
is probably a bug in my code due to not properly using AGG.

Best regards,
Cecilio

------------------------------------------------------------------------------
(Continue reading)

Alistair Lowe | 4 May 16:44
Favicon

Advice on new project

Hello everyone!

 

I’m about to impart on a project involving agg thanks to its lack of reliance on OS specific libraries and was hoping I could receive a little pre-advise before setting off on the long journey of much code and little result until I emerge at the end.

I’m wishing to integrate agg with the ShiVa3D game engine (which provides access to pixelbuffers for rendering results) and run my app on anything from Windows to Android.

 

My only question is: Is it possible to render text with agg in a manner that is not os dependant? Any advice/examples on the process if so is much appreciated.

 

Any help and advice is much appreciated.

 

Many thanks,

Ali

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Vector-agg-general mailing list
Vector-agg-general <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vector-agg-general
Nicolas Rougier | 20 Apr 17:38
Picon
Picon
Favicon

Some experiences in OpenGL / Agg


Hi,

I'm currently exploring an OpenGL implementation of the Agg library using GPU and it might interest some of you:

Font rendering
--------------

For font rendering, you can find some screenshots at:
http://code.google.com/p/freetype-gl/

I think the quality is quite decent compared to the agg quality (no wonder, I just translated agg concepts).

Spines, lines and circles
-------------------------

I'm now exploring lines, arcs and surfaces rendering. Early experiments are available at:
http://code.google.com/p/gl-agg/

I think the quality is also quite decent some far (but maybe I'm not really objective).

Bezier curves are simply interpolated using the agg tesselation algorithm.
Antialias is done by parametrizing the curve with texture coordinates and then the shader does the "magic" stuff.
(I know it's possible to render thin bezier directly on the GPU but I did not find a solution for thick ones).

Circle are made of 2 triangles and computed/antialiase by the GPU

Straight lines are made of 6 triangles and antialiased by the GPU.

Of course, you're welcome to contribute (technics, examples, etc...)

Nicolas
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
Mohammed Rashad | 11 Mar 14:58
Picon

render polyline and polygons

Hi,

I was using libgd for a long time. now I want to try AGG which says will pays off better in performance for vector rendering


i have to render some points,lines and polygons at different times;
i rendered polygon using this code

typedef agg::pixfmt_rgb24 pixfmt;
int width =640;
int height = 480;
unsigned char* buffer = new unsigned char[width *height*3];
agg::rasterizer_scanline_aa<> ras;
agg::scanline_u8 sl;
agg::rendering_buffer rbuf;
rbuf =  agg::rendering_buffer(buffer, width, height, width * 3);



 pixfmt pixf(rbuf);
         agg::renderer_base<pixfmt> ren_base = agg::renderer_base<pixfmt>(pixf);
         agg::renderer_scanline_aa_solid<agg::renderer_base<pixfmt> > ren_sl(ren_base);


 agg::path_storage my_path;




   for(pIt = pointList->begin();pIt!= pointList->end();++pIt)
         {
VectorPoint point = *(pIt);
my_path.line_to(point.x,point.y)
}

ras.add_path(my_path);

ren_sl.color(agg::rgba(255, 0, 0));
agg::render_scanlines(ras, sl, ren_sl);



with this code i can render polygon.

But my question is how to render polyline? Is it possible?
if yes please provide me with a bit of code

--
Regards,
   Rashad

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Vector-agg-general mailing list
Vector-agg-general <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vector-agg-general
Edgar 't Hart | 13 Jan 21:56
Picon

Z-Buffer

Anyone implemented a software Z-Buffer ?

I am trying to render an isometric image of a cube, with simple lighting.

The site /demo/gouraud.cpp.html could be used for simple lighting, but what about clipping triangles, or
anti-aliased lines ?
Some sort of Z-Buffer should be used, to keep track of the depth values.

Edgar

------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
向雅 | 13 Jan 18:22
Picon

Re: Non-AA Dashed Lines

Not sure your imagenation,  maybe you can post your image here.
OK let me guess,
the demo maybe proper:  agg site demo:
demo/line_patterns.cpp.html

Regards,
qinxian

致敬
向雅

------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
Vector-agg-general mailing list
Vector-agg-general <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vector-agg-general
向雅 | 13 Jan 18:15
Picon

Re: Triangle Strip Rendering with AGG

If I get you, you mean OPENGL triangle strip,
so YES, AGG can do triangle strip.
please check out gouraud.cpp in agg site /demo/gouraud.cpp.html. it's
right a triangle strip.

Regards,
qinxian

致敬
向雅

------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
Vector-agg-general mailing list
Vector-agg-general <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vector-agg-general
Ryan Brown | 12 Dec 16:52
Favicon

Non-AA Dashed Lines

Hi all,

Is it possible to draw non-anti-aliased dashed lines using a Bresenham-type algorithm in Antigrain? For instance, I'd like to draw a 45º dotted line, where every other pixel is solid.

I've tried several approaches, including using agg::renderer_outline_image with an image that defines the dashes (http://permalink.gmane.org/gmane.comp.graphics.agg/972) and using agg::conv_dash and setting gamma_threshold(0.5) (http://permalink.gmane.org/gmane.comp.graphics.agg/1428), but I can't seem to get a clean drawing for the 45º dotted case.

Thanks,
Ryan
------------------------------------------------------------------------------
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
Vector-agg-general mailing list
Vector-agg-general <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vector-agg-general
Jim Crafton | 17 Nov 18:41
Picon

Would this be of interest to folks

SSE2 Vectorization of Alphablend Code:
http://www.codeproject.com/KB/cpp/sse2alphablend.aspx

I thought this might be of use, as I recall people talking about
wanting to develop some speed improvements in the library.

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
Satya G Meka | 4 Oct 04:44
Picon

Triangle Strip Rendering with AGG

Hello,
 
I am wondering if there is a solution to use AGG to render Triangle Strips. Right now, the triangles don’t dock into each other because of the anti-aliasing and the Gamma/Dilate technique doesn’t work automatically for all color/opacity values. Any ideas would be highly appreciated. Thank you.
 
SG.
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Vector-agg-general mailing list
Vector-agg-general <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vector-agg-general
finalpatch | 3 Oct 12:42
Picon

rasterizer_scanline_aa_nogamma offers almost no speed gain

If I understand correctly, the rasterizer_scanline_aa_nogamma class was added to
provide a slightly more efficient choice for those do not need gamma correction.
However, I did some testing today and found the rasterizer_scanline_aa_nogamma
class offers almost no speed gain at all. The difference between
rasterizer_scanline_aa and rasterizer_scanline_aa_nogamma is so small that the
results are indistinguishable.  Because of this, I'd rather see
rasterizer_scanline_aa_nogamma removed from AGG as IMO the massively duplication
of code far out weights its benefit. What do you guys think?

--
Finalpatch

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1

Gmane