Re: Rounded Polyline, and other questions?



On Tue, Apr 27, 2004 at 07:58:54AM +0200, Lars Clausen wrote:
  I believe the best approach to accomplishing what I want to do would
be to migrate the rounded arrow code from the SADT object into the
diarenderer.  I'ved create a couple of functions called 'draw_rounded_polyline'
and 'draw_rounded_polyline_with_arrows', and copied the code from the
SADT arrow into the first.  I'll then probably move the arrow and point
adjusting code from the draw_polyline_with_arrows into a common function
so it can be shared.  I can then call the rounded version of
draw_polyline_with_arrows in my object.

And you're making a default implementation of draw_rounded_polyline* in
DiaRenderer, yes?

Yeah, that's where I put it.  Right now its copied fairly verbatim from
the SADT arrow class, which uses draw_line and draw_arc so should be
applicable to subclasses of the Renderer which support those functions.

  With the above approach my programmed objects essentially become a
constrained version of the zigzagline, which seems like a much cleaner
approach than some of the other arrow type programmed objects I've
looked at.  I don't know if it is actually possible to extend zigzagline
or whether I need to essentially copy it and add in the constraints?

It ought to be possible to extend the zigzagline, but methinks the
properties and object menus will get in the way -- notice how they're
defined with macros for polyline.  If you can think up a way to define
objects that's not more complex than now, but makes inheritance easier,
I'm all ears.

I'll think about it.  I've not done too horribly much 'C' OO, but once
I'm a bit more familiar with the code maybe something will come to mind.

  I'm really new to the code so could be completely off on all of the
above, please correct me if I am.

It sounds like you have a good understanding of the code already, so Iøm
not too worried.  You may want to code off the DIA_0_94_DEV branch, if
you're not doing so already.

I was not, I'll do that.

Thanks for the feedback,

-Anthony

PS. was the arrow patch I sent to this list acceptable?  Not sure if
sending to the group was the appropriate thing, but the FAQ seemed to
imply that it was.

-- 
------------------------------------------------------------------------
Anthony Molinaro                                 <anthonym overture com>



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