Ticket #511 (closed defect: fixed)
Change in alpha value in Mapnik color constructor between Mapnik 0.7 and 0.8
| Reported by: | springmeyer | Owned by: | artem |
|---|---|---|---|
| Priority: | critical (top) | Milestone: | 0.8.0 |
| Component: | Core Library | Version: | SVN Trunk |
| Severity: | Normal | Keywords: | |
| Cc: | Patch Needs Improvement: | no | |
| Needs Docmentation: | no | Has Patch?: | no |
| Design Decision Needed: | no |
Description
Is this an intended change? Previously the alpha input was interpreted as a fraction:
0.7:
>>> mapnik.mapnik_version()
700
>>> c = mapnik.Color('rgba(235,217,194,20)')
>>> c.a
255
>>> c = mapnik.Color('rgba(235,217,194,.5)')
>>> c.a
128
trunk:
>>> mapnik.mapnik_version()
800
>>> c = mapnik.Color('rgba(235,217,194,.5)')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
RuntimeError: Failed to parse color value: Expected a color, but got 'rgba(235,217,194,.5)'
>>> c = mapnik.Color('rgba(235,217,194,128)')
>>> c.a
128
]}}
Change History
Note: See
TracTickets for help on using
tickets.
