25 #include "FXDrawable.h" 33 BITMAP_KEEP = 0x00000001,
34 BITMAP_OWNED = 0x00000002,
35 BITMAP_SHMI = 0x00000020,
36 BITMAP_SHMP = 0x00000040
61 virtual FXID GetDC()
const;
62 virtual int ReleaseDC(FXID)
const;
84 FXBitmap(
FXApp* a,
const FXuchar *pix=
nullptr,FXuint opts=0,FXint w=1,FXint h=1);
87 void setOptions(FXuint opts);
93 void setOwned(FXbool owned);
96 FXbool isOwned()
const;
104 virtual void setData(FXuchar *pix,FXuint opts=0);
112 virtual void setData(FXuchar *pix,FXuint opts,FXint w,FXint h);
118 FXbool
getPixel(FXint x,FXint y)
const {
return (FXbool)((data[y*bytewidth+(x>>3)]>>(x&7))&1); }
121 void setPixel(FXint x,FXint y,FXbool color){ color ? data[y*bytewidth+(x>>3)]|=(1<<(x&7)) : data[y*bytewidth+(x>>3)]&=~(1<<(x&7)); }
130 virtual void create();
136 virtual void detach();
142 virtual void destroy();
147 virtual void restore();
153 virtual void render();
159 virtual void release();
166 virtual void resize(FXint w,FXint h);
172 virtual void scale(FXint w,FXint h);
175 virtual void mirror(FXbool horizontal,FXbool vertical);
178 virtual void rotate(FXint degrees);
186 virtual void crop(FXint x,FXint y,FXint w,FXint h,FXbool color=
false);
189 virtual void fill(FXbool color);
192 virtual void save(
FXStream& store)
const;
198 virtual FXbool savePixels(
FXStream& store)
const;
201 virtual FXbool loadPixels(
FXStream& store);
A Bitmap is a rectangular array of pixels.
Definition: FXBitmap.h:55
FXuint getOptions() const
To get to the option flags.
Definition: FXBitmap.h:90
The Application object is the central point of a FOX user-interface.
Definition: FXApp.h:134
void setPixel(FXint x, FXint y, FXbool color)
Change pixel at x,y.
Definition: FXBitmap.h:121
A stream is a way to serialize data and objects into a byte stream.
Definition: FXStream.h:81
Abstract Device Context.
Definition: FXDC.h:153
FXuchar * getData() const
To get to the pixel data.
Definition: FXBitmap.h:115
Definition: FX4Splitter.h:28
FXbool getPixel(FXint x, FXint y) const
Get pixel at x,y.
Definition: FXBitmap.h:118
Window Device Context.
Definition: FXDCWindow.h:48
Drawable is an abstract base class for any surface that can be drawn upon, such as a FXWindow...
Definition: FXDrawable.h:38