--- Joerg Lehmann <[EMAIL PROTECTED]> wrote:

> This was just a bridge (for André) to the idea that a palette is just an
> ordered, finite list of colors.

Eeesh. I gotta say it's not a flat list of colors, it's a separate list
of colors for each number-of-colors. That doesn't seem to be a 
very good abstraction.

> > - Fallback could be either done by the user or by PyX. It'd be nice
> > if PyX had a default fallback (and I would advocate if too few colors,
> > take the first n colors of the variant with the smallest number of
> > colors; if too many colors, do a gradient between the first and last
> > colors of the variant with the most colors), and that the user could
> > override the default if he/she chooses.
> 
> But this gradient is not really readily defined/implemented. On the
> other hand, if we require the user to specify explicitly from which palette 
> with which total number of colors PyX should draw colors, we could
> simply cycle around and start with the first color again. 
> 
> Anyway, I think we have to wait for André's opinion on this whole issue.
> He gave my initial implementation a -1, so even if I would vote with +1,
> we would not reach a positive result ;-) I could imagine some
> compromise, though, like adding my initial proposal as a third class
> which is somewhere in between a gradient and a palette.

In the meantime, before we maybe settle on a final useful abstraction
that works for everyone, can we try something that leaves the
implementation to the programmer? What would be needed is a 
class that takes a data structure and a function as an argument,
both supplied by the programmer. The function should take "index"
and "n_indices" as an argument and access the data structure. It's
the same interface as the current gradient class, except the data
structure is hardwired. It's specifically because I didn't have access
to such a function/data structure pairing that I brought this whole
issue up in the first place. Perhaps the data structure should be 
limited to a dictionary to start with.

This might be nice for the next release, and then people would write
their own instantiations and we could look at them and see what makes
sense to put inside PyX as a result.

JDO

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
PyX-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-devel

Reply via email to