SVG - k821209/pipelines GitHub Wiki

์ค‘์š”ํ•œ๊ฒƒ ๋งˆ์ง€๋ง‰์— ํ•œ๋ฒˆ ๋”๊ทธ๋ฆฌ๊ธฐ

print('<svg xmlns:xlink="http://www.w3.org/1999/xlink" height="%d" width="%d">'%(canvas_height,canvas_width),file=Outfile)
print(circle%(x1,y1,size,color_a,1,'two'),file=Outfile) # initial gene mark
print(circle%(x1,y1,rad_size,color_s,1,'one'),file=Outfile)
print('''<use id="use" xlink:href="#one" />
      </svg>''',file=Outfile)            
Outfile.close()
print('''<html>
<body>

<h1>My first SVG</h1>
<svg height="%d" width="%d">'''%(height,width),file=Outfile)

rect = '<rect x="%d" y="%d" width="%d" height="%d" style="fill:blue;stroke:pink;stroke-width:5;fill-opacity:0.1;stroke-opacity:0.9" />'
#line = '<line x1="%d" y1="%d" x2="%d" y2="%d" style="stroke:rgb(255,0,0);stroke-width:1" />' 
line = '<line x1="%d" y1="%d" x2="%d" y2="%d" stroke="%s" stroke-width="1" />' 
# left dot to right dot
circle = '<circle cx="%d" cy="%d" r="%d" stroke="black" stroke-width="1" fill="%s" fill-opacity="0.4"/>'
# x, y, diameter
text =  '<text x="%d" y="%d" fill="black">%s</text>'
# x, y, text
print('''</svg>

</body>
</html>
''',file=Outfile)

Outfile.close()
โš ๏ธ **GitHub.com Fallback** โš ๏ธ