class_docstr: Basic drawing functionality.
  
  This class encapsulates opencv drawing functions allowing for
  different backends to be implemented following the same interface.
class_docstr_tok: ["Basic","drawing","functionality",".","This","class","encapsulates","opencv","drawing","functions","allowing","for","different","backends","to","be","implemented","following","the","same","interface","."]
docstr: Draw a rectangle
  
  Parameters
  ----------
  frame : np.ndarray
      The OpenCV frame to draw on. Modified in place.
  points : Sequence[Tuple[int, int]]
      Points describing the rectangle in the format `[[x0, y0], [x1, y1]]`.
  color : Optional[ColorType], optional
      Color of the lines, by default Black.
  thickness : Optional[int], optional
      Thickness of the lines, by default 1.
  
  Returns
  -------
  np.ndarray
      The resulting frame.
docstr_tok: ["Draw","a","rectangle","Parameters","--","--","--","--","--","frame",":","np.ndarray","The","OpenCV","frame","to","draw","on",".","Modified","in","place",".","points",":","Sequence","[","Tuple","[","int",",","int","]","]","Points","describing","the","rectangle","in","the","format","`","[","[","x0",",","y0","]",",","[","x1",",","y1","]","]","`",".","color",":","Optional","[","ColorType","]",",","optional","Color","of","the","lines",",","by","default","Black",".","thickness",":","Optional","[","int","]",",","optional","Thickness","of","the","lines",",","by","default","1",".","Returns","--","--","--","-","np.ndarray","The","resulting","frame","."]
code: def rectangle(
      cls,
      frame: np.ndarray,
      points: Sequence[Tuple[int, int]],
      color: Optional[ColorType] = None,
      thickness: Optional[int] = None,
  ) -> np.ndarray:
      """
      Draw a rectangle
  
      Parameters
      ----------
      frame : np.ndarray
          The OpenCV frame to draw on. Modified in place.
      points : Sequence[Tuple[int, int]]
          Points describing the rectangle in the format `[[x0, y0], [x1, y1]]`.
      color : Optional[ColorType], optional
          Color of the lines, by default Black.
      thickness : Optional[int], optional
          Thickness of the lines, by default 1.
  
      Returns
      -------
      np.ndarray
          The resulting frame.
      """
      frame = cv2.rectangle(
          frame,
          tuple(points[0]),
          tuple(points[1]),
          color=color,
          thickness=thickness,
      )
      return frame
  
file_path: norfair/norfair/drawing/drawer.py
imports: from typing import Any, Optional, Sequence, Tuple, Union
  import numpy
  from norfair.drawing.color import Color, ColorType
  from norfair.tracker import Detection, TrackedObject
label_desc: Use image node_id 3 for calling the Drawer obj's underlying member method code with example usage: obj.rectangle(cls, frame, points, color, thickness) and returns: frame