PixelFormat rename
PixelFormatInfo => PixelFormatDescription PixelFormat => PixelFormatInfo PixelFormatType => PixelFormat
This commit is contained in:
@@ -21,13 +21,13 @@
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
struct PixelFormatInfo
|
||||
struct PixelFormatDescription
|
||||
{
|
||||
inline PixelFormatInfo();
|
||||
inline PixelFormatInfo(PixelFormatContent formatContent, UInt8 bpp, PixelFormatSubType subType);
|
||||
inline PixelFormatInfo(const String& formatName, PixelFormatContent formatContent, UInt8 bpp, PixelFormatSubType subType);
|
||||
inline PixelFormatInfo(const String& formatName, PixelFormatContent formatContent, Bitset<> rMask, Bitset<> gMask, Bitset<> bMask, Bitset<> aMask, PixelFormatSubType subType);
|
||||
inline PixelFormatInfo(const String& formatName, PixelFormatContent formatContent, PixelFormatSubType rType, Bitset<> rMask, PixelFormatSubType gType, Bitset<> gMask, PixelFormatSubType bType, Bitset<> bMask, PixelFormatSubType aType, Bitset<> aMask, UInt8 bpp = 0);
|
||||
inline PixelFormatDescription();
|
||||
inline PixelFormatDescription(PixelFormatContent formatContent, UInt8 bpp, PixelFormatSubType subType);
|
||||
inline PixelFormatDescription(const String& formatName, PixelFormatContent formatContent, UInt8 bpp, PixelFormatSubType subType);
|
||||
inline PixelFormatDescription(const String& formatName, PixelFormatContent formatContent, Bitset<> rMask, Bitset<> gMask, Bitset<> bMask, Bitset<> aMask, PixelFormatSubType subType);
|
||||
inline PixelFormatDescription(const String& formatName, PixelFormatContent formatContent, PixelFormatSubType rType, Bitset<> rMask, PixelFormatSubType gType, Bitset<> gMask, PixelFormatSubType bType, Bitset<> bMask, PixelFormatSubType aType, Bitset<> aMask, UInt8 bpp = 0);
|
||||
|
||||
inline void Clear();
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace Nz
|
||||
UInt8 bitsPerPixel;
|
||||
};
|
||||
|
||||
class NAZARA_UTILITY_API PixelFormat
|
||||
class NAZARA_UTILITY_API PixelFormatInfo
|
||||
{
|
||||
friend class Utility;
|
||||
|
||||
@@ -60,37 +60,37 @@ namespace Nz
|
||||
using ConvertFunction = std::function<UInt8*(const UInt8* start, const UInt8* end, UInt8* dst)>;
|
||||
using FlipFunction = std::function<void(unsigned int width, unsigned int height, unsigned int depth, const UInt8* src, UInt8* dst)>;
|
||||
|
||||
static inline std::size_t ComputeSize(PixelFormatType format, unsigned int width, unsigned int height, unsigned int depth);
|
||||
static inline std::size_t ComputeSize(PixelFormat format, unsigned int width, unsigned int height, unsigned int depth);
|
||||
|
||||
static inline bool Convert(PixelFormatType srcFormat, PixelFormatType dstFormat, const void* src, void* dst);
|
||||
static inline bool Convert(PixelFormatType srcFormat, PixelFormatType dstFormat, const void* start, const void* end, void* dst);
|
||||
static inline bool Convert(PixelFormat srcFormat, PixelFormat dstFormat, const void* src, void* dst);
|
||||
static inline bool Convert(PixelFormat srcFormat, PixelFormat dstFormat, const void* start, const void* end, void* dst);
|
||||
|
||||
static bool Flip(PixelFlipping flipping, PixelFormatType format, unsigned int width, unsigned int height, unsigned int depth, const void* src, void* dst);
|
||||
static bool Flip(PixelFlipping flipping, PixelFormat format, unsigned int width, unsigned int height, unsigned int depth, const void* src, void* dst);
|
||||
|
||||
static inline UInt8 GetBitsPerPixel(PixelFormatType format);
|
||||
static inline PixelFormatContent GetContent(PixelFormatType format);
|
||||
static inline UInt8 GetBytesPerPixel(PixelFormatType format);
|
||||
static inline const PixelFormatInfo& GetInfo(PixelFormatType format);
|
||||
static inline const String& GetName(PixelFormatType format);
|
||||
static inline UInt8 GetBitsPerPixel(PixelFormat format);
|
||||
static inline PixelFormatContent GetContent(PixelFormat format);
|
||||
static inline UInt8 GetBytesPerPixel(PixelFormat format);
|
||||
static inline const PixelFormatDescription& GetInfo(PixelFormat format);
|
||||
static inline const String& GetName(PixelFormat format);
|
||||
|
||||
static inline bool HasAlpha(PixelFormatType format);
|
||||
static inline bool HasAlpha(PixelFormat format);
|
||||
|
||||
static PixelFormatType IdentifyFormat(const PixelFormatInfo& info);
|
||||
static PixelFormat IdentifyFormat(const PixelFormatDescription& info);
|
||||
|
||||
static inline bool IsCompressed(PixelFormatType format);
|
||||
static inline bool IsConversionSupported(PixelFormatType srcFormat, PixelFormatType dstFormat);
|
||||
static inline bool IsValid(PixelFormatType format);
|
||||
static inline bool IsCompressed(PixelFormat format);
|
||||
static inline bool IsConversionSupported(PixelFormat srcFormat, PixelFormat dstFormat);
|
||||
static inline bool IsValid(PixelFormat format);
|
||||
|
||||
static inline void SetConvertFunction(PixelFormatType srcFormat, PixelFormatType dstFormat, ConvertFunction func);
|
||||
static inline void SetFlipFunction(PixelFlipping flipping, PixelFormatType format, FlipFunction func);
|
||||
static inline void SetConvertFunction(PixelFormat srcFormat, PixelFormat dstFormat, ConvertFunction func);
|
||||
static inline void SetFlipFunction(PixelFlipping flipping, PixelFormat format, FlipFunction func);
|
||||
|
||||
private:
|
||||
static bool Initialize();
|
||||
static void Uninitialize();
|
||||
|
||||
static PixelFormatInfo s_pixelFormatInfos[PixelFormatType_Max + 1];
|
||||
static ConvertFunction s_convertFunctions[PixelFormatType_Max+1][PixelFormatType_Max+1];
|
||||
static std::map<PixelFormatType, FlipFunction> s_flipFunctions[PixelFlipping_Max+1];
|
||||
static PixelFormatDescription s_pixelFormatInfos[PixelFormat_Max + 1];
|
||||
static ConvertFunction s_convertFunctions[PixelFormat_Max+1][PixelFormat_Max+1];
|
||||
static std::map<PixelFormat, FlipFunction> s_flipFunctions[PixelFlipping_Max+1];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user