On Tue, 8 Jun 1999, Matthew Kirkwood wrote:
> Hi,
>
> I've been playing a little with dia on the past few
> week and despite the fact that I have no practical
> uses for the thing, I really like it and quite fancy
> hacking on it.
Actually, i have no practical use for it right now either.
> I thought I'd start on something easy, so I have some
> bits of flowchart being created and working (well,
> statement and decision boxes), and I've hit my first
> stumbling block.
>
> The begin and end blocks (as drawn by Visio, at least)
> are essentially rectancles with a semicircle on each
> end.
>
> 1. How do I draw a partial ellipse?
Use the draw_arc function. It doesn't need to have the same width and
height.
> 2. How do I ensure that, as the object gets resized,
> the semicircles remain regular?
What do you mean by regular? Do you mean non-elliptical?
You'd have to write some code for that.
> So far, my objects are based on the code from
> objects/network/computer.c which seems just to render
> the object at creation time and leave the interface to
> handle resizes, &c. While this seems very nice and
> quite flexible, I'm not exactly sure how to go about
> making the object change shape when it gets resized.
Yes, using the RenderObject makes it very easy to create objects, but you
are somewhat limited. Doing all yourself isn't much harder, and lets you
controll much more. Check out the code for other objects. Particulary
those in objects/standard/.
Also check out the corner rounding of the normal box object. It's close to
what you want.
> I've also been playing with Oracle and have some Perl
> to turn a table list into SQL creation scripts. I'd
> like to hack something like Visio's database map into
> dia, but I'm not rightly sure where I should start.
>
> Should I be able to hack something like that in without
> seriously disrupting anything?
You could do it either as an external script creating xml files. This
wouldn't touch Dia at all. Or you could add some plugin interface to Dia.
This is partly done (at least planned and as such part of the design), so
it shouldn't be too much work.
/ Alex