resonance 1.0.1
Loading...
Searching...
No Matches
acanvas24.h
Go to the documentation of this file.
1#pragma once
2
3#include "rndartt/acanvas.h"
4
34class ACanvas24 : public ACanvas {
35public:
43 explicit ACanvas24(const ABitmap &bitmap);
44
51 virtual ~ACanvas24();
52
59 virtual void SetColor8(int nIndex);
60
67 virtual void SetColor15(unsigned short nColor);
68
75 virtual void SetColor24(const unsigned char *pRGB);
76
86 virtual void SetColor32(unsigned int nColor);
87
94 virtual void SetColorNative(unsigned int nColor);
95
102 virtual int GetColor8();
103
110 virtual unsigned short GetColor15();
111
118 virtual void GetColor24(unsigned char *pRGB);
119
128 virtual unsigned int GetColor32();
129
136 virtual unsigned int GetColorNative();
137
144 virtual void DrawPixel8U(int nX, int nY, int nIndex);
145
152 virtual void DrawPixel15U(int nX, int nY, unsigned short nColor);
153
163 virtual void DrawPixel32U(int nX, int nY, unsigned int nColor);
164
174 virtual void DrawPixelNativeU(int nX, int nY, unsigned int nColor);
175
182 virtual int GetPixel8U(int nX, int nY);
183
190 virtual unsigned short GetPixel15U(int nX, int nY);
191
196 virtual unsigned int GetPixel32U(int nX, int nY);
197
206 virtual unsigned int GetPixelNativeU(int nX, int nY);
207
208protected:
209 // Written as a word by the native setter and as three separate bytes by the index setter, which
210 // never touches the fourth. The fourth byte's purpose is unrecovered.
211 union {
212 unsigned int mColorNative;
213 unsigned char mColorChannels[4];
214 }; // +0x24
215};
Description of a pixel rectangle, its layout, and its palette.
Definition abitmap.h:95
virtual void GetColor24(unsigned char *pRGB)
Slot 9.
unsigned int mColorNative
Definition acanvas24.h:212
virtual void DrawPixelNativeU(int nX, int nY, unsigned int nColor)
Slot 23.
virtual int GetPixel8U(int nX, int nY)
Slot 25.
virtual unsigned short GetPixel15U(int nX, int nY)
Slot 27.
unsigned char mColorChannels[4]
Definition acanvas24.h:213
virtual unsigned int GetColorNative()
Slot 11.
virtual unsigned int GetPixelNativeU(int nX, int nY)
Slot 33.
ACanvas24(const ABitmap &bitmap)
Construct over a bitmap.
virtual unsigned int GetPixel32U(int nX, int nY)
Slot 31.
virtual void SetColor8(int nIndex)
Slot 2.
virtual void DrawPixel15U(int nX, int nY, unsigned short nColor)
Slot 17.
virtual void SetColorNative(unsigned int nColor)
Slot 6.
virtual void SetColor32(unsigned int nColor)
Slot 5.
virtual void DrawPixel8U(int nX, int nY, int nIndex)
Slot 15.
virtual void SetColor24(const unsigned char *pRGB)
Slot 4.
virtual void DrawPixel32U(int nX, int nY, unsigned int nColor)
Slot 21.
virtual unsigned int GetColor32()
Slot 10.
virtual unsigned short GetColor15()
Slot 8.
virtual void SetColor15(unsigned short nColor)
Slot 3.
virtual ~ACanvas24()
Slot 1.
virtual int GetColor8()
Slot 7.
ACanvas(const ABitmap &bitmap)
Adopt a pixel description.