Rounded Polyline, and other questions?
- From: anthonym overture com
- To: dia-list gnome org
- Subject: Rounded Polyline, and other questions?
- Date: Mon, 26 Apr 2004 14:32:28 -0700
Hi,
I mentioned in a previous email that I am working on implementing the
BPMN in dia. I've done most of the shapes using the built in export
to shape functionality, which seems to work well, although it is
very easy to export a shape which cannot be imported (basically anything
with an arc will export an SVG path with an 'A' element, but then
can't be loaded).
Now I'm working on the sequence and message flows which are essentially
zigzaglines with a certain subset of arrows. One difference however is
that in the BPMN docs, the flows use orthogonal connections with rounded
corners, and I would like to mimic this.
I've looked the the current crop of programmed objects and found that
the SADT arrow does this, but this object seems to rely on a new orth
connection object which is claimed to be a short term object.
The SADT arrow also seems to not include some of the code in the
zigzagline which pushes the line behind the arrow point (behavior I like
because it makes the arrow heads look nicer).
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.
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?
Now I have a couple of questions. Is the above a feasible approach?
Are there any recommendations on different approaches? Should I
implement a rounded corner dialog into the zigzagline, such that
the corner rounding works the way it does with the box (ie, you have
an option to set a corner radius, if it's zero don't round and use
the old functions if it is greater than zero use the rounded methods)?
I'm really new to the code so could be completely off on all of the
above, please correct me if I am.
Thanks,
-Anthony
--
------------------------------------------------------------------------
Anthony Molinaro <anthonym overture com>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]