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

Re: Line Endings



Le lun, nov 26, 2001, à 12:08:57 -0800, Eric Merritt a écrit:

> Hello All,
> 
>  I am fairly new to dia, but I am interested in adding
> support for crows feet style ERDs. Obviously the
> shapes are going to be fairly easy. The only stumbling
> block that I have hit so far is that I need about four
> new line ending styles. These don't seem to be part of
> the sheet spec. I am willing to touch the code if need
> be, but it would be really nice to be pointed in the
> right direction. 

Eric, 

basically, you need to implement the following:
	* in lib/arrows.[ch], add your arrow types at the end of enum
	ArrowType, and in arrow_draw() you provide the way to render these
	arrow types, in the big bad switch statement.

	* in lib/widgets.[ch], modify DiaArrowSelector

	* in app/lineprops_area.[ch], add left-pointing and right-pointing
	drawings of your arrow.

All three, of course, kept in sync. 
Finally, to get this integrated, you need to:
	* provide a patch, preferably in unidiff format, with a ChangeLog
	entry.

One very nice extra thing to do in this area, IMO would be to modify 
app/lineprops_area.[ch], rip out all its custom hand-drawing, and replace
that by invocations of arrow_draw()
(that may be a little tricky; it'd require to set up a RendererGdk on the
arrow chooser widgets), and to do basically the same in lib/widgets.[ch], so
that the user sees the line style instead of a text description. This would
be a *really* cool improvement. Of course, the same applies for the line
styles as well, but once the hard part (RenderGdk on the selection widgets)
is figured out, I guesstimate showing the actual line style using a
render->draw_line() operation would be a snap.

Of course, it all depends on the time you and other interested people wish to
donate to this project; I currently have sadly none.

Happy hacking !

	-- Cyrille

-- 
Grumpf.




[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

GuideSMACK