| 1 | // Aseprite | 
|---|---|
| 2 | // Copyright (C) 2019-2022 Igara Studio S.A. | 
| 3 | // Copyright (C) 2016-2017 David Capello | 
| 4 | // | 
| 5 | // This program is distributed under the terms of | 
| 6 | // the End-User License Agreement for Aseprite. | 
| 7 | |
| 8 | #ifdef HAVE_CONFIG_H | 
| 9 | #include "config.h" | 
| 10 | #endif | 
| 11 | |
| 12 | #include "app/cli/cli_open_file.h" | 
| 13 | |
| 14 | #include "app/doc.h" | 
| 15 | #include "app/file/file.h" | 
| 16 | #include "doc/sprite.h" | 
| 17 | #include "doc/tag.h" | 
| 18 | #include "doc/tags.h" | 
| 19 | |
| 20 | namespace app { | 
| 21 | |
| 22 | FileOpROI CliOpenFile::roi() const | 
| 23 | { | 
| 24 | ASSERT(document); | 
| 25 | |
| 26 | SelectedFrames selFrames; | 
| 27 | if (hasFrameRange()) | 
| 28 | selFrames.insert(fromFrame, toFrame); | 
| 29 | |
| 30 | return FileOpROI(document, | 
| 31 | gfx::Rect(), | 
| 32 | slice, | 
| 33 | tag, | 
| 34 | selFrames, | 
| 35 | true); | 
| 36 | } | 
| 37 | |
| 38 | } // namespace app | 
| 39 | 
