mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-11 09:40:42 +00:00
Fix ChangePixelFormatCommand so it can be compiled/linked when ENABLE_UI=0
This commit is contained in:
parent
2bb93247aa
commit
4b3b1f31e0
@ -1,5 +1,5 @@
|
||||
// Aseprite
|
||||
// Copyright (C) 2019-2020 Igara Studio S.A.
|
||||
// Copyright (C) 2019-2022 Igara Studio S.A.
|
||||
// Copyright (C) 2001-2018 David Capello
|
||||
//
|
||||
// This program is distributed under the terms of
|
||||
@ -60,27 +60,6 @@ rgba_to_graya_func get_gray_func(gen::ToGrayAlgorithm toGray) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
class ConversionItem : public ListItem {
|
||||
public:
|
||||
ConversionItem(const doc::PixelFormat pixelFormat)
|
||||
: m_pixelFormat(pixelFormat) {
|
||||
switch (pixelFormat) {
|
||||
case IMAGE_RGB:
|
||||
setText("-> RGB");
|
||||
break;
|
||||
case IMAGE_GRAYSCALE:
|
||||
setText("-> Grayscale");
|
||||
break;
|
||||
case IMAGE_INDEXED:
|
||||
setText("-> Indexed");
|
||||
break;
|
||||
}
|
||||
}
|
||||
doc::PixelFormat pixelFormat() const { return m_pixelFormat; }
|
||||
private:
|
||||
doc::PixelFormat m_pixelFormat;
|
||||
};
|
||||
|
||||
class ConvertThread : public render::TaskDelegate {
|
||||
public:
|
||||
ConvertThread(const doc::ImageRef& dstImage,
|
||||
@ -179,6 +158,29 @@ private:
|
||||
base::thread m_thread;
|
||||
};
|
||||
|
||||
#ifdef ENABLE_UI
|
||||
|
||||
class ConversionItem : public ListItem {
|
||||
public:
|
||||
ConversionItem(const doc::PixelFormat pixelFormat)
|
||||
: m_pixelFormat(pixelFormat) {
|
||||
switch (pixelFormat) {
|
||||
case IMAGE_RGB:
|
||||
setText("-> RGB");
|
||||
break;
|
||||
case IMAGE_GRAYSCALE:
|
||||
setText("-> Grayscale");
|
||||
break;
|
||||
case IMAGE_INDEXED:
|
||||
setText("-> Indexed");
|
||||
break;
|
||||
}
|
||||
}
|
||||
doc::PixelFormat pixelFormat() const { return m_pixelFormat; }
|
||||
private:
|
||||
doc::PixelFormat m_pixelFormat;
|
||||
};
|
||||
|
||||
class ColorModeWindow : public app::gen::ColorMode {
|
||||
public:
|
||||
ColorModeWindow(Editor* editor)
|
||||
@ -422,6 +424,8 @@ private:
|
||||
bool m_imageJustCreated;
|
||||
};
|
||||
|
||||
#endif // ENABLE_UI
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
class ChangePixelFormatCommand : public Command {
|
||||
|
Loading…
x
Reference in New Issue
Block a user