Comments (2)
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?
from oksvg.
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
from oksvg.
Related Issues (17)
- Test failure? (TestShapes6.svg missing) HOT 2
- Support for clip paths
- Strange colors when trying to convert svg icons to png HOT 11
- Issue with relative path move-to HOT 2
- Rect with missing X or Y crashes HOT 4
- Support for percentage stroke-width
- Add support for different renderers
- License disambiguation HOT 1
- Parse error when color is "currentColor" HOT 1
- Long dashed lines break
- support for text? HOT 2
- Request: surpport "class" element
- Black background when converting SVG to PNG HOT 9
- Dependency text 0.3.6 is vulnerable HOT 2
- Some path based icons do not seem to load correctly HOT 1
- Support for defs HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oksvg.