def _set_axes(self): """ Set up x and y axis for drawing canvas """ self += helper.line(stroke="black", x1=self.__dict__['x'], x2=self.__dict__['x'], y1=0, y2=self.__dict__['y'] * 2) self += helper.line(stroke="black", x1=0, x2=self.__dict__['x'] * 2, y1=self.__dict__['y'], y2=self.__dict__['y'])
def set_line(self, *args, **kw): kw['x1'] = self.x+kw['x1'] if kw.has_key('x1') else self.x kw['y1'] = self.y-kw['y1'] if kw.has_key('y1') else self.y kw['x2'] = self.x+kw['x2'] if kw.has_key('x2') else self.x + 10 kw['y2'] = self.y-kw['y2'] if kw.has_key('y2') else self.y + 10 self.elements.append(helper.line(*args, **kw)) return self
def set_line(self, *args, **kw): kw['x1'] = self.__dict__['x']+kw['x1'] if kw.has_key('x1') else self.__dict__['x'] kw['y1'] = self.__dict__['y']-kw['y1'] if kw.has_key('y1') else self.__dict__['y'] kw['x2'] = self.__dict__['x']+kw['x2'] if kw.has_key('x2') else self.__dict__['x'] + 10 kw['y2'] = self.__dict__['y']-kw['y2'] if kw.has_key('y2') else self.__dict__['y'] + 10 self.__dict__['elements'].append(helper.line(*args, **kw)) return self
def set_line(self, *args, **kw): kw['x1'] = self.__dict__['x'] + kw['x1'] if kw.has_key( 'x1') else self.__dict__['x'] kw['y1'] = self.__dict__['y'] - kw['y1'] if kw.has_key( 'y1') else self.__dict__['y'] kw['x2'] = self.__dict__['x'] + kw['x2'] if kw.has_key( 'x2') else self.__dict__['x'] + 10 kw['y2'] = self.__dict__['y'] - kw['y2'] if kw.has_key( 'y2') else self.__dict__['y'] + 10 self.__dict__['elements'].append(helper.line(*args, **kw)) return self
def _set_axes(self): """ Set up x and y axis for drawing canvas """ self << helper.line(stroke="black", x1=self.x, x2=self.x, y1=0, y2=self.y*2) self << helper.line(stroke="black", x1=0, x2=self.x*2, y1=self.y, y2=self.y)
def _set_axes(self): """ Set up x and y axis for drawing canvas """ self += helper.line(stroke="black", x1=self.__dict__['x'], x2=self.__dict__['x'], y1=0, y2=self.__dict__['y']*2) self += helper.line(stroke="black", x1=0, x2=self.__dict__['x']*2, y1=self.__dict__['y'], y2=self.__dict__['y'])