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

Re: Rounded Polyline, and other questions?

On Fri, Jul 02, 2004 at 11:56:40AM -0700, anthonym overture com wrote:
> Anyway, I'll hopefully get around to implementing this weekend.
> If I get it done should I change the rounded rects to be done in
> the same way?

Okay, so it wasn't that weekend and I'm keeping this thread for yet
another month :)

Anyway, attached is the first part of the patch (handling the renderer
changes), as well as a screen shot of what the rendering looks like
currently.  I am not including the patch against the polygon object
because I need to somehow fix the connection points.

Which brings me to some commentary, then some questions.

I implemented the rendering in a similiar fashion as the beziergon,
in that I create a new polygon (and reuse the BezierApprox structure),
then either draw it or fill it.  This means I have to run through the
entire approximation routine twice if it is a filled polygon.  Now in
order to calculate the new placements for the connection points I would
need to run through the approximation again, this time in the
objects/standard/polygon.c class.  The approximation seems fast, but
running through it three times each draw cycle seems wasteful.

Is there a simpler way to do this?  Maybe hack the approximation code
into the lib/polyshape itself, and actually change the underlying
polygon, instead of just changing it in the rendering layer?  That
way I could do everything at once?

If I head in that direction I'd probably want to change the box to also
use a polygon approximation when it's corners are rounded, mainly because
I believe that fill styles would actually be possible for all filled shapes
at that point (although I'm just speculating, anyone want to chime in
on how filling with a style might work on rounded boxes right now)?

Anyway, looking for some opinions before I break everything.


Anthony Molinaro                                 <anthonym overture com>

Attachment: rounded3.patch.gz
Description: application/gunzip

Attachment: rounded_poly.png
Description: PNG image

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] Mail converted by Mofo Magic and the Flying D

All trademarks and copyrights are the property of their respective owners.

Other Directory Sites: SeekWonder | Directory Owners Forum