1 |
# Copyright (c) 2001, 2002 by Intevation GmbH |
# Copyright (c) 2001, 2002 by Intevation GmbH |
2 |
# Authors: |
# Authors: |
3 |
# Bernhard Herzog <[email protected]> |
# Bernhard Herzog <[email protected]> |
4 |
|
# Jonathan Coles <[email protected]> |
5 |
# |
# |
6 |
# This program is free software under the GPL (>=v2) |
# This program is free software under the GPL (>=v2) |
7 |
# Read the file COPYING coming with Thuban for details. |
# Read the file COPYING coming with Thuban for details. |
22 |
ALIGN_LEFT, ALIGN_RIGHT, ALIGN_BASELINE |
ALIGN_LEFT, ALIGN_RIGHT, ALIGN_BASELINE |
23 |
|
|
24 |
from Thuban.Model.classification import Classification |
from Thuban.Model.classification import Classification |
25 |
|
from Thuban.Model.color import Color |
26 |
|
|
27 |
|
|
28 |
class MapRenderer: |
class MapRenderer: |
81 |
for i in self.layer_ids(layer): |
for i in self.layer_ids(layer): |
82 |
value = None |
value = None |
83 |
shape = layer.Shape(i) |
shape = layer.Shape(i) |
84 |
lc = layer.classification |
lc = layer.GetClassification() |
85 |
field = lc.field |
field = lc.field |
86 |
|
|
87 |
if field is not None: |
if field is not None: |
100 |
old_prop = prop |
old_prop = prop |
101 |
|
|
102 |
if shapetype == SHAPETYPE_ARC: |
if shapetype == SHAPETYPE_ARC: |
103 |
fill = None |
fill = Color.None |
104 |
else: |
else: |
105 |
fill = prop.GetFill() |
fill = prop.GetFill() |
106 |
|
|
107 |
if fill is None: |
if fill is Color.None: |
108 |
brush = wxTRANSPARENT_BRUSH |
brush = wxTRANSPARENT_BRUSH |
109 |
else: |
else: |
110 |
color = wxColour(fill.red * 255, |
color = wxColour(fill.red * 255, |
114 |
|
|
115 |
stroke = prop.GetStroke() |
stroke = prop.GetStroke() |
116 |
stroke_width = prop.GetStrokeWidth() |
stroke_width = prop.GetStrokeWidth() |
117 |
if stroke is None: |
if stroke is Color.None: |
118 |
pen = wxTRANSPARENT_PEN |
pen = wxTRANSPARENT_PEN |
119 |
else: |
else: |
120 |
color = wxColour(stroke.red * 255, |
color = wxColour(stroke.red * 255, |