Dear 2d-devs, I want to implement a ShapeDrawPipe, and studying the X11Renderer implementation I see that there seem to be two different approaches. One is the (C-only) ProcessPath thingy (ProcessPath.h and ProcessPath.c), the other is the ShapeSpanIterator, which is available both as Java and as C API. In the X11Renderer we go into the ProcessPath in the 'sg2d.strokeState == sg2d.STROKE_THIN' case only, and otherwise the SSI is used. The ProcessPath only uses drawLine(), drawPixel() and drawScanline() operations, while the SSI produces rectangles for use in a fillRect() operation. My questions:
- are the above observations correct? (Only want to be sure) - what kind of a difference makes the strokeState for filling a shape? I was under the impression that the stroke is only used when drawing things. Or is that for the case when the fill() operation is actually used as a 'backend' for another draw() operation? - how does the performance of the ProcessPath compare to the SSI? Which one should I use in my ShapeDrawPipe implementation? Or does it make sense to use both, just like in the X11Renderer? And if so, then why? Thanks for your answers in advance, /Roman -- http://kennke.org/blog/
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
