Package mapnik :: Class Color

Class Color

 object --+    
          |    
??.instance --+
              |
             Color
Known Subclasses:

Instance Methods
 
__eq__(...)
__eq__( (Color)arg1, (Color)arg2) -> object :
 
__getinitargs__(...)
__getinitargs__( (Color)arg1) -> tuple :
 
__init__(...)
__init__( (object)arg1, (int)r, (int)g, (int)b, (int)a) -> None : Creates a new color from its RGB components and an alpha value.
 
__ne__(...)
__ne__( (Color)arg1, (Color)arg2) -> object :
 
__reduce__(...)
helper for pickle
 
__repr__(self)
repr(x)
 
__str__(...)
__str__( (Color)arg1) -> str :
 
_c___repr__(x)
repr(x)
 
to_hex_string(...)
to_hex_string( (Color)arg1) -> str : Returns the hexadecimal representation of this color.

Inherited from unreachable.instance: __new__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Variables
  __instance_size__ = 24
  __safe_for_unpickling__ = True
  _c___module__ = 'mapnik._mapnik'
Properties
  a
Gets or sets the alpha component.
  b
Gets or sets the blue component.
  g
Gets or sets the green component.
  r
Gets or sets the red component.

Inherited from object: __class__

Method Details

__eq__(...)
(Equality operator)

 

__eq__( (Color)arg1, (Color)arg2) -> object :

    C++ signature :
        _object* __eq__(mapnik::color {lvalue},mapnik::color)

__getinitargs__(...)

 

__getinitargs__( (Color)arg1) -> tuple :

    C++ signature :
        boost::python::tuple __getinitargs__(mapnik::color)

__init__(...)
(Constructor)

 

__init__( (object)arg1, (int)r, (int)g, (int)b, (int)a) -> None :
    Creates a new color from its RGB components
    and an alpha value.
    All values between 0 and 255.
    

    C++ signature :
        void __init__(_object*,int,int,int,int)

__init__( (object)arg1, (int)r, (int)g, (int)b) -> None :
    Creates a new color from its RGB components.
    All values between 0 and 255.
    

    C++ signature :
        void __init__(_object*,int,int,int)

__init__( (object)arg1, (str)color_string) -> None :
    Creates a new color from its CSS string representation.
    The string may be a CSS color name (e.g. 'blue')
    or a hex color string (e.g. '#0000ff').
    

    C++ signature :
        void __init__(_object*,std::string)

Overrides: object.__init__

__ne__(...)

 

__ne__( (Color)arg1, (Color)arg2) -> object :

    C++ signature :
        _object* __ne__(mapnik::color {lvalue},mapnik::color)

__reduce__(...)

 

helper for pickle

Overrides: object.__reduce__
(inherited documentation)

__repr__(self)
(Representation operator)

 

repr(x)

Overrides: object.__repr__
(inherited documentation)

__str__(...)
(Informal representation operator)

 

__str__( (Color)arg1) -> str :

    C++ signature :
        std::string __str__(mapnik::color {lvalue})

Overrides: object.__str__

to_hex_string(...)

 

to_hex_string( (Color)arg1) -> str :
    Returns the hexadecimal representation of this color.
    
    Example:
    >>> c = Color('blue')
    >>> c.to_hex_string()
    '#0000ff'
    

    C++ signature :
        std::string to_hex_string(mapnik::color {lvalue})


Property Details

a

Gets or sets the alpha component. The value is between 0 and 255.

Get Method:
unreachable(...)
Set Method:
unreachable(...)

b

Gets or sets the blue component. The value is between 0 and 255.

Get Method:
unreachable(...)
Set Method:
unreachable(...)

g

Gets or sets the green component. The value is between 0 and 255.

Get Method:
unreachable(...)
Set Method:
unreachable(...)

r

Gets or sets the red component. The value is between 0 and 255.

Get Method:
unreachable(...)
Set Method:
unreachable(...)