On 4/19/06, Ricard Marxer Piñón <ricardmp@...400...> wrote:
I agree that maybe there's no need of two separate renderers, at least at this point. Using the 'Outline mode' might be enough to speed up things.
Oh, and I forgot one more thing: newer renderers tend to use hardware acceleration, which seems to be the main direction of development at this time.
The idea of shaders would have to do with being able to have a dash stroke created with a very simple shader language, and in the same way be able to emulate the brush of a pen, penci and others using vector to vector and vector to pixel transformations at the rasterizer level.
Ah, so this is more similar to the "variable stroke width" idea. We had been discussing this for a long time. Basically, with no SVG support, we will have to "hack" it on top of SVG in back-compatible way.
Now that I think of it, it can be done via the Path Effects mechanism that we're now working on. Aaron: this would be an effect where one parameter holds an array of comma-separated distance-along-path/width pairs. From this data and from the original-d, the effect would create a double-tracked path which would look as a variable-width stroke which follows the original path. The algorithm for creating the stroke from widths can be lifted wholesale from the Calligraphic pen, and the same tool can be used to create such objects using pressure sensitivity. This will give us for free all the advantages of path effects: SVG compatibility, editability of the source path in node tool, etc. Overall I think it's a quite clean way to approach this, and not too difficult to implement (at least after the path effects framework is in place). What do you think?
The basic idea is having a two step rasterizer: 1 - segmenting curves in to small uniform arc-length segments (because this is the most perceptually simple way of drawing a curve) and iterate along the vertices and allow functions such as (getPoint, getTangent, getNormal, getCurvature, getWeight, getColor,... and other perceptual features of a point of a curve)
2 - actually draw the segments (now here is where the shader gives it's freedom). A normal shader would call the lowlevel drawing commands such as drawLine(lastPoint, getPoint()), with the strokeWeight and Color as they were. But a custom shader could change the alpha depending on the accumulated arcLength (this is an easy way of creating dashes and others) or even change the stroke, weight and color depending on the curvature. Or to call completely different drawing commands.
Unfortunately this looks like it's very difficult, if possible at all, to implement in SVG-compatible way. We have an absolute requirement that any Inkscape SVG file must display the same in any compliant SVG renderer, and we're not planning to drop this requirement.
-- bulia byak Inkscape. Draw Freely. http://www.inkscape.org