mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-14 18:40:55 +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
|
// Aseprite
|
||||||
// Copyright (C) 2019-2020 Igara Studio S.A.
|
// Copyright (C) 2019-2022 Igara Studio S.A.
|
||||||
// Copyright (C) 2001-2018 David Capello
|
// Copyright (C) 2001-2018 David Capello
|
||||||
//
|
//
|
||||||
// This program is distributed under the terms of
|
// This program is distributed under the terms of
|
||||||
@ -60,27 +60,6 @@ rgba_to_graya_func get_gray_func(gen::ToGrayAlgorithm toGray) {
|
|||||||
return nullptr;
|
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 {
|
class ConvertThread : public render::TaskDelegate {
|
||||||
public:
|
public:
|
||||||
ConvertThread(const doc::ImageRef& dstImage,
|
ConvertThread(const doc::ImageRef& dstImage,
|
||||||
@ -179,6 +158,29 @@ private:
|
|||||||
base::thread m_thread;
|
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 {
|
class ColorModeWindow : public app::gen::ColorMode {
|
||||||
public:
|
public:
|
||||||
ColorModeWindow(Editor* editor)
|
ColorModeWindow(Editor* editor)
|
||||||
@ -422,6 +424,8 @@ private:
|
|||||||
bool m_imageJustCreated;
|
bool m_imageJustCreated;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif // ENABLE_UI
|
||||||
|
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
|
||||||
class ChangePixelFormatCommand : public Command {
|
class ChangePixelFormatCommand : public Command {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user