ditaa icon indicating copy to clipboard operation
ditaa copied to clipboard

support additional command line parameters

Open splitbrain opened this issue 9 years ago • 1 comments

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.

splitbrain avatar Aug 09 '16 14:08 splitbrain

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! :)

akavel avatar Aug 09 '16 15:08 akavel