Example #1
0
 def set_circle(self, *args, **kw):
     kw['cx'] = self.__dict__['x'] + kw['cx'] if kw.has_key(
         'cx') else self.__dict__['x']
     kw['cy'] = self.__dict__['y'] - kw['cy'] if kw.has_key(
         'cy') else self.__dict__['y']
     self.__dict__['elements'].append(helper.circle(*args, **kw))
     return self
Example #2
0
 def _set_origin(self):
     """ Set up origin dot and x/y coordinates for drawing canvas """
     self += helper.circle(cx=self.__dict__['x'],
                           cy=self.__dict__['y'],
                           r=2,
                           fill="black",
                           stroke="black",
                           style="fill-opacity: 50%")
     self += helper.text("(0,0)",
                         x=self.__dict__['x'] + 5,
                         y=self.__dict__['y'] - 5,
                         style="fill-opacity: 50%")
Example #3
0
 def set_circle(self, *args, **kw):
     kw['cx'] = self.x+kw['cx'] if kw.has_key('cx') else self.x
     kw['cy'] = self.y-kw['cy'] if kw.has_key('cy') else self.y
     self.elements.append(helper.circle(*args, **kw))
     return self
Example #4
0
 def _set_origin(self):
     """ Set up origin dot and x/y coordinates for drawing canvas """
     self << helper.circle(cx=self.x, cy=self.y, r=2, fill="black", stroke="black", style="fill-opacity: 50%")
     self << helper.text("(0,0)", x=self.x+5, y=self.y-5, style="fill-opacity: 50%")
Example #5
0
 def set_circle(self, *args, **kw):
     kw['cx'] = self.__dict__['x']+kw['cx'] if kw.has_key('cx') else self.__dict__['x']
     kw['cy'] = self.__dict__['y']-kw['cy'] if kw.has_key('cy') else self.__dict__['y']
     self.__dict__['elements'].append(helper.circle(*args, **kw))
     return self
Example #6
0
 def _set_origin(self):
     """ Set up origin dot and x/y coordinates for drawing canvas """
     self += helper.circle(cx=self.__dict__['x'], cy=self.__dict__['y'], r=2, fill="black", stroke="black", style="fill-opacity: 50%")
     self += helper.text("(0,0)", x=self.__dict__['x']+5, y=self.__dict__['y']-5, style="fill-opacity: 50%")