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

Re: Adding property to "line"

Le Fri, Aug 08, 2003, à 10:57:46AM +0200, Sven Vermeulen a écrit:
> On Thu, Aug 07, 2003 at 11:29:32AM -0500, Lars Clausen wrote:
> > This is if you want to do it by having a checkbox for the line object only.
> Yes.

Huh, is it certain that a checkbox is the best thing to do? Shouldn't we
have an enum an nice graphic comboboxes like for the other line properties?
(even if we start by implementing only single and double lines, you can
already argue: how much spacing between the two lines? For instance, if the
basic line width is "lw", it may be useful to have:
	line(lw), space(lw), line(lw) 
but also
	line(lw), space(lw/2), line(lw)
	line(lw), space(lw*2), line(lw)
	foreground(lw), background(lw), foreground(lw)
	foreground(lw), background(lw*2), foreground(lw)
				this would be a must with foreground=orange,
				background=yellow, to sketch a quick map to
				a destination which includes motorways

At least, SVG is mute on this topic.

> > Yes; that function would be line_draw in objects/standard/line.  Note that
> > arrow drawing is combined with line drawing, which complicates matters a
> > bit.  The line_width given to draw_line_with_arrows is used not just for
> > the rendering, but also to determine where to cut off the line.
> It seems like any change I do doesn't affect dia's results. Even if I comment
> out every single line of code in objects/standard/line.c:line_draw(), dia
> works happily further :/ What am I missing? 

objects/standard/line.c/line_draw() affects only the "Standard - Line"
object. Other objects which require to draw lines use the line_draw method
of the currently selected renderer.

(be warned that once you achieve the desired visual effect on the GDK
renderer, it's likely that you'll also have to port that to the other 
renderers (Postscript, SVG, Fig, etc.) -- unless you can share some support
library of your own).

	-- Cyrille


PGP signature

[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