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

Announce: SVG Editor #21

Open
stuartmscott opened this issue Nov 12, 2020 · 2 comments
Open

Announce: SVG Editor #21

stuartmscott opened this issue Nov 12, 2020 · 2 comments

Comments

@stuartmscott
Copy link

Hey @srwiley,

This is not an issue so feel free to close, but I just wanted to tell you about a simple SVG Editor I was able to create thanks to oksvg and rasterx.

Keep up the great work!

@srwiley
Copy link
Owner

srwiley commented Nov 13, 2020

That looks great Stuart. Also I like you previous suggestion also. I just have been focused on different things for a while.
If you would like to submit a pull request to make the line width proportional to the image scale, as per the specifications, I will take a good look. Otherwise I assure you I will get to it eventually.

Also, if you have the time please take a look at the imageElt branch in oksvg submitted by another github user. I want to clean it up somewhat, like take out the logging in the inner loops, but overall what do you think about things like the modules statement?

@stuartmscott
Copy link
Author

Thanks Steven!

I think the change would be two parts, one in the data structure to parse and hold the value (either fixed, or percentage), and another in the rasterizer to either pass through the fixed value or calculate the percentage based on the requested output size.

The imageElt branch looks okay, moving to the Shape interface should give more flexibility to support future features.

I found the comments lacking and don't provide any more information than the line of code they annotate: // Shape type., // Image type., // KernelUsed var., and // DrawTransformed func.

I made the switch to Go modules a while back and for the most part I'm glad I did, however there is one scenario where they could be better - they slow down local experimentation across projects. Consider the case where you want to try out a change across rasterx and oksvg, if your current setup has them both in the GOPATH then you can make the changes and the compiler would find them. However with go modules, every dependency is versioned so you have two options either make a change in rasterx, commit and push, then switch to oksvg and run go get to pull down the latest version of rasterx. If you're experimenting you may not want to push a half-baked change. You're other option is to use an replace statement in oksvg to say replace github.com/srwiley/rasterx => ../rasterx to tell go to use the local copy, but you do not want to add this replace directive to the repository as it could break other developers setups, so you need to remember not to add it to any resulting commits. Ideally there would be a go.mod.local or some other name that you can add to .gitignore where you can put these replace directives for local development unfortunately there has not been much progress: golang/go#26640

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

No branches or pull requests

2 participants