2019-12-06 14:01:03 -08:00
|
|
|
import enum
|
|
|
|
|
|
|
|
|
|
|
|
class ShapeType(enum.Enum):
|
|
|
|
MARKER = "marker"
|
|
|
|
OVAL = "oval"
|
|
|
|
RECTANGLE = "rectangle"
|
|
|
|
TEXT = "text"
|
|
|
|
|
|
|
|
|
2023-04-13 15:53:16 -07:00
|
|
|
SHAPES: set[ShapeType] = {ShapeType.OVAL, ShapeType.RECTANGLE}
|
2019-12-06 14:01:03 -08:00
|
|
|
|
|
|
|
|
2020-01-13 12:03:13 -08:00
|
|
|
def is_draw_shape(shape_type: ShapeType) -> bool:
|
2019-12-06 14:01:03 -08:00
|
|
|
return shape_type in SHAPES
|
|
|
|
|
|
|
|
|
2020-01-13 12:03:13 -08:00
|
|
|
def is_shape_text(shape_type: ShapeType) -> bool:
|
2019-12-06 14:01:03 -08:00
|
|
|
return shape_type == ShapeType.TEXT
|
2019-12-18 09:49:45 -08:00
|
|
|
|
|
|
|
|
2020-01-13 12:03:13 -08:00
|
|
|
def is_marker(shape_type: ShapeType) -> bool:
|
2019-12-18 09:49:45 -08:00
|
|
|
return shape_type == ShapeType.MARKER
|