diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-07-08 10:58:56 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-07-08 10:58:56 +0200 |
| commit | 3cca7e9f25166c995a9b9b7bca5beb20be969ac7 (patch) | |
| tree | e4c373b3ed71e08010e53e4efdd92f82692dba97 /Map/Data/ExportFormats.swift | |
| parent | 1b098db3824728699b2dd9d0820b8599a7750560 (diff) | |
Comment out unused preferences4.0.0
Diffstat (limited to 'Map/Data/ExportFormats.swift')
| -rw-r--r-- | Map/Data/ExportFormats.swift | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/Map/Data/ExportFormats.swift b/Map/Data/ExportFormats.swift new file mode 100644 index 0000000..b0b916b --- /dev/null +++ b/Map/Data/ExportFormats.swift @@ -0,0 +1,55 @@ +import SwiftUI +import UniformTypeIdentifiers + +enum ExportFormats: String, CaseIterable { + case png + case jpeg + case tiff + case bmp + case gif + + var title: String { + switch self { + case .png: + String(localized: "export_formats.png") + case .jpeg: + String(localized: "export_formats.jpeg") + case .tiff: + String(localized: "export_formats.tiff") + case .bmp: + String(localized: "export_formats.bmp") + case .gif: + String(localized: "export_formats.gif") + } + } + + var utType: UTType { + switch self { + case .png: + .png + case .jpeg: + .jpeg + case .tiff: + .tiff + case .bmp: + .bmp + case .gif: + .gif + } + } + + var fileType: NSBitmapImageRep.FileType { + switch self { + case .png: + .png + case .jpeg: + .jpeg + case .tiff: + .tiff + case .bmp: + .bmp + case .gif: + .gif + } + } +} |