Re: Adding a togglebutton to the property-box



On Tue, Aug 12, 2003 at 03:41:07PM +0200, Cyrille Chepelov wrote:
[...]
Note that the TYPE_ENUM property definition is not entirely fulfilled, as you
need to provide the different choices (I wonder why it falls back to
behaving as if it was a PROP_TYPE_INT ?). It sounds perfectly reasonable to
leave it as an enum (once it's completely defined -- grep for examples),
you'll just have a combo menu with two items in it, spelt out in plain text
(I'm not convinced having a checkbox saying "double" is the right thing).

Thanks.
 
Are you sure you really need to allocate, construct, copy, then destroy and
free a temporary copy of a full-blown Line object each time you draw a
double-line? 

Probably not. There is a templine because I first planned on having the
double-line be a little above and below the line that connects the two
handles. However, that turned out cumbersome. 

So it's a leftover that I'll remove asap.

you can indeed break the line down to its individual components
and call the renderer primitives (or maybe better, add a new method to
the renderers, with an extra LineCount parameter,  and make its default 
implementation use the basic renderer primitives. Standard - Line then
delegates to your new renderer method instead of draw_line_with_arrows().

I'd rather not touch the renderers, otherwise I would've made the double-line
a style just like dashed and so on. By having most of this code in the line.c
itself, compatibility is guaranteed (well, I think it is) since everything
seems like just having two lines.

Wkr,
        Sven Vermeulen

-- 
    Save some animals, eat a vegetarian.

Attachment: pgppW7v58P9_e.pgp
Description: PGP signature



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