We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
To reduce the size of the "d" attribute for Line and Lines I propose:
Current:
import drawsvg as dw line = dw.Line(30, 30, 30, 90) print(line.args["d"]) # M30,30 L30,90 line = dw.Line(30, 30, 90, 30) print(line.args["d"]) # M30,30 L90,30 line = dw.Line(30, 30, 90, 90) print(line.args["d"]) # M30,30 L90,90 lines = dw.Lines(10, 10, 20, 10, 20, 20, 5, 25) print(lines.args["d"]) # M10,10 L20,10 L20,20 L5,25 polygon = dw.Lines(10, 10, 20, 10, 20, 20, 5, 25, close=True) print(polygon.args["d"]) # M10,10 L20,10 L20,20 L5,25 Z
After the change:
import drawsvg as dw line = dw.Line(30, 30, 30, 90) print(line.args["d"]) # M30,30 V90 line = dw.Line(30, 30, 90, 30) print(line.args["d"]) # M30,30 H90 line = dw.Line(30, 30, 90, 90) print(line.args["d"]) # M30,30 L90,90 lines = dw.Lines(10, 10, 20, 10, 20, 20, 5, 25) print(lines.args["d"]) # M10,10 H20 V20 L5,25 polygon = dw.Lines(10, 10, 20, 10, 20, 20, 5, 25, close=True) print(polygon.args["d"]) # M10,10 H20 V20 L5,25 Z # Relative coordinates line = dw.Line(30, 30, 30, 90, relative=True) print(line.args["d"]) # M30,30 v60 line = dw.Line(30, 30, 90, 30, relative=True) print(line.args["d"]) # M30,30 h60 line = dw.Line(30, 30, 90, 90, relative=True) print(line.args["d"]) # M30,30 l60,60 lines = dw.Lines(10, 10, 20, 10, 20, 20, 5, 25, relative=True) print(lines.args["d"]) # M10,10 h10 v10 l-15,5 polygon = dw.Lines(10, 10, 20, 10, 20, 20, 5, 25, close=True, relative=True) print(polygon.args["d"]) # M10,10 h10 v10 l-15,5 Z
The text was updated successfully, but these errors were encountered:
V and H commands for Lines. + relative coordinates cduck#135
3912b5d
No branches or pull requests
To reduce the size of the "d" attribute for Line and Lines I propose:
Current:
After the change:
The text was updated successfully, but these errors were encountered: