예제 #1
0
    def __init__(self, style=pyemf.PS_SOLID, width=1, color=0,
                 styleentries=[]):
        """Create pen.
        styleentries is a list of dash and space lengths."""

        pyemf._EMR._EXTCREATEPEN.__init__(self)
        self.style = style
        self.penwidth = width
        self.color = pyemf._normalizeColor(color)
        self.brushstyle = 0x0  # solid

        if style & pyemf.PS_USERSTYLE == 0:
            self.styleentries = []
        else:
            self.styleentries = styleentries

        self.numstyleentries = len(self.styleentries)
예제 #2
0
    def __init__(self, style=pyemf.PS_SOLID, width=1, color=0,
                 styleentries=[]):
        """Create pen.
        styleentries is a list of dash and space lengths."""

        pyemf._EMR._EXTCREATEPEN.__init__(self)
        self.style = style
        self.penwidth = width
        self.color = pyemf._normalizeColor(color)
        self.brushstyle = 0x0  # solid

        if style & pyemf.PS_STYLE_MASK != pyemf.PS_USERSTYLE:
            styleentries = []

        self.numstyleentries = len(styleentries)
        if styleentries:
            self.unhandleddata = struct.pack(
                "i"*self.numstyleentries, *styleentries)
예제 #3
0
    def __init__(self,
                 style=pyemf.PS_SOLID,
                 width=1,
                 color=0,
                 styleentries=[]):
        """Create pen.
        styleentries is a list of dash and space lengths."""

        pyemf._EMR._EXTCREATEPEN.__init__(self)
        self.style = style
        self.penwidth = width
        self.color = pyemf._normalizeColor(color)
        self.brushstyle = 0x0  # solid

        if style & pyemf.PS_USERSTYLE == 0:
            self.styleentries = []
        else:
            self.styleentries = styleentries

        self.numstyleentries = len(self.styleentries)
예제 #4
0
파일: emf_export.py 프로젝트: yqman/veusz
    def __init__(self,
                 style=pyemf.PS_SOLID,
                 width=1,
                 color=0,
                 styleentries=[]):
        """Create pen.
        styleentries is a list of dash and space lengths."""

        pyemf._EMR._EXTCREATEPEN.__init__(self)
        self.style = style
        self.penwidth = width
        self.color = pyemf._normalizeColor(color)
        self.brushstyle = 0x0  # solid

        if style & pyemf.PS_STYLE_MASK != pyemf.PS_USERSTYLE:
            styleentries = []

        self.numstyleentries = len(styleentries)
        if styleentries:
            self.unhandleddata = struct.pack("i" * self.numstyleentries,
                                             *styleentries)