Add draw_filled_polygon to docs, fix a few docstring types

This commit is contained in:
LinasKo 2024-09-19 22:37:36 +03:00
parent 85e053eae6
commit 81ee4f1c2c
2 changed files with 8 additions and 2 deletions

View File

@ -28,6 +28,12 @@ comments: true
:::supervision.draw.utils.draw_polygon
<div class="md-typeset">
<h2><a href="#supervision.draw.utils.draw_filled_polygon">draw_filled_polygon</a></h2>
</div>
:::supervision.draw.utils.draw_filled_polygon
<div class="md-typeset">
<h2><a href="#supervision.draw.utils.draw_text">draw_text</a></h2>
</div>

View File

@ -173,13 +173,13 @@ def draw_polygon(
def draw_filled_polygon(
scene: np.ndarray, polygon: np.ndarray, color: Color, opacity: float = 1
) -> np.ndarray:
"""Draw a polygon on a scene.
"""Draw a filled polygon on a scene.
Parameters:
scene (np.ndarray): The scene to draw the polygon on.
polygon (np.ndarray): The polygon to be drawn, given as a list of vertices.
color (Color): The color of the polygon.
opacity (float): The opacity of rectangle when drawn on the scene.
opacity (float): The opacity of polygon when drawn on the scene.
Returns:
np.ndarray: The scene with the polygon drawn on it.