vsketch.utils#

Overview#

Classes#

MatrixPopper

-

ResetMatrixContextManager

The constructor will be called in both scenarii. __enter__() and

Function#

complex_to_2d(line)

-

compute_ellipse_mode(mode, x, y, w, h)

Interpret parameters based on ellipseMode() and compute the ellipse center and

Classes#

class vsketch.utils.MatrixPopper(vsk: vsketch.Vsketch)#
class vsketch.utils.ResetMatrixContextManager(vsk: vsketch.Vsketch)#

The constructor will be called in both scenarii. __enter__() and __exit__() will only be called if used as a context manager (with statement)

Functions#

vsketch.utils.complex_to_2d(line: numpy.ndarray) numpy.ndarray#
vsketch.utils.compute_ellipse_mode(mode: str, x: float, y: float, w: float, h: float) tuple[float, float, float, float]#

Interpret parameters based on ellipseMode() and compute the ellipse center and radii.

Parameters:
  • mode -- ellipseMode() mode

  • x -- first parameter

  • y -- second parameter

  • w -- third parameter

  • h -- fourth parameter

Returns:

tuple of center X, Y coordinates and w, h radii