Re: Specialized rendering (was Re: Feature request)



Hi Max,
At 18.01.2011 08:50, Max Wahler wrote:
[...}

Yesterday evening, I figured out that I have to modify pydia-render.c
and it works! =) Is there any reason why higher level methods like the
rounded rectangle methods are not treated in that class?
Simply not having the need for them ws my reason to not implement them.
IIRC these functions got added after the initial implementation of pydia-render.c.

Otherwise I'd like to make a patch
This is what I wanted to hear ;-)

and commit it to the repository.
This would only work if you have general commit (or better push) access to the gnome git repository, but even if you have ...

Maybe it's better if someone takes a look at it before I do it ;-)

... you should ask for review. Which I just heard ;)

Just sending the patch to this mailing-list should do it.

Another thing on the SVG renderer: You say that the Python renderer is
far more complete and less buggy than the C version,
That comment should have include: ... as of this writing ... which was 2003! Nowadays a lot of fixes are integrated with the default C renderer, which make the comment a bit historic. See:
        git log lib/diasvgrenderer.c
and compare the dates.

but it seems that
the generated code is rendered wrong in some viewers, for example in
Firefox.
There was a bad bug fixed on master just a few days ago, namely loosing all colors. But other than that I'm not aware of any rendering issues with Firefox (and my default test: render-test.dia). Depending on the issue you see, this may be some limitation in Firefox or Dia's renderer. The SVG specification is quite complex and I'm hesitant to add workarounds to Dia's renderers to make the result look better in some viewers. The one where I decided to do otherwise has no positive impact anymore. Compare the output of render-test via diasvg.py and built-in in Firefox - the one from the built-in is supposed to be smaller ...

So is there any reason why I should not use the attributes for
rounding a rectangle and instead compose the rounded rectangles with
other shapes?

Three reasons:
 1) Keep it simple, is the changed result worth the extra complexity?
 2) Keep it different. As the example given above shows: there are issues
    with renderers, where two different approaches may give one working
    as desired.
 3) You'll probably find some viewers/editors not correctly handling it.

I don't know what my renderer will look like once I'm finished, but
maybe I commit it to GIT too.
You are of course free to commit anything you want to your local version of the git repository - that's the power of distributed version control. But please don't push such changes to the central repository - even if you would have the access rights to do so.

From my experience changes with an unclear goal are hard to maintain just a few weeks later (if not from the beginning).

In any case I write an entry in our
company's blog where I explain how to integrate Dia with Concordion.

Please post the link than.

Thanks,
        Hans

-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to
get along without it.                -- Dilbert



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]