Skip to content

Commit dffc7b7

Browse files
committed
clear and redraw as pluggable drawing utils
1 parent b5061d8 commit dffc7b7

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/compas/artists/artist.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@
66
from compas.plugins import pluggable
77

88

9+
@pluggable(category='drawing-utils')
10+
def clear():
11+
raise NotImplementedError
12+
13+
14+
@pluggable(category='drawing-utils')
15+
def redraw():
16+
raise NotImplementedError
17+
18+
919
@pluggable(category='factories')
1020
def new_artist(cls, *args, **kwargs):
1121
raise NotImplementedError
@@ -20,6 +30,14 @@ class Artist(object):
2030
def __new__(cls, *args, **kwargs):
2131
return new_artist(cls, *args, **kwargs)
2232

33+
@staticmethod
34+
def clear():
35+
return clear()
36+
37+
@staticmethod
38+
def redraw():
39+
return redraw()
40+
2341
@staticmethod
2442
def register(item_type, artist_type):
2543
Artist.ITEM_ARTIST[item_type] = artist_type

0 commit comments

Comments
 (0)