octave-maintainers
[Top][All Lists]
Advanced

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

Re: color_radio_property implementation


From: Michael Goffioul
Subject: Re: color_radio_property implementation
Date: Wed, 25 Apr 2007 06:31:31 +0200

On 4/25/07, Shai Ayal <address@hidden> wrote:
Hi All,

we have a color_property class in src/graphics.cc. Soon I will be
adding a radio_property class following John's suggestion. The
radio_property can have one of a list of predetermined string values
(e.g. line.marker can be one of +,o,.,t,....).
Another property class which is missing is the color_radio_property
class. This is a combination of a color and radio -- i.e. line.color
can be a color or "none".
I currently have 2 ideas on how to do this
1) Using 3 classes: color_propery, radio_property & color_radio_property
2) Using 2 classes: radio_property & color_radio_property where
color_property is replaced by color_radio_property with an empty list
of radio values.

Using approach 2 has the benefit of less code duplication, but this
comes at the cost of less compile-time type checks.
Any ideas?

FYI, I used approach 2 in my java code. Another mixed property is the
alpha value used in patches and surfaces. For instance FaceAlpha can
be a double value, "flat" or "interp". The property FaceColor can also
be a regular color, "flat" or "interp".

Michael.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]