Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #5
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
Beispiel #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
Beispiel #7
0
    def OnDraw(self):

        # Draw the box
        Box.OnDraw(self)

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

        # Draw the box
        Box.OnDraw(self)

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