Python wx.LONG_DASH Examples

The following are 5 code examples of wx.LONG_DASH(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module wx , or try the search function .
Example #1
Source File: backend_wx.py    From Computable with MIT License 6 votes vote down vote up
def set_linestyle(self, ls):
        """
        Set the line style to be one of
        """
        DEBUG_MSG("set_linestyle()", 1, self)
        self.select()
        GraphicsContextBase.set_linestyle(self, ls)
        try:
            self._style = GraphicsContextWx._dashd_wx[ls]
        except KeyError:
            self._style = wx.LONG_DASH# Style not used elsewhere...

        # On MS Windows platform, only line width of 1 allowed for dash lines
        if wx.Platform == '__WXMSW__':
            self.set_linewidth(1)

        self._pen.SetStyle(self._style)
        self.gfx_ctx.SetPen(self._pen)
        self.unselect() 
Example #2
Source File: backend_wx.py    From matplotlib-4-abaqus with MIT License 6 votes vote down vote up
def set_linestyle(self, ls):
        """
        Set the line style to be one of
        """
        DEBUG_MSG("set_linestyle()", 1, self)
        self.select()
        GraphicsContextBase.set_linestyle(self, ls)
        try:
            self._style = GraphicsContextWx._dashd_wx[ls]
        except KeyError:
            self._style = wx.LONG_DASH# Style not used elsewhere...

        # On MS Windows platform, only line width of 1 allowed for dash lines
        if wx.Platform == '__WXMSW__':
            self.set_linewidth(1)

        self._pen.SetStyle(self._style)
        self.gfx_ctx.SetPen(self._pen)
        self.unselect() 
Example #3
Source File: backend_wx.py    From neural-network-animation with MIT License 6 votes vote down vote up
def set_linestyle(self, ls):
        """
        Set the line style to be one of
        """
        DEBUG_MSG("set_linestyle()", 1, self)
        self.select()
        GraphicsContextBase.set_linestyle(self, ls)
        try:
            self._style = GraphicsContextWx._dashd_wx[ls]
        except KeyError:
            self._style = wx.LONG_DASH# Style not used elsewhere...

        # On MS Windows platform, only line width of 1 allowed for dash lines
        if wx.Platform == '__WXMSW__':
            self.set_linewidth(1)

        self._pen.SetStyle(self._style)
        self.gfx_ctx.SetPen(self._pen)
        self.unselect() 
Example #4
Source File: backend_wx.py    From ImageFusion with MIT License 6 votes vote down vote up
def set_linestyle(self, ls):
        """
        Set the line style to be one of
        """
        DEBUG_MSG("set_linestyle()", 1, self)
        self.select()
        GraphicsContextBase.set_linestyle(self, ls)
        try:
            self._style = GraphicsContextWx._dashd_wx[ls]
        except KeyError:
            self._style = wx.LONG_DASH# Style not used elsewhere...

        # On MS Windows platform, only line width of 1 allowed for dash lines
        if wx.Platform == '__WXMSW__':
            self.set_linewidth(1)

        self._pen.SetStyle(self._style)
        self.gfx_ctx.SetPen(self._pen)
        self.unselect() 
Example #5
Source File: backend_wx.py    From twitter-stock-recommendation with MIT License 6 votes vote down vote up
def set_linestyle(self, ls):
        """
        Set the line style to be one of
        """
        DEBUG_MSG("set_linestyle()", 1, self)
        self.select()
        GraphicsContextBase.set_linestyle(self, ls)
        try:
            self._style = wxc.dashd_wx[ls]
        except KeyError:
            self._style = wx.LONG_DASH  # Style not used elsewhere...

        # On MS Windows platform, only line width of 1 allowed for dash lines
        if wx.Platform == '__WXMSW__':
            self.set_linewidth(1)

        self._pen.SetStyle(self._style)
        self.gfx_ctx.SetPen(self._pen)
        self.unselect()