MapServer / MapServer-import

3 stars 2 forks source link

Enhancements to colorObj #509

Closed tbonfort closed 12 years ago

tbonfort commented 12 years ago

Reporter: sgillies@frii.com Date: 2003/12/08 - 04:00

Am grouping this issue within the Primitive MapScript Classes Project:

http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PrimitiveMapScriptClassesProject

To do:

- refactor colorObj constructor to take 3 optional RGB args (default to 0).
- add a setRGB method as in PHP-MapScript
- add a setHex method allowing

    c = colorObj()
    c.setHex('#ffffff')

- add a toHex method which returns the color as a hex string
tbonfort commented 12 years ago

Author: sgillies@frii.com Date: 2003/12/08 - 04:26

Resolved.  Don't think there is much else to add to colorObj, except maybe
a method that returns color strings like 0xffffff instead of #ffffff.