User:Inge Hoonte/svg
< User:Inge Hoonte
Revision as of 09:21, 27 October 2011 by Inge Hoonte (talk | contribs)
Error creating thumbnail: convert-im6.q16: unable to write pixel cache `/tmp/magick-C52KqGa9ibDeoeQ7xHQVAMBpn0H41tyM': No space left on device @ error/cache.c/WritePixelCachePixels/6012. convert-im6.q16: no images defined `PNG:/tmp/transform_f630b30291cd.png' @ error/convert.c/ConvertImageCommand/3229.
CODE
import random, colorsys
print """<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
id="svg2"
width="10000"
height="10000"
version="1.1"
inkscape:version="0.48.2 r9819"
sodipodi:docname="New document 1">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.35"
inkscape:cx="40"
inkscape:cy="140"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1145"
inkscape:window-height="747"
inkscape:window-x="100"
inkscape:window-y="150"
inkscape:window-maximized="0" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
"""
#none;stroke:#ff000f;stroke-opacity:25"
#(r=random.randomint(0), g=random.randomint(0,255), b=random.randomint(0,255))
# <animateTransform
# attributeName="transform"
# begin="0s"
# dur="6s"
# type="rotate"
# from="0 100 300"
# to="360 100 300"
# repeatCount="indefinite />
# TO DO: PRINT poetry
for x in range(0, 255):
print """
<rect
style="fill:none;stroke:rgb({1},{2},{3});stroke-opacity:25"
id="rect2985"
width="{0}"
height="100"
transform="rotate ({1} {2} {3})"
x="{1}"
y="{2}" />
""".format(x*random.randint(0,x), x*random.randint(0,x), x*random.randint(0,x), x*random.randint(0,x))
print"""
</g>
</svg>
"""