Jump to content
You must now use your email address to sign in [click for more info] ×

Crop SVG on Export with Slices


Recommended Posts

Hello, 

If I export to SVG using an artboard, the SVG is clipped to the edges of the artboard. However, I can't see a way to do the same when exporting slices as SVG. Instead the entire vector object gets exported, overlapping the edges of the slice by however large the vector object is. If I export to any image format like PNG it works as expected, clipping the edges.

Ideally I want to export in 2048x2048 pixel resolution so I can easily stitch them back together in my game engine.

Thanks for any help.

Link to comment
Share on other sites

Welcome to the forum!

2 hours ago, doug_h said:

If I export to SVG using an artboard, the SVG is clipped to the edges of the artboard.

For an artboard (or a document) the vectors do, due to the overlapping, partly just lie (are transformed to coordinate values) outside of the shown SVG viewbox area. Thus it looks clipped, but here too then the entire plain vector object gets exported. Only for bitmap/raster image exports, or an SVG with embedded rasterized image data (a flatten SVG) a real clipping will occur as a result. - For Slices the same applies but just inside the artboard/doc boundaries, so these also won't really split/cut vector objects. So all in all Slices work when exported as raster/bitmap (flatten SVG, aka images) but not for plain vectors.

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

Thanks for the insight - as you say, when I open the exported SVG back into AD it does indeed import the whole SVG, although if I then drag it into an already open document it respects the viewbox (if that is the right word) and shows it cropped at the edges, and can be opened in full to edit.

That said, the Unity SVG importer respects this 'fake clip' so for my purposes it does work work… but unless anyone has a better workflow idea I think I'll just have to separate everything into separate objects / layers and do it a bit more manually than I was hoping.

Thanks!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.