class_docstr: Helper class to handle text output using pygame
class_docstr_tok: ["Helper","class","to","handle","text","output","using","pygame"]
code: def __init__(self, font, width, height):
      lines = __doc__.split("\n")
      self.font = font
      self.line_space = 18
      self.dim = (780, len(lines) * self.line_space + 12)
      self.pos = (
          0.5 * width - 0.5 * self.dim[0],
          0.5 * height - 0.5 * self.dim[1],
      )
      self.seconds_left = 0
      self.surface = pygame.Surface(self.dim)
      self.surface.fill((0, 0, 0, 0))
      for n, line in enumerate(lines):
          text_texture = self.font.render(line, True, (255, 255, 255))
          self.surface.blit(text_texture, (22, n * self.line_space))
          self._render = False
      self.surface.set_alpha(220)
  
imports: from __future__ import print_function
  import glob
  import os
  import sys
  import signal
  import carla
  from carla import ColorConverter
  import argparse
  import logging
  import math
  import random
  import weakref
  from rss_sensor import RssSensor
  from rss_visualization import RssUnstructuredSceneVisualizer, RssBoundingBoxVisualizer, RssStateVisualizer
label_desc: Use image node_id 1 to create a new HelpText object from inherited base classes: object with example: obj = HelpText(font, width, height)