예제 #1
0
 def __init__(self, color=None, size=6, type='circle', opacity=1.0, rotation=0):
   Symbolizer.__init__(self)
   self.color = Color(color) if color else None
   self.size = Expression(size)
   self.type = type
   self.opacity = Expression(opacity)
   self.rotation = Expression(rotation)
   self._stroke = None
예제 #2
0
 def __init__(self, fill=None, radius=1):
   Symbolizer.__init__(self)
   if fill:
     if not isinstance(fill, Fill):
       fill = Fill(Color(fill))
   else:
     fill = Fill('#ffffff')
   self.fill = fill
   self.radius = Expression(radius)
예제 #3
0
파일: label.py 프로젝트: ecor/geoscript-py
 def __init__(self,
              property,
              font=None,
              color=None,
              priority=None,
              options=None):
     Symbolizer.__init__(self)
     self.property = Property(property)
     self.color = Color(color) if color else None
     self.priority = Property(priority) if priority else None
     self.options = options if options else {}
     self._font = Font(font) if font else None
     self._halo = None
     self._icon = None
     self._placement = None
예제 #4
0
    def _colormap(self):
        f = self.factory
        map = f.createColorMap()
        map.setType(_type[self.interpolate])

        for v in self.values:
            entry = f.createColorMapEntry()
            entry.setQuantity(Expression(v[0]).expr)

            col = Color(v[1])
            entry.setColor(col.expr)
            entry.setOpacity(Expression(col._color.alpha / 255.0).expr)

            map.addColorMapEntry(entry)

        return map
예제 #5
0
 def __init__(self,
              color='#000000',
              width=1,
              dash=None,
              cap=None,
              join=None,
              opacity=1.0):
     Symbolizer.__init__(self)
     self.color = Color(color)
     self.width = Expression(width)
     self.opacity = Expression(opacity)
     self.dash = dash
     self.cap = Expression(cap) if cap else None
     self.join = Expression(join) if join else None
     self._hatch = None
     self._icon = None
예제 #6
0
 def __init__(self, color=None, opacity=1.0):
     Symbolizer.__init__(self)
     self.color = Color(color) if color else None
     self.opacity = Expression(opacity)
     self._icon = None
     self._hatch = None