This commit is contained in:
Panayiotis Lipiridis
2020-11-08 15:44:56 +02:00
parent c8ed0e4bfd
commit bb5c0a713e
+20 -4
View File
@@ -1,8 +1,24 @@
import excalidraw
scene = excalidraw.Excalidraw()
scene.add_rectangle(0, 0, 100, 100)
scene.add_ellipse(120, 0, 100, 100)
scene.save_as("hello")
scene.save_as_lib("hello")
size = 32
width = 16
for column in range(size):
for row in range(size):
red = row * 256 // size
green = column * 256 // size
blue = column * 256 // size
color = "#%02x%02x%02x" % (red, green, blue)
scene.add_rectangle(
row * size,
column * size,
size,
size,
backgroundColor=color,
fillStyle="solid",
)
scene.save_as("hola")