original_docstring: 
          Draw the symbol into a rectangle
  
          The symbol is painted centered and scaled into the target rectangle.
          It is always painted uncached and the pin point is ignored.
  
          This method is primarily intended for drawing a symbol to the legend.
  
          :param QPainter painter: Painter
          :param point_or_rect: Position or target rectangle of the symbol in screen coordinates
          :type point_or_rect: QPointF or QPoint or QRectF
          
docstring: Draw the symbol into a rectangle
  The symbol is painted centered and scaled into the target rectangle.
  It is always painted uncached and the pin point is ignored.
  
  This method is primarily intended for drawing a symbol to the legend.
docstring_tokens: Draw the symbol into a rectangle The symbol is painted centered and scaled into the target rectangle . It is always painted uncached and the pin point is ignored . This method is primarily intended for drawing a symbol to the legend .
code: def drawSymbol(self, painter, point_or_rect):
          """
          Draw the symbol into a rectangle
  
          The symbol is painted centered and scaled into the target rectangle.
          It is always painted uncached and the pin point is ignored.
  
          This method is primarily intended for drawing a symbol to the legend.
  
          :param QPainter painter: Painter
          :param point_or_rect: Position or target rectangle of the symbol in screen coordinates
          :type point_or_rect: QPointF or QPoint or QRectF
          """
          if isinstance(point_or_rect, (QPointF, QPoint)):
              # drawSymbol( QPainter *, const QPointF & )
              self.drawSymbols(painter, [point_or_rect])
              return
          # drawSymbol( QPainter *, const QRectF & )
          rect = point_or_rect
          assert isinstance(rect, QRectF)
          if self.__data.style == QwtSymbol.NoSymbol:
              return
          if self.__data.style == QwtSymbol.Graphic:
              self.__data.graphic.graphic.render(painter, rect, Qt.KeepAspectRatio)
          elif self.__data.style == QwtSymbol.Path:
              if self.__data.path.graphic.isNull():
                  self.__data.path.graphic = qwtPathGraphic(
                      self.__data.path.path, self.__data.pen, self.__data.brush
                  )
              self.__data.path.graphic.render(painter, rect, Qt.KeepAspectRatio)
              return
          elif self.__data.style == QwtSymbol.SvgDocument:
              if self.__data.svg.renderer is not None:
                  scaledRect = QRectF()
                  sz = QSizeF(self.__data.svg.renderer.viewBoxF().size())
                  if not sz.isEmpty():
                      sz.scale(rect.size(), Qt.KeepAspectRatio)
                      scaledRect.setSize(sz)
                      scaledRect.moveCenter(rect.center())
                  else:
                      scaledRect = rect
                  self.__data.svg.renderer.render(painter, scaledRect)
          else:
              br = QRect(self.boundingRect())
              ratio = min([rect.width() / br.width(), rect.height() / br.height()])
              painter.save()
              painter.translate(rect.center())
              painter.scale(ratio, ratio)
              isPinPointEnabled = self.__data.isPinPointEnabled
              self.__data.isPinPointEnabled = False
              pos = QPointF()
              self.renderSymbols(painter, pos, 1)
              self.__data.isPinPointEnabled = isPinPointEnabled
              painter.restore()
code_tokens: def drawSymbol ( self , painter , point_or_rect ) : if isinstance ( point_or_rect , ( QPointF , QPoint ) ) : self . drawSymbols ( painter , [ point_or_rect ] ) return rect = point_or_rect assert isinstance ( rect , QRectF ) if self . __data . style == QwtSymbol . NoSymbol : return if self . __data . style == QwtSymbol . Graphic : self . __data . graphic . graphic . render ( painter , rect , Qt . KeepAspectRatio ) elif self . __data . style == QwtSymbol . Path : if self . __data . path . graphic . isNull ( ) : self . __data . path . graphic = qwtPathGraphic ( self . __data . path . path , self . __data . pen , self . __data . brush ) self . __data . path . graphic . render ( painter , rect , Qt . KeepAspectRatio ) return elif self . __data . style == QwtSymbol . SvgDocument : if self . __data . svg . renderer is not None : scaledRect = QRectF ( ) sz = QSizeF ( self . __data . svg . renderer . viewBoxF ( ) . size ( ) ) if not sz . isEmpty ( ) : sz . scale ( rect . size ( ) , Qt . KeepAspectRatio ) scaledRect . setSize ( sz ) scaledRect . moveCenter ( rect . center ( ) ) else : scaledRect = rect self . __data . svg . renderer . render ( painter , scaledRect ) else : br = QRect ( self . boundingRect ( ) ) ratio = min ( [ rect . width ( ) / br . width ( ) , rect . height ( ) / br . height ( ) ] ) painter . save ( ) painter . translate ( rect . center ( ) ) painter . scale ( ratio , ratio ) isPinPointEnabled = self . __data . isPinPointEnabled self . __data . isPinPointEnabled = False pos = QPointF ( ) self . renderSymbols ( painter , pos , 1 ) self . __data . isPinPointEnabled = isPinPointEnabled painter . restore ( )
short_docstring: Draw the symbol into a rectangle
  The symbol is painted centered and scaled into the target rectangle.
short_docstring_tokens: Draw the symbol into a rectangle The symbol is painted centered and scaled into the target rectangle .
comment: """
          Draw the symbol into a rectangle
  
          The symbol is painted centered and scaled into the target rectangle.
          It is always painted uncached and the pin point is ignored.
  
          This method is primarily intended for drawing a symbol to the legend.
  
          :param QPainter painter: Painter
          :param point_or_rect: Position or target rectangle of the symbol in screen coordinates
          :type point_or_rect: QPointF or QPoint or QRectF
          """$SEP$# drawSymbol( QPainter *, const QPointF & )$SEP$# drawSymbol( QPainter *, const QRectF & )