FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
drawBotExamples/objects/objects.py at master · roboDocs/drawBotExamples · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
roboDocs
/
drawBotExamples
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
8
Code
Issues
0
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
drawBotExamples
/
objects
/
objects.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
24 lines (20 loc) · 545 Bytes
Breadcrumbs
drawBotExamples
/
objects
/
objects.py
Copy path
File metadata and controls
24 lines (20 loc) · 545 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from
drawBot
import
*
class
Rectangle
:
fillColor
=
(
0
,
1
,
0
)
strokeColor
=
(
0
,
0
,
1
)
strokeWidth
=
3
def
__init__
(
self
,
size
=
None
):
if
size
is
not
None
:
w
,
h
=
size
self
.
width
=
w
self
.
height
=
h
else
:
self
.
width
=
200
self
.
height
=
200
def
draw
(
self
, (
x
,
y
)):
save
()
fill
(
*
self
.
fillColor
)
stroke
(
*
self
.
strokeColor
)
strokeWidth
(
self
.
strokeWidth
)
rect
(
x
,
y
,
self
.
width
,
self
.
height
)
restore
()
Back
|
FazBrowse Home
|
New Git URL