25 #include "FXDrawable.h" 33 IMAGE_KEEP = 0x00000001,
34 IMAGE_OWNED = 0x00000002,
36 IMAGE_NEAREST = 0x00000004,
37 IMAGE_OPAQUE = 0x00000008,
38 IMAGE_ALPHACOLOR = 0x00000010,
39 IMAGE_SHMI = 0x00000020,
40 IMAGE_SHMP = 0x00000040,
41 IMAGE_ALPHAGUESS = 0x00000080,
42 IMAGE_THRESGUESS = 0x00000100
76 virtual FXID GetDC()
const;
77 virtual int ReleaseDC(FXID)
const;
79 void render_true_32(
void *xim,FXuchar *img);
80 void render_true_24(
void *xim,FXuchar *img);
81 void render_true_16_fast(
void *xim,FXuchar *img);
82 void render_true_16_dither(
void *xim,FXuchar *img);
83 void render_true_8_fast(
void *xim,FXuchar *img);
84 void render_true_8_dither(
void *xim,FXuchar *img);
85 void render_true_N_fast(
void *xim,FXuchar *img);
86 void render_true_N_dither(
void *xim,FXuchar *img);
87 void render_index_4_fast(
void *xim,FXuchar *img);
88 void render_index_4_dither(
void *xim,FXuchar *img);
89 void render_index_8_fast(
void *xim,FXuchar *img);
90 void render_index_8_dither(
void *xim,FXuchar *img);
91 void render_index_N_fast(
void *xim,FXuchar *img);
92 void render_index_N_dither(
void *xim,FXuchar *img);
93 void render_gray_8_fast(
void *xim,FXuchar *img);
94 void render_gray_8_dither(
void *xim,FXuchar *img);
95 void render_gray_N_fast(
void *xim,FXuchar *img);
96 void render_gray_N_dither(
void *xim,FXuchar *img);
97 void render_mono_1_fast(
void *xim,FXuchar *img);
98 void render_mono_1_dither(
void *xim,FXuchar *img);
116 FXImage(
FXApp* a,
const FXColor *pix=
nullptr,FXuint opts=0,FXint w=1,FXint h=1);
119 void setOptions(FXuint opts);
125 void setOwned(FXbool owned);
128 FXbool isOwned()
const;
136 virtual void setData(FXColor *pix,FXuint opts=0);
144 virtual void setData(FXColor *pix,FXuint opts,FXint w,FXint h);
150 FXColor
getPixel(FXint x,FXint y)
const {
return data[y*width+x]; }
153 void setPixel(FXint x,FXint y,FXColor color){ data[y*width+x]=color; }
156 FXbool hasAlpha()
const;
166 virtual void create();
172 virtual void detach();
178 virtual void destroy();
185 virtual void restore();
194 virtual void render();
200 virtual void release();
207 virtual void resize(FXint w,FXint h);
213 virtual void scale(FXint w,FXint h,FXint quality=0);
216 virtual void mirror(FXbool horizontal,FXbool vertical);
222 virtual void rotate(FXint degrees);
230 virtual void crop(FXint x,FXint y,FXint w,FXint h,FXColor color=0);
233 virtual void fill(FXColor color);
236 virtual void fade(FXColor color,FXint factor=255);
243 virtual void xshear(FXint shear,FXColor clr=0);
250 virtual void yshear(FXint shear,FXColor clr=0);
253 virtual void hgradient(FXColor left,FXColor right);
256 virtual void vgradient(FXColor top,FXColor bottom);
259 virtual void gradient(FXColor topleft,FXColor topright,FXColor bottomleft,FXColor bottomright);
262 virtual void blend(FXColor color);
265 virtual void invert();
268 virtual void colorize(FXColor color);
271 virtual FXbool savePixels(
FXStream& store)
const;
274 virtual FXbool loadPixels(
FXStream& store);
277 virtual void save(
FXStream& store)
const;
void setPixel(FXint x, FXint y, FXColor color)
Change pixel at x,y.
Definition: FXImage.h:153
FXColor * getData() const
Return pointer to the pixel data of the image.
Definition: FXImage.h:147
The Application object is the central point of a FOX user-interface.
Definition: FXApp.h:134
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
Definition: FX4Splitter.h:28
FXColor getPixel(FXint x, FXint y) const
Get pixel at x,y.
Definition: FXImage.h:150
Window Device Context.
Definition: FXDCWindow.h:48
An Image is a rectangular array of pixels.
Definition: FXImage.h:67
FXuint getOptions() const
To get to the option flags.
Definition: FXImage.h:122
Drawable is an abstract base class for any surface that can be drawn upon, such as a FXWindow...
Definition: FXDrawable.h:38