class LineTo(Line): def __init__(self): Line.__init__(self) def draw(self,ctx): ctx.save() Shape.draw(self,ctx) ctx.move_to(self.p0.x,self.p0.y) ctx.line_to(self.pe.x,self.pe.y) self.stroke(ctx) ctx.restore()