Vixen
02b45cc4
csharp
public static class SpriteSlicer

Cuts a texture into sprite rects.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

The part of a sprite editor that is not a user interface. Everything here is a pure function of the pixels and the options, which is what lets the three slicing modes be checked against images built in a test rather than against a screenshot of a panel — the same split TextureLadder makes for the mip inspector.

⚠ Slicing is a suggestion, not a result. What it returns is what the panel puts in front of an author to adjust, and the sidecar records the adjusted rects rather than the options that produced them. That is deliberate: an automatic slice depends on the pixels, so a sheet re-exported with one frame moved would silently renumber every sprite after it and break every reference — where a recorded rect stays where it was until somebody moves it.

Methods (4)

Used by (2)

  • SpriteSheetViewVixen.Editor.AssetEditors
  • SpriteSlicerTestsVixen.Editor.Assets.Tests