mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 22:02:49 -06:00
38 lines
532 B
C++
38 lines
532 B
C++
class ImageDraw : public Draw, NoCopy {
|
|
Size size;
|
|
|
|
#ifdef PLATFORM_WIN32
|
|
struct Section {
|
|
HDC dc;
|
|
HBITMAP hbmp, hbmpOld;
|
|
RGBA *pixels;
|
|
|
|
void Init(int cx, int cy);
|
|
~Section();
|
|
};
|
|
|
|
Section rgb;
|
|
Section a;
|
|
Draw alpha;
|
|
#endif
|
|
|
|
#ifdef PLATFORM_X11
|
|
Draw alpha;
|
|
#endif
|
|
|
|
bool has_alpha;
|
|
|
|
void Init();
|
|
Image Get(bool pm) const;
|
|
|
|
public:
|
|
Draw& Alpha();
|
|
|
|
operator Image() const;
|
|
|
|
Image GetStraight() const;
|
|
|
|
ImageDraw(Size sz);
|
|
ImageDraw(int cx, int cy);
|
|
~ImageDraw();
|
|
};
|