stream_hacks to main #2

Merged
skeh merged 8 commits from stream_hacks into main 2024-12-11 03:22:13 +00:00
1 changed files with 3 additions and 2 deletions
Showing only changes of commit c9db70f57d - Show all commits

View File

@ -71,8 +71,9 @@ class Landmarks(Type):
return False
def draw(self, image, canvas, color=(255, 255, 255), label=True):
for i, (x, y, z) in enumerate(point.project_to_image(image) for point in self.points):
def draw(self, image, canvas, color=(255, 255, 255), label=True, filter=None):
points = self[filter] if filter else self.points
for i, (x, y, z) in enumerate(point.project_to_image(image) for point in points):
if x > image.width or x < 0 or y > image.height or y < 0:
continue