示例#1
0
 def __init__(self, parent, text='', fontname=None):
     Box.__init__(self, parent)
     BaseText.__init__(self, text, fontname)
     
     # no edge        
     self.edgeWidth = 0
     
     # init position (this is to set the size)
     self.position = 10,10,100,16
     
     # we need to know about position changes to update alignment
     self.eventPosition.Bind(self._PositionText)
示例#2
0
    def __init__(self, parent, text='', fontName=None, fontSize=9, color='k'):
        Box.__init__(self, parent)
        BaseText.__init__(self, text, fontName, fontSize, color)

        # no edge
        self.edgeWidth = 0

        # init position (this is to set the size)
        self.position = 10, 10, 100, 16

        # we need to know about position changes to update alignment
        self.eventPosition.Bind(self.UpdatePosition)
示例#3
0
    def __init__(self, parent, text="", fontName=None, fontSize=9, color="k"):
        Box.__init__(self, parent)
        BaseText.__init__(self, text, fontName, fontSize, color)

        # no edge
        self.edgeWidth = 0

        # init position (this is to set the size)
        self.position = 10, 10, 100, 16

        # we need to know about position changes to update alignment
        self.eventPosition.Bind(self.UpdatePosition)
示例#4
0
    def __init__(self, parent, text='', fontname=None):
        Box.__init__(self, parent)
        BaseText.__init__(self, text, fontname)

        # no edge
        self.edgeWidth = 0

        # init position (this is to set the size)
        self.position = 10, 10, 100, 16

        # we need to know about position changes to update alignment
        self.eventPosition.Bind(self._PositionText)
示例#5
0
文件: axes.py 项目: chiluf/visvis.dev
    def __init__(self, parent, *args, **kwargs):

        # check that the parent is a Figure
        if not isinstance(parent, _BaseFigure):
            raise Exception("The given parent for an AxesContainer " +
                            "should be a Figure.")

        # Init box
        Box.__init__(self, parent, *args, **kwargs)

        # Init position
        self.position = 0, 0, 1, 1

        # Set properties
        self.edgeWidth = 0
        self.bgcolor = None
示例#6
0
 def __init__(self, parent, *args, **kwargs):
     
     # check that the parent is a Figure 
     if not isinstance(parent, _BaseFigure):
         raise Exception("The given parent for an AxesContainer " +
                         "should be a Figure.")
     
     # Init box
     Box.__init__(self, parent, *args, **kwargs)
     
     # Init position
     self.position = 0,0,1,1
     
     # Set properties
     self.edgeWidth = 0
     self.bgcolor = None
示例#7
0
    def OnDraw(self):

        # Draw the box
        Box.OnDraw(self)

        # Draw the text
        self._DrawText()
示例#8
0
    def OnDraw(self):

        # Draw the box
        Box.OnDraw(self)

        # Draw the text
        fm = self._GetFontManager()
        if fm:
            fm.Draw(self)