Comments (4)
I don't think this would be too difficult: once the SVG has been rasterised as a Pixmap, it could then be redrawn into a buffered Pixmap (buffered by the number of padding pixels required). But I'm wondering what need you have that can't be handled by the icon-padding
property. Are you able to share more details about your use-case?
from spreet.
Almost less of a use case and more of a workaround for poorly exported assets. We have found on occasion that Figma, depending on how the vector is constructed, will sometimes export a SVG somewhat poorly which can result in a sort of sub-pixeling effect. Having the ability to add a 1-2px spacing around each icons accommodates for that. When drawing sprites to webgl for instance if the sub-pixeling is occurring you will see icons "bleeding" into one another just slightly.
from spreet.
Am I right to say that Spritesmith's padding
option is exactly the sort of thing you're after? For example, padding: 2
means there will be a 2px gap to the right and bottom of each image in the spritesheet.
(Not saying you should switch to Spritesmith, just wondering if that's the functionality you want to duplicate.)
from spreet.
@flother precisely!
from spreet.
Related Issues (14)
- Add `--unique` command-line argument
- Add a CLI argument to allow sprite index file to be minified
- Crates.io release HOT 1
- Use dtolnay/rust-toolchain to run a Rust toolchain on GitHub Actions
- Include sub directories HOT 1
- Support for optional properties (content, stretchX & stretchY) HOT 6
- Add support for SDF sprites HOT 14
- Support for png/jpg source images HOT 5
- Convert all `.unwrap()` and similar panics to proper errors HOT 3
- Unable to parallelize pixmap loading HOT 4
- Please rename primary branch to `main` HOT 2
- The SDF icons seem to lack antialiasing HOT 1
- File Input or SymLinks 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 spreet.