pysdic.ImagePlotter.add_rectangle#

ImagePlotter.add_rectangle(center, width, height, *, angle=0.0, face_color='lightblue', face_opacity=1.0, show_face=True, edge_color='black', edge_width=1.0, edge_opacity=1.0, show_edges=True)[source]#

Draw a rectangle in the image plane (e.g. a subset of DIC).

Parameters:
  • center (ArrayLike) – The image coordinates \((x, y)\) of the center of the rectangle.

  • width (Real) – The width of the rectangle along \(x\) before rotation (strictly positive).

  • height (Real) – The height of the rectangle along \(y\) before rotation (strictly positive).

  • angle (Real, optional (default: 0.0)) – The rotation angle in degrees around the center, from the \(x\)-axis towards the \(y\)-axis (clockwise on the screen, as \(y\) points downwards).

  • face_color (str | Tuple[Real, ...]) – The color, opacity (in \([0, 1]\)) and visibility of the face.

  • face_opacity (Real) – The color, opacity (in \([0, 1]\)) and visibility of the face.

  • show_face (bool) – The color, opacity (in \([0, 1]\)) and visibility of the face.

  • edge_color (str | Tuple[Real, ...]) – The color, width (strictly positive), opacity (in \([0, 1]\)) and visibility of the edges.

  • edge_width (Real) – The color, width (strictly positive), opacity (in \([0, 1]\)) and visibility of the edges.

  • edge_opacity (Real) – The color, width (strictly positive), opacity (in \([0, 1]\)) and visibility of the edges.

  • show_edges (bool) – The color, width (strictly positive), opacity (in \([0, 1]\)) and visibility of the edges.

Return type:

None