cm107 commited on
Commit
7ad56ee
·
1 Parent(s): c9a11d0
Files changed (1) hide show
  1. mypkg/draw.py +5 -5
mypkg/draw.py CHANGED
@@ -4,7 +4,7 @@ import numpy.typing as npt
4
 
5
  def blank(
6
  width: int=500, height: int=500,
7
- background: tuple[int, int, int]=(0,0,0)
8
  ) -> npt.NDArray[np.uint8]:
9
  img = np.zeros((height, width, 3), dtype=np.uint8)
10
  img[:, :, :] = background
@@ -13,8 +13,8 @@ def blank(
13
  def circle(
14
  width: int=500, height: int=500,
15
  radius: int=None,
16
- color: tuple[int, int, int]=(0,0,255),
17
- background: tuple[int, int, int]=(0,0,0)
18
  ) -> npt.NDArray[np.uint8]:
19
  if radius is None:
20
  radius = int(0.5 * max(width, height) * 0.8)
@@ -28,8 +28,8 @@ def circle(
28
  def rectangle(
29
  width: int=500, height: int=500,
30
  pt1: tuple[int, int]=None, pt2: tuple[int, int]=None,
31
- color: tuple[int, int, int]=(0,0,255),
32
- background: tuple[int, int, int]=(0,0,0)
33
  ) -> npt.NDArray[np.uint8]:
34
  img = blank(
35
  width=width, height=height,
 
4
 
5
  def blank(
6
  width: int=500, height: int=500,
7
+ background: tuple=(0,0,0)
8
  ) -> npt.NDArray[np.uint8]:
9
  img = np.zeros((height, width, 3), dtype=np.uint8)
10
  img[:, :, :] = background
 
13
  def circle(
14
  width: int=500, height: int=500,
15
  radius: int=None,
16
+ color: tuple=(0,0,255),
17
+ background: tuple=(0,0,0)
18
  ) -> npt.NDArray[np.uint8]:
19
  if radius is None:
20
  radius = int(0.5 * max(width, height) * 0.8)
 
28
  def rectangle(
29
  width: int=500, height: int=500,
30
  pt1: tuple[int, int]=None, pt2: tuple[int, int]=None,
31
+ color: tuple=(0,0,255),
32
+ background: tuple=(0,0,0)
33
  ) -> npt.NDArray[np.uint8]:
34
  img = blank(
35
  width=width, height=height,