Giter Club home page Giter Club logo

Comments (4)

flother avatar flother commented on August 22, 2024

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.

brandonjpierce avatar brandonjpierce commented on August 22, 2024

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.

flother avatar flother commented on August 22, 2024

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.

brandonjpierce avatar brandonjpierce commented on August 22, 2024

@flother precisely!

from spreet.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.