class_docstr: GraphicsItem displaying unscaled text (the text will always appear normal even inside a scaled ViewBox). 
docstr: ================  =================================================================================
  **Arguments:**
  *text*            The text to display
  *color*           The color of the text (any format accepted by pg.mkColor)
  *html*            If specified, this overrides both *text* and *color*
  *anchor*          A QPointF or (x,y) sequence indicating what region of the text box will
                    be anchored to the item's position. A value of (0,0) sets the upper-left corner
                    of the text box to be at the position specified by setPos(), while a value of (1,1)
                    sets the lower-right corner.
  *border*          A pen to use when drawing the border
  *fill*            A brush to use when filling within the border
  *angle*           Angle in degrees to rotate text. Default is 0; text will be displayed upright.
  *rotateAxis*      If None, then a text angle of 0 always points along the +x axis of the scene.
                    If a QPointF or (x,y) sequence is given, then it represents a vector direction
                    in the parent's coordinate system that the 0-degree line will be aligned to. This
                    Allows text to follow both the position and orientation of its parent while still
                    discarding any scale and shear factors.
  *ensureInBounds*  Ensures that the entire TextItem will be visible when using autorange, but may
                    produce runaway scaling in certain circumstances (See issue #2642). Setting to 
                    "True" retains legacy behavior.
  ================  =================================================================================
  
  
  The effects of the `rotateAxis` and `angle` arguments are added independently. So for example:
  
    * rotateAxis=None, angle=0 -> normal horizontal text
    * rotateAxis=None, angle=90 -> normal vertical text
    * rotateAxis=(1, 0), angle=0 -> text aligned with x axis of its parent
    * rotateAxis=(0, 1), angle=0 -> text aligned with y axis of its parent
    * rotateAxis=(1, 0), angle=90 -> text orthogonal to x axis of its parent
docstr_tok: ["================","=================================================================================","*","*","Arguments",":","*","*","*","text","*","The","text","to","display","*","color","*","The","color","of","the","text","(","any","format","accepted","by","pg.mkColor",")","*","html","*","If","specified",",","this","overrides","both","*","text","*","and","*","color","*","*","anchor","*","A","QPointF","or","(","x",",","y",")","sequence","indicating","what","region","of","the","text","box","will","be","anchored","to","the","item","'s","position",".","A","value","of","(","0,0",")","sets","the","upper-left","corner","of","the","text","box","to","be","at","the","position","specified","by","setPos","(",")",",","while","a","value","of","(","1,1",")","sets","the","lower-right","corner",".","*","border","*","A","pen","to","use","when","drawing","the","border","*","fill","*","A","brush","to","use","when","filling","within","the","border","*","angle","*","Angle","in","degrees","to","rotate","text",".","Default","is","0",";","text","will","be","displayed","upright",".","*","rotateAxis","*","If","None",",","then","a","text","angle","of","0","always","points","along","the","+x","axis","of","the","scene",".","If","a","QPointF","or","(","x",",","y",")","sequence","is","given",",","then","it","represents","a","vector","direction","in","the","parent","'s","coordinate","system","that","the","0-degree","line","will","be","aligned","to",".","This","Allows","text","to","follow","both","the","position","and","orientation","of","its","parent","while","still","discarding","any","scale","and","shear","factors",".","*","ensureInBounds","*","Ensures","that","the","entire","TextItem","will","be","visible","when","using","autorange",",","but","may","produce","runaway","scaling","in","certain","circumstances","(","See","issue","#","2642",")",".","Setting","to","``","True","''","retains","legacy","behavior",".","================","=================================================================================","The","effects","of","the","`","rotateAxis","`","and","`","angle","`","arguments","are","added","independently",".","So","for","example",":","*","rotateAxis=None",",","angle=0","-",">","normal","horizontal","text","*","rotateAxis=None",",","angle=90","-",">","normal","vertical","text","*","rotateAxis=","(","1",",","0",")",",","angle=0","-",">","text","aligned","with","x","axis","of","its","parent","*","rotateAxis=","(","0",",","1",")",",","angle=0","-",">","text","aligned","with","y","axis","of","its","parent","*","rotateAxis=","(","1",",","0",")",",","angle=90","-",">","text","orthogonal","to","x","axis","of","its","parent"]
code: def __init__(
      self,
      text="",
      color=(200, 200, 200),
      html=None,
      anchor=(0, 0),
      border=None,
      fill=None,
      angle=0,
      rotateAxis=None,
      ensureInBounds=False,
  ):
      """
      ================  =================================================================================
      **Arguments:**
      *text*            The text to display
      *color*           The color of the text (any format accepted by pg.mkColor)
      *html*            If specified, this overrides both *text* and *color*
      *anchor*          A QPointF or (x,y) sequence indicating what region of the text box will
                        be anchored to the item's position. A value of (0,0) sets the upper-left corner
                        of the text box to be at the position specified by setPos(), while a value of (1,1)
                        sets the lower-right corner.
      *border*          A pen to use when drawing the border
      *fill*            A brush to use when filling within the border
      *angle*           Angle in degrees to rotate text. Default is 0; text will be displayed upright.
      *rotateAxis*      If None, then a text angle of 0 always points along the +x axis of the scene.
                        If a QPointF or (x,y) sequence is given, then it represents a vector direction
                        in the parent's coordinate system that the 0-degree line will be aligned to. This
                        Allows text to follow both the position and orientation of its parent while still
                        discarding any scale and shear factors.
      *ensureInBounds*  Ensures that the entire TextItem will be visible when using autorange, but may
                        produce runaway scaling in certain circumstances (See issue #2642). Setting to
                        "True" retains legacy behavior.
      ================  =================================================================================
  
  
      The effects of the `rotateAxis` and `angle` arguments are added independently. So for example:
  
        * rotateAxis=None, angle=0 -> normal horizontal text
        * rotateAxis=None, angle=90 -> normal vertical text
        * rotateAxis=(1, 0), angle=0 -> text aligned with x axis of its parent
        * rotateAxis=(0, 1), angle=0 -> text aligned with y axis of its parent
        * rotateAxis=(1, 0), angle=90 -> text orthogonal to x axis of its parent
      """
  
      self.anchor = Point(anchor)
      self.rotateAxis = (
          None if rotateAxis is None else Point(rotateAxis)
      )
      # self.angle = 0
      GraphicsObject.__init__(self)
      self.textItem = QtWidgets.QGraphicsTextItem()
      self.textItem.setParentItem(self)
      self._lastTransform = None
      self._lastScene = None
  
      # Note: The following is pretty scuffed; ideally there would likely be
      # some inheritance changes, But this is the least-intrusive thing that
      # works for now
      if ensureInBounds:
          self.dataBounds = None
  
      self._bounds = QtCore.QRectF()
      if html is None:
          self.setColor(color)
          self.setText(text)
      else:
          self.setHtml(html)
      self.fill = fn.mkBrush(fill)
      self.border = fn.mkPen(border)
      self.setAngle(angle)
  
imports: from math import atan2, degrees
  from ..None import functions
  from ..Point import Point
  from ..Qt import QtCore, QtGui, QtWidgets
  from .GraphicsObject import GraphicsObject
label_desc: Use image node_id 1 to create a new TextItem object from inherited base classes: GraphicsObject with example: obj = TextItem(text, color, html, anchor, border, fill, angle, rotateAxis, ensureInBounds)