> This was imported perfectly for me, if it still fails to you, maybe
> you should filla bug report (Try validation your svg first using the
> svg validator - http://validator.w3.org/ ).

But not worked for me when whole document is imported.
I checked the document and it passed SVG 1.1. validation successfully. I got
empty paths imported,
and merged empty path.
I will report this issue as a bug.

> GIMP renders path in XOR painting mode for the sake of visibility (XOR
> mode is usually easily visible on most possible backgrounds). As a
> result, when drawing two paths one above the other, you won't see any
> of them since "pixel XOR path XOR path = pixel".
> Getting rid of XOR drawing and find something better is on the todo list

So this is a cause why I got only outline path visible (after code changes
in 'svg_handler_poly_start'). UV layout path is organized as polygonal grid.
Generally, if you have a grid of polys and render it XOR-ed, the result is
outline, because inner polylines are overlapping. Huh!

> GIMP uses gdk for drawing (as far as I remember) indeed, but I have no
> idea about the preformance issues. I do know that drawing paths is
> indeed a bit slow, but I have no numbers of what should/shouldn't be
> normal...

It is terribly slow. You don't even need a code profiler to measure a task
of painting with path(s) visible and hidden. The units are in seconds.
The uv layout path is from a game low poly model, consisted of cca 1000
quads. Some parts are mirrored in uv's so ...it is even less when counting
uv vertices.

> GIMP is not meant for vector graphics, and therefore I believe that
> importing paths as is from svg is enough. Furthermore, since librsvg
> is a hard dependancy of GIMP, any plugin can link against librsvg and
> know that it will be available.

This means that code for SVG parsing resides in GIMP and in SVG library.
When SVG standard upgrades the GIMP SVG parsing code should be updated too.
This is error prone solution.
I think that better solution is that 'librsvg' do the parsing job and that
GIMP can fetch points from the lib to render. The same points which GIMP now
parses from SVG document. These are just plain points, without any
stylization which suffice for rendering path. If you consider rendering
paths out of OpenGL you will need just points issued via glVertex2**
command. The curves needs additional work to interpolate in between points,
but final points are also rendered as lines.

Gimp-developer mailing list

Reply via email to