mirror of
https://github.com/excalidraw/excalidraw-playground.git
synced 2026-05-17 13:30:37 +00:00
Revert
This commit is contained in:
+20
-4
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user