Merge pull request #1 from brantai/master
Updating for changes in drawsvg 2.0
This commit is contained in:
commit
ae7b95396d
2 changed files with 6 additions and 6 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="400" height="400" viewBox="-200.0 -200.0 400 400">
|
||||
width="400" height="400" viewBox="-200.0 -200.0 400.0 400.0">
|
||||
<defs>
|
||||
<marker markerWidth="6.5" markerHeight="5.0" viewBox="-0.8 -0.5 1.3 1.0" orient="auto" id="d0">
|
||||
<circle cx="-0.3" cy="-0.0" r="0.3" stroke-width="0.2" stroke="black" fill="none" />
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 763 B After Width: | Height: | Size: 767 B |
|
|
@ -24,7 +24,7 @@ SOFTWARE.
|
|||
import sys
|
||||
import math
|
||||
import re
|
||||
import drawSvg as svg
|
||||
import drawsvg as svg
|
||||
|
||||
def prepareMessage(message):
|
||||
message = re.sub("[^a-zA-Z]+", "", message) # get rid of all non-alphabetic characters
|
||||
|
|
@ -140,7 +140,7 @@ def createSigil(message, planet, fileName):
|
|||
planets = ["moon", "mercury", "venus", "sun", "mars", "jupiter", "saturn"]
|
||||
planet = planets.index(planet.lower())
|
||||
# set up SVG canvas
|
||||
d = svg.Drawing(400, 400, origin='center') # define canvas
|
||||
d = svg.Drawing(400, 400, origin='center', context=svg.Context(invert_y=True)) # define canvas
|
||||
|
||||
# draw sigils
|
||||
message = prepareMessage(message)
|
||||
|
|
@ -149,7 +149,7 @@ def createSigil(message, planet, fileName):
|
|||
drawSigil( coordList, d, "black")
|
||||
|
||||
# save sigil to SVG file
|
||||
d.saveSvg(fileName)
|
||||
d.save_svg(fileName)
|
||||
|
||||
def main():
|
||||
argNo = len(sys.argv) - 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue