Skip to content
New issue

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

support additional command line parameters #7

Open
splitbrain opened this issue Aug 9, 2016 · 1 comment
Open

support additional command line parameters #7

splitbrain opened this issue Aug 9, 2016 · 1 comment

Comments

@splitbrain
Copy link

The original supports some command line parameters influencing the rendering style:

-E,--no-separation  Prevents the separation of common edges of
                            shapes.
-r,--round-corners         Causes all corners to be rendered as round
                            corners.
 -s,--scale <SCALE>         A natural number that determines the size of
                            the rendered image. The units are fractions of
                            the default size (2.5 renders 1.5 times bigger
                            than the default).
 -S,--no-shadows            Turns off the drop-shadow effect.

It would be nice to have these supported in the go version as well.

@akavel
Copy link
Owner

akavel commented Aug 9, 2016

For first version, I implemented only the default path, so additional code would be needed. If you or someone else sends a PR, I'd be happy to merge, as long as the default path is not broken (i.e. the "visual tests" at https://akavel.github.com/ditaa still render correctly), and after we work through a review. Code need not be perfect, esp. given that the current body of code is very imperfect, but I might still have some comments during review.

Personally, I'm not planning to develop on ditaa in close future; I have it where I wanted it to be. And if I were to, I'd probably rather try to understand the code and clean it up (and ideally rewrite some inefficient algorithms to more efficient approaches), so adding options is a perfect task for potential contributors. I'm adding an up-for-grabs label. If anyone is interested, please send implementation of each option in a separate PR. If you need any help, you're more than welcome to ask here! Even a "how do I start?" question is ok, as it would help me feel somebody's interested and motivate myself to write some hints.

I'd expect a contributor to port code implementing the options from the original Java code. Please use the GPL2+ version of the code, which can be browsed in directory orig-java/ in commit aa96fb21 or any older commit - don't use the current GPL3+ version of Java ditaa. (I think the git tag "orig-java" may point to this commit, but I don't remember for sure already, sorry.)

Good luck! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants