Skip to content

Commit 0fdc144

Browse files
committed
Scripting 1: Drawing Shapes
1 parent c2bcbc6 commit 0fdc144

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Drawing unfilled shapes
2+
rpgcode.setColor(255, 0, 0, 1);
3+
rpgcode.drawRect(25, 25, 100, 50, 2);
4+
5+
rpgcode.setColor(0, 255, 0, 1);
6+
rpgcode.drawCircle(50, 125, 25);
7+
8+
rpgcode.setColor(0, 0, 255, 1);
9+
rpgcode.drawLine(25, 175, 150, 175, 3);
10+
11+
rpgcode.setColor(255, 255, 0, 1);
12+
rpgcode.drawRoundedRect(25, 225, 100, 50, 1, 25);
13+
14+
// Drawing filled shapes
15+
rpgcode.setColor(255, 0, 0, 1);
16+
rpgcode.fillRect(225, 25, 100, 50);
17+
18+
rpgcode.setColor(0, 255, 0, 1);
19+
rpgcode.fillCircle(225, 125, 25);
20+
21+
rpgcode.setColor(255, 255, 0, 0.5);
22+
rpgcode.fillRoundedRect(225, 225, 100, 50, 25);
23+
24+
rpgcode.renderNow();

0 commit comments

Comments
 (0)