예제 #1
0
 def setSVG(self):
     attr = PositionableElement.setSVG(self)
     point1 = V(self.point1.x + self.x, self.point1.y + self.y)
     point2 = V(self.point2.x + self.x, self.point2.y + self.y)
     self.applyTransform(point1, point2)
     attr.update([('x1', point1.x), ('y1', point1.y), ('x2', point2.x),
                  ('y2', point2.y)])
     return attr
예제 #2
0
 def setSVG (self):
     pos = V (self.x, self.y)
     self.applyTransform (pos)
     attr = PositionableElement.setSVG (self) 
     attr.update ([('cx', pos.x), 
                   ('cy', pos.y),
                   ('r', self.radius)])
     return attr
예제 #3
0
파일: shapes.py 프로젝트: Koperj/SahanaEden
 def setSVG (self):
     attr = PositionableElement.setSVG (self)
     point1 = V (self.point1.x + self.x, self.point1.y + self.y)
     point2 = V (self.point2.x + self.x, self.point2.y + self.y)
     self.applyTransform (point1, point2)
     attr.update ([('x1', point1.x),
                   ('y1', point1.y),
                   ('x2', point2.x),
                   ('y2', point2.y)])
     return attr
예제 #4
0
 def setSVG(self):
     attr = PositionableElement.setSVG(self)
     pos = V(self.x, self.y)
     o = pos
     p1 = self.point1 + pos
     p2 = self.point2 + pos
     self.applyTransform(o, p1, p2)
     d1 = 'M ' + str(o)
     d2 = 'L ' + str(p1)
     d3 = 'A ' + str(self.radius) + ' ' + str(self.radius) + ' 1 0 0 '
     d3 += str(p2)
     d4 = 'Z'
     data = ' '.join([d1, d2, d3, d4])
     attr.update([('d', data)])
     return attr
예제 #5
0
 def setSVG (self):
     attr = PositionableElement.setSVG (self)
     pos = V (self.x, self.y)
     o = pos
     p1 = self.point1 + pos
     p2 = self.point2 + pos
     self.applyTransform (o, p1, p2)
     d1 = 'M ' + str (o)
     d2 = 'L ' + str (p1)
     d3 = 'A ' + str(self.radius) + ' ' + str(self.radius) + ' 1 0 0 '
     d3 += str(p2)
     d4 = 'Z'
     data = ' '.join ([d1, d2, d3, d4])
     attr.update ([('d', data)])
     return attr