diff options
Diffstat (limited to 'FL')
| -rw-r--r-- | FL/Fl_Screen_Driver.H | 11 | ||||
| -rw-r--r-- | FL/fl_draw.H | 18 |
2 files changed, 11 insertions, 18 deletions
diff --git a/FL/Fl_Screen_Driver.H b/FL/Fl_Screen_Driver.H index 87ef0261a..d13dbaafe 100644 --- a/FL/Fl_Screen_Driver.H +++ b/FL/Fl_Screen_Driver.H @@ -37,6 +37,8 @@ // TODO: application shortcuts class Fl_Window; +class Fl_RGB_Image; +class Fl_Group; class FL_EXPORT Fl_Screen_Driver { @@ -118,6 +120,15 @@ public: static unsigned font_desc_size(); static const char *font_name(int num); static void font_name(int num, const char *name); + // read raw image from a window or an offscreen buffer +#if defined(FL_PORTING) +# pragma message "FL_PORTING: implement code to read RGB data from screen" +#endif + virtual uchar *read_image(uchar *p, int x, int y, int w, int h, int alpha); + virtual uchar *read_win_rectangle(uchar *p, int X, int Y, int w, int h, int alpha) {return NULL;} + static void write_image_inside(Fl_RGB_Image *to, Fl_RGB_Image *from, int to_x, int to_y); + static Fl_RGB_Image *traverse_to_gl_subwindows(Fl_Group *g, uchar *p, int x, int y, int w, int h, int alpha, + Fl_RGB_Image *full_img); }; diff --git a/FL/fl_draw.H b/FL/fl_draw.H index f5adcb21c..05019a311 100644 --- a/FL/fl_draw.H +++ b/FL/fl_draw.H @@ -756,24 +756,6 @@ inline void fl_draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int */ inline char fl_can_do_alpha_blending() {return Fl_Display_Device::display_device()->driver()->can_do_alpha_blending();} -/** - Reads an RGB(A) image from the current window or off-screen buffer. - \param[in] p pixel buffer, or NULL to allocate one - \param[in] X,Y position of top-left of image to read - \param[in] W,H width and height of image to read - \param[in] alpha alpha value for image (0 for none) - \returns pointer to pixel buffer, or NULL if allocation failed. - - The \p p argument points to a buffer that can hold the image and must - be at least \p W*H*3 bytes when reading RGB images, or \p W*H*4 bytes - when reading RGBA images. If NULL, fl_read_image() will create an - array of the proper size which can be freed using <tt>delete[]</tt>. - - The \p alpha parameter controls whether an alpha channel is created - and the value that is placed in the alpha channel. If 0, no alpha - channel is generated. - */ -/* note: doxygen comment here to avoid triplication in os-speciic files */ FL_EXPORT uchar *fl_read_image(uchar *p,int X,int Y,int W,int H,int alpha=0); // pixmaps: |
