private void AutoSlicePixmap() { if (this.TargetPixmap == null) { return; } byte alpha = (byte)this.alphaCutoffEntry.Value; IEnumerable <Rect> rects = PixmapSlicingUtility.SliceAutoFit(this.TargetPixmap, alpha); this.SetAtlas(rects); UndoRedoManager.Finish(); }
private void GridSlicePixmap() { if (this.TargetPixmap == null) { return; } // We don't use the outdated AnimCols / AnimRos properties here, as they'll be // gone in v3.0 anyway and are the legacy way to define an animated Pixmap. List <Rect> generatedAtlas = PixmapSlicingUtility.SliceGrid( this.TargetPixmap, (int)this.colsInput.Value, (int)this.rowsInput.Value, (int)this.borderInput.Value); this.SetAtlas(generatedAtlas); }