Beispiel #1
0
    def _hline(self, pdf, width, colorname):
        hlineStart = PDFCursor(0, 0)
        hlineStart.x = 3
        hlineStart.y = self.y_start - self.ym
        hlineStart.dx = self.xm * 3
        hlineStart.dy = self.ym * 2

        hlineEnd = PDFCursor(0, 0)
        hlineEnd.x = self.xm * 2.5
        hlineEnd.y = self.y_start - self.ym
        hlineEnd.dx = self.xm * 3
        hlineEnd.dy = self.ym * 2

        color = pdf.get_color()
        color.set_color_by_name(colorname)

        hline = PDFLine(pdf.session,
                        pdf.page,
                        hlineStart,
                        hlineEnd,
                        stroke='solid',
                        color=color,
                        size=width)

        return (hlineStart, hlineEnd, hline)
    def _rline(self, pdf, width, colorname):
        rlineStart = PDFCursor(0, 0)
        rlineStart.x = self.x_start + self.xm
        rlineStart.dx = self.xm * 3
        rlineStart.dy = self.ym * 2
        rlineEnd = PDFCursor(0, 0)
        rlineEnd.x = self.x_start
        rlineEnd.dx = self.xm * 3
        rlineEnd.dy = self.ym * 2

        color = pdf.get_color()
        color.set_color_by_name(colorname)
        rline = PDFLine(pdf.session, pdf.page, rlineStart, rlineEnd, stroke='solid', color=color, size=width)

        return (rlineStart, rlineEnd, rline)
    def _lline(self, pdf, width, colorname):
        llineStart = PDFCursor(-10, 0)
        llineStart.x = self.x_start
        llineStart.dx = self.xm * 3
        llineStart.dy = self.ym * 2

        llineEnd = PDFCursor(-10, 0)
        llineEnd.x = self.x_start + self.xm
        llineEnd.dx = self.xm * 3
        llineEnd.dy = self.ym * 2

        color = pdf.get_color()
        color.set_color_by_name(colorname)

        lline = PDFLine(pdf.session, pdf.page, llineStart, llineEnd, stroke='solid', color=color, size=width)

        return (llineStart, llineEnd, lline)
    def _hline(self, pdf, width, colorname):
        hlineStart = PDFCursor(0, 0)
        hlineStart.x = 3
        hlineStart.y = self.y_start - self.ym
        hlineStart.dx = self.xm * 3
        hlineStart.dy = self.ym * 2

        hlineEnd = PDFCursor(0, 0)
        hlineEnd.x = self.xm * 2.5
        hlineEnd.y = self.y_start - self.ym
        hlineEnd.dx = self.xm * 3
        hlineEnd.dy = self.ym * 2

        color = pdf.get_color()
        color.set_color_by_name(colorname)

        hline = PDFLine(pdf.session, pdf.page, hlineStart, hlineEnd, stroke='solid', color=color, size=width)

        return (hlineStart, hlineEnd, hline)
Beispiel #5
0
    def _rline(self, pdf, width, colorname):
        rlineStart = PDFCursor(0, 0)
        rlineStart.x = self.x_start + self.xm
        rlineStart.dx = self.xm * 3
        rlineStart.dy = self.ym * 2
        rlineEnd = PDFCursor(0, 0)
        rlineEnd.x = self.x_start
        rlineEnd.dx = self.xm * 3
        rlineEnd.dy = self.ym * 2

        color = pdf.get_color()
        color.set_color_by_name(colorname)
        rline = PDFLine(pdf.session,
                        pdf.page,
                        rlineStart,
                        rlineEnd,
                        stroke='solid',
                        color=color,
                        size=width)

        return (rlineStart, rlineEnd, rline)
Beispiel #6
0
    def _lline(self, pdf, width, colorname):
        llineStart = PDFCursor(-10, 0)
        llineStart.x = self.x_start
        llineStart.dx = self.xm * 3
        llineStart.dy = self.ym * 2

        llineEnd = PDFCursor(-10, 0)
        llineEnd.x = self.x_start + self.xm
        llineEnd.dx = self.xm * 3
        llineEnd.dy = self.ym * 2

        color = pdf.get_color()
        color.set_color_by_name(colorname)

        lline = PDFLine(pdf.session,
                        pdf.page,
                        llineStart,
                        llineEnd,
                        stroke='solid',
                        color=color,
                        size=width)

        return (llineStart, llineEnd, lline)