svgexport icon indicating copy to clipboard operation
svgexport copied to clipboard

add the ability to add background color on pad

Open leroy0211 opened this issue 9 years ago • 3 comments

When i use pad to create whitespace around my image. For example from a landscape svg to a square png, the whitespace will be transparent.

I actually want the whitespace to be white (#fff). When I use "svg{background:white;}" only the transparency of the input svg will be white, not the whitespace of the pad section.

Am I missing something here??

leroy0211 avatar Aug 24 '16 06:08 leroy0211

Probably that's actually the expected behavior, can you please try this answer?

shakiba avatar Aug 24 '16 06:08 shakiba

I need this as well.

Could the pad operation simply grow the SVG element and put all its element in a <g /> with the appropriate transform applied?

Right now the feature is rather useless (it can only be used to add some transparent space).

EmielM avatar Apr 05 '17 13:04 EmielM

@EmielM Your solution is to hard to do, it requires svg manipulation. Can you please share an example? I will try to look at this weekend.

shakiba avatar Apr 05 '17 18:04 shakiba