docs: def _set_closest_stroke_width(self, width):
          """Sets the line width to the closest supported one
  
          Not all line widths are supported. This function queries both minimum and maximum as well as the step size of
          the line width and calculates the width, which is closest to the given one. This width is then set.
  
          :param width: The desired line width
          """
  
          # Adapt line width to zooming level
          width *= self.pixel_to_size_ratio() / 6.
          stroke_width_range = glGetFloatv(GL_LINE_WIDTH_RANGE)
          stroke_width_granularity = glGetFloatv(GL_LINE_WIDTH_GRANULARITY)
  
          if width < stroke_width_range[0]:
              glLineWidth(stroke_width_range[0])
              return
          if width > stroke_width_range[1]:
              glLineWidth(stroke_width_range[1])
              return
          glLineWidth(round(width / stroke_width_granularity) * stroke_width_granularity)