HOME | DD

undefinedreference — Inching Closer

Published: 2022-04-15 02:12:06 +0000 UTC; Views: 189; Favourites: 3; Downloads: 2
Redirect to original
Description Made with Simple Inkscape Scripting github.com/spakin/SimpInkScr . I'm gradually inching closer to what I have in mind..

Code:

for y in range(0, int(height), 100):
 for x in range(0, int(width), 100):
   rect((x, y), (x + 100, y + 100),
     fill='#%02x%02x%02x' % (randrange(256), randrange(256), randrange(256)))
   circle((x + 50, y + 50), 25,
     fill='#%02x%02x%02x' % (randrange(256), randrange(256), randrange(256)))

It fills a 'checkerboard' row by row, creating squares and planting a circle on top of them, each with a random color. If you install Simple Inkscape Scripting, you can feed this code directly to the plugin, or have it read it from a file. If the plugin isn't found, you may have to uninstall Inkscape and get the latest version from their web site. If the page dimensions are factors of 100%, the output should perfectly match the page boundaries. YMMV though, because Inkscape's idea of positioning is really opaque.

Sick, eh? 
Related content
Comments: 0