Пример #1
0
    def drawPoints(self, lines, kerfdir=1, close=True):

        if not lines:
            return

        if kerfdir != 0:
            lines = kerf(lines, self.boxes.burn*kerfdir, closed=close)

        self.boxes.ctx.save()
        self.boxes.ctx.move_to(*lines[0])

        for x, y in lines[1:]:
            self.boxes.ctx.line_to(x, y)

        if close:
            self.boxes.ctx.line_to(*lines[0])
        self.boxes.ctx.restore()
Пример #2
0
    def drawPoints(self, lines, kerfdir=1, close=True):

        if not lines:
            return

        if kerfdir != 0:
            lines = kerf(lines, self.boxes.burn*kerfdir, closed=close)

        self.boxes.ctx.save()
        self.boxes.ctx.move_to(*lines[0])

        for x, y in lines[1:]:
            self.boxes.ctx.line_to(x, y)

        if close:
            self.boxes.ctx.line_to(*lines[0])
        self.boxes.ctx.restore()