Add 3d objects

This commit is contained in:
2024-06-11 02:13:16 +02:00
parent a50fc34ed2
commit 41cab8c2ac
4 changed files with 112 additions and 324 deletions

View File

@@ -9,7 +9,7 @@ class Segment2D:
self.end = end
self.coordinates = []
def draw_line_overlap(start: Type[Point2D], end: Type[Point2D], overlap: Type[LINE_OVERLAP]):
def compute_segment_overlap(start: Type[Point2D], end: Type[Point2D], overlap: Type[LINE_OVERLAP]):
"""Modified Bresenham draw (line) with optional overlap.
From https://github.com/ArminJo/Arduino-BlueDisplay/blob/master/src/LocalGUI/ThickLine.hpp
@@ -74,7 +74,7 @@ class Segment2D:
error += delta_2x
self.coordinates.append(start)
def draw_thick_line(start: Type[Point2D], end: Type[Point2D], thickness: int, thickness_mode: Type[LINE_THICKNESS_MODE]):
def compute_thick_segment(start: Type[Point2D], end: Type[Point2D], thickness: int, thickness_mode: Type[LINE_THICKNESS_MODE]):
"""Bresenham with thickness.
From https://github.com/ArminJo/Arduino-BlueDisplay/blob/master/src/LocalGUI/ThickLine.hpp