Display rendering with cairo (was Re: Rounded corners)

Am 31.05.2008 04:03, Don Blaheta schrieb:
Quoth Hans Breuer:
Am 30.05.2008 09:51, Don Blaheta schrieb:
Yes!  I didn't realise that JOIN_MITER and so forth were already-available
options, but having a single parameter for all objects-with-corners that
said whether to render it as pointy or round would be pretty much what I
was hoping for before I got carried away with the separate radius stuff.
But this still does not solve the problem of small radius not being rendered well with DiaGdkRenderer. And it is not consistent with what other renderers currently do. I'm using the cairo renderer as my reference here because cairos main goal is consistent high quality output for different output devices. See: http://cairographics.org/

I'd seen a lot of reference to Cairo in the code and ChangeLog, and
gathered that it was the direction Dia was headed (just for export
formats, or also for realtime display?)---good to read their homepage
for their goals and perspectives.

Antialised display rendering with cairo is available for a while, too. To not confuse it with the Libart antialiased rendering it is best to switch off the Libart plug-in. (See very recent ChangeLog entry.)

But I don't understand your second sentence here: it looks like Cairo
has exactly this way of breaking down line joins (into mitre, bevel,
Setting linejoin and linecaps is part of the renderer interface since the beginning, so basically every renderer should be able to do it. The point I was trying to make is: Ideally there is no semantical difference when the different renderers. For the rounded corner case we still need to find an exact definition of what it is supposed to do. If you switch

In fact, now that I'm looking for it, I see that most objects
are already using set_linejoin in a lot of places; is it just not
working?  I guess I just need to explore the code some more.

Especially with the draw_rounded_* and draw_*_with_arrows facilities there were (and probably still are) issues due to the piecewise approach these methods are implemented. The sample render-test.dia still has a reference to it: "was broken by". Also it gets quite renderer specific depending on a dedicated renderer implementing some high-level function (e.g. the cairo and wnf renderer do for rounded rect) or if it is using the piecewise approximation from lib/diarenderer.c. All renderers except xfig do for draw_*_with_arrows().

-------- 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]