def set_text(self, *args, **kw): kw['x'] = self.__dict__['x'] + kw['x'] if kw.has_key( 'x') else self.__dict__['x'] kw['y'] = self.__dict__['y'] - kw['y'] if kw.has_key( 'y') else self.__dict__['y'] self.__dict__['elements'].append(helper.text(*args, **kw)) return self
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%")
def set_text(self, *args, **kw): kw['x'] = self.x+kw['x'] if kw.has_key('x') else self.x kw['y'] = self.y-kw['y'] if kw.has_key('y') else self.y self.elements.append(helper.text(*args, **kw)) return self
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%")
def set_text(self, *args, **kw): kw['x'] = self.__dict__['x']+kw['x'] if kw.has_key('x') else self.__dict__['x'] kw['y'] = self.__dict__['y']-kw['y'] if kw.has_key('y') else self.__dict__['y'] self.__dict__['elements'].append(helper.text(*args, **kw)) return self
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%")