code: def draw_png(self, image, h_zoom, v_zoom, current_y):
          
          # PIL object
          draw = ImageDraw.Draw(image)
          mws = self.rconf.mws
          pixels_per_second = int(h_zoom / mws)
          current_y_px = current_y * v_zoom
  
          # create font, as tall as possible
          font_height_pt = 18
          font = ImageFont.truetype(self.FONT_PATH, font_height_pt)
  
          # draw a tick every self.time_step seconds
          for i in range(0, 1 + int(self.max_time), self.time_step):
              # base x position
              begin_px = i * pixels_per_second
  
              # tick
              left_px = begin_px - self.TICK_WIDTH
              right_px = begin_px + self.TICK_WIDTH
              top_px = current_y_px
              bottom_px = current_y_px + v_zoom
              draw.rectangle((left_px, top_px, right_px, bottom_px), fill=PlotterColors.BLACK)
  
              # text
              time_text = self._time_string(i)
              left_px = begin_px + self.TICK_WIDTH + self.TEXT_MARGIN
              top_px = current_y_px + (v_zoom - self.text_bounding_box(font_height_pt, time_text)[1]) // 2
              draw.text((left_px, top_px), time_text, PlotterColors.BLACK, font=font)
docs: Draw this time scale to PNG.
  
          :param image: the image to draw onto
          :param int h_zoom: the horizontal zoom
          :param int v_zoom: the vertical zoom
          :param int current_y: the current y offset, in modules
          :type  image: :class:`PIL.Image`