[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Changing/Setting end_arrow from python Again
- From: Philip Cavaco <Philip Cavaco ki se>
- To: discussions about usage and development of dia <dia-list gnome org>
- Subject: Re: Changing/Setting end_arrow from python Again
- Date: Mon, 09 Mar 2009 10:11:11 +0100
Thank you for that addition.
Philip
----- Original Message -----
From: Hans Breuer <hans breuer org>
Date: Sunday, March 8, 2009 10:15 pm
Subject: Re: Changing/Setting end_arrow from python Again
To: discussions about usage and development of dia <dia-list gnome org>
> At 06.03.2009 09:50, Philip Cavaco wrote:
> > Could the arrow be set similarly to colour.
> There are two ways to set colors: either by name or by tuple/array
> with 3
> data points. Both describe the complete color and not just a part
> of it.
>
> > I mean that just the type
> > can be specified as a number and the default settings for width and
> > length are used,
> >
> > o.properties["start_arrow"] = 17
> >
> This definition would be incomplete, and there is no precedence in
> the API
> (at least that I know of).
> > or a triple as you suggested.
> Yes, but exclusive.
>
> > This way we wouldn't have to add the named enums.
> The concept of setting an int by a named constant "enum" is
> completely
> orthogonal, as in:
>
> o.properties["start_arrow"] = (dia.ARROW_BLANKED_BOX, .5, .5)
>
> versus:
>
> o.properties["start_arrow"] = (17, .5, .5)
>
>
> > We would need a way to find the default width and length values
> > for a given type though. I am not sure where this information is.
> >
> Actually looking into the code should help. See: lib/arrows.h
>
> But now it is not any longer necessary cause I just commited:
>
> 2009-03-08 Hans Breuer <hans breuer org>
>
> * plug-ins/python/pydia-property.c : implement PyDia_set_Arrow() to
> allow modification of line ends from python scripts, like:
> o.properties["start_arrow"] = (17, .5, .5)
>
> -------- Hans "at" Breuer "dot" Org -----------
> Tell me what you need, and I'll tell you how to
> get along without it. -- Dilbert
> _______________________________________________
> dia-list mailing list
> dia-list gnome org
> http://mail.gnome.org/mailman/listinfo/dia-list
> FAQ at http://live.gnome.org/Dia/Faq
> Main page at http://live.gnome.org/Dia
>
>
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]