1
|
|
|
|
2
|
|
|
|
3
|
|
|
def clear_screen(): |
4
|
|
|
"""Clears the screen""" |
5
|
|
|
raise NotImplementedError("clear_screen() not implemented") |
6
|
|
|
|
7
|
|
|
|
8
|
|
|
def clear(): |
9
|
|
|
"""Clears the screen""" |
10
|
|
|
raise NotImplementedError("clear() not implemented") |
11
|
|
|
|
12
|
|
|
|
13
|
|
|
def fill_screen(color="default_background_color"): |
14
|
|
|
"""Fills the screen with the specified color""" |
15
|
|
|
raise NotImplementedError("fill_screen() not implemented") |
16
|
|
|
|
17
|
|
|
|
18
|
|
|
def fill(): |
19
|
|
|
"""Fills the current path""" |
20
|
|
|
raise NotImplementedError("fill() not implemented") |
21
|
|
|
|
22
|
|
|
|
23
|
|
|
def rectangle(x, y, width, height, fill_color="", stroke_color="", stroke_width=-1): |
24
|
|
|
"""Draws a rectangle on the given coordinate with the given width, height and color""" |
25
|
|
|
raise NotImplementedError("rectangle() not implemented") |
26
|
|
|
|
27
|
|
|
|
28
|
|
|
def circle(x, y, radius, fill_color="", stroke_color="", stroke_width=-1): |
29
|
|
|
"""Draws a circle on the given coordinate with the given radius and color""" |
30
|
|
|
raise NotImplementedError("circle() not implemented") |
31
|
|
|
|
32
|
|
|
|
33
|
|
|
def ellipse(x, y, width, height, fill_color="", stroke_color="", stroke_width=-1): |
34
|
|
|
"""Draws an ellipse on the given coordinate with the given width, height and color""" |
35
|
|
|
raise NotImplementedError("ellipse() not implemented") |
36
|
|
|
|
37
|
|
|
|
38
|
|
|
def arc(x, y, radius, start_angle, stop_angle, fill_color="", stroke_color="", stroke_width=-1): |
39
|
|
|
"""Draws an arc on the given coordinate with the given radius, angles and color""" |
40
|
|
|
raise NotImplementedError("arc() not implemented") |
41
|
|
|
|
42
|
|
|
|
43
|
|
|
def rotate(angle): |
44
|
|
|
"""Rotates the context""" |
45
|
|
|
raise NotImplementedError("rotate() is not implemented") |
46
|
|
|
|
47
|
|
|
|
48
|
|
|
def translate(x, y): |
49
|
|
|
"""Translates the context by x and y""" |
50
|
|
|
raise NotImplementedError("translate() is not implemented") |
51
|
|
|
|
52
|
|
|
|
53
|
|
|
def scale(factor): |
54
|
|
|
"""Scales the context by the provided factor""" |
55
|
|
|
raise NotImplementedError("scale() is not implemented") |
56
|
|
|
|
57
|
|
|
|
58
|
|
|
def save(): |
59
|
|
|
"""Saves the current context's translation, rotation and scaling""" |
60
|
|
|
raise NotImplementedError("save() is not implemented") |
61
|
|
|
|
62
|
|
|
|
63
|
|
|
def restore(): |
64
|
|
|
"""Restores the context's translation, rotation and scaling to that of the latest save""" |
65
|
|
|
raise NotImplementedError("restore() is not implemented") |
66
|
|
|
|
67
|
|
|
|
68
|
|
|
def reset_style(): |
69
|
|
|
"""Resets PyPen's current setting surrounding style to their default_values, which includes fill_color, stroke_color, stroke_width""" |
70
|
|
|
raise NotImplementedError("reset_style() is not implemented") |
71
|
|
|
|
72
|
|
|
|