class_docstr: Static class which draws diamonds (i.e. rhombuses)
class_docstr_tok: ["Static","class","which","draws","diamonds","(","i.e",".","rhombuses",")"]
docstr: Draws a rhombus on the Cairo context without stroking or
  filling it.
  
  @see: ShapeDrawer.draw_path
docstr_tok: ["Draws","a","rhombus","on","the","Cairo","context","without","stroking","or","filling","it",".","@","see",":","ShapeDrawer.draw_path"]
code: def draw_path(ctx, center_x, center_y, width, height=None, **kwargs):
      """Draws a rhombus on the Cairo context without stroking or
      filling it.
  
      @see: ShapeDrawer.draw_path"""
      height = height or width
      if hasattr(plt, "Axes") and isinstance(ctx, plt.Axes):
          vertices = [
              [-0.5 * width, 0],
              [0, -0.5 * height],
              [0.5 * width, 0],
              [0, 0.5 * height],
          ]
          return mpl.patches.Polygon(
              vertices,
              closed=True,
              clip_on=True,
              **kwargs,
          )
      else:
          ctx.move_to(center_x - width / 2, center_y)
          ctx.line_to(center_x, center_y + height / 2)
          ctx.line_to(center_x + width / 2, center_y)
          ctx.line_to(center_x, center_y - height / 2)
          ctx.close_path()
  
imports: from abc import ABCMeta, abstractmethod
  from math import atan2, copysign, cos, pi, sin
  import sys
  from igraph.drawing.matplotlib.utils import find_matplotlib
label_desc: Use image node_id 1 for calling the DiamondDrawer obj's underlying member method code with example usage: obj.draw_path(ctx, center_x, center_y, width, height) and returns: mpl