Clean up some common Image and Canvas code.

This commit is contained in:
Alex Szpakowski
2020-02-01 23:54:51 -04:00
parent 7684920f19
commit 6c447ab4f6
11 changed files with 140 additions and 201 deletions
+7 -5
View File
@@ -785,12 +785,14 @@ public:
const Capabilities &getCapabilities() const;
/**
* Gets whether the specified pixel format is supported by Canvases or
* Images.
* Converts PIXELFORMAT_NORMAL and PIXELFORMAT_HDR into a real format.
**/
virtual bool isCanvasFormatSupported(PixelFormat format) const = 0;
virtual bool isCanvasFormatSupported(PixelFormat format, bool readable) const = 0;
virtual bool isImageFormatSupported(PixelFormat format, bool sRGB = false) const = 0;
virtual PixelFormat getSizedFormat(PixelFormat format) const = 0;
/**
* Gets whether the specified pixel format is supported.
**/
virtual bool isPixelFormatSupported(PixelFormat format, bool rendertarget, bool readable, bool sRGB = false) = 0;
/**
* Gets the renderer used by love.graphics.