mirror of https://github.com/fltk/fltk
Simpler implementation of Fl_Image_Surface.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11278 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
8bd3ea6c8a
commit
8782f2f925
|
@ -46,7 +46,6 @@ public:
|
||||||
int printable_rect(int *w, int *h) {*w = width; *h = height; return 0;}
|
int printable_rect(int *w, int *h) {*w = width; *h = height; return 0;}
|
||||||
Fl_RGB_Image *image();
|
Fl_RGB_Image *image();
|
||||||
void end_current();
|
void end_current();
|
||||||
Fl_Offscreen get_offscreen_before_delete();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Fl_Image_Surface::Helper::Helper(int w, int h, int high_res) : Fl_Widget_Surface(NULL), width(w), height(h) {
|
Fl_Image_Surface::Helper::Helper(int w, int h, int high_res) : Fl_Widget_Surface(NULL), width(w), height(h) {
|
||||||
|
@ -144,7 +143,6 @@ public:
|
||||||
Fl_RGB_Image *image();
|
Fl_RGB_Image *image();
|
||||||
void end_current();
|
void end_current();
|
||||||
int printable_rect(int *w, int *h) {*w = width; *h = height; return 0;}
|
int printable_rect(int *w, int *h) {*w = width; *h = height; return 0;}
|
||||||
Fl_Offscreen get_offscreen_before_delete();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Fl_Image_Surface::Helper::Helper(int w, int h, int high_res) : Fl_Widget_Surface(NULL), width(w), height(h) {
|
Fl_Image_Surface::Helper::Helper(int w, int h, int high_res) : Fl_Widget_Surface(NULL), width(w), height(h) {
|
||||||
|
@ -219,7 +217,6 @@ public:
|
||||||
Fl_RGB_Image *image() {} // to implement
|
Fl_RGB_Image *image() {} // to implement
|
||||||
void end_current() {} // to implement
|
void end_current() {} // to implement
|
||||||
int printable_rect(int *w, int *h) {*w = width; *h = height; return 0;}
|
int printable_rect(int *w, int *h) {*w = width; *h = height; return 0;}
|
||||||
Fl_Offscreen get_offscreen_before_delete();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -246,7 +243,6 @@ public:
|
||||||
int printable_rect(int *w, int *h) {*w = width; *h = height; return 0;}
|
int printable_rect(int *w, int *h) {*w = width; *h = height; return 0;}
|
||||||
Fl_RGB_Image *image();
|
Fl_RGB_Image *image();
|
||||||
void end_current();
|
void end_current();
|
||||||
Fl_Offscreen get_offscreen_before_delete();
|
|
||||||
public:
|
public:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -306,11 +302,6 @@ void Fl_Image_Surface::Helper::end_current()
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Fl_Offscreen Fl_Image_Surface::Helper::get_offscreen_before_delete() {
|
|
||||||
Fl_Offscreen keep = offscreen;
|
|
||||||
offscreen = 0;
|
|
||||||
return keep;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Constructor with optional high resolution.
|
/** Constructor with optional high resolution.
|
||||||
\param w and \param h give the size in pixels of the resulting image.
|
\param w and \param h give the size in pixels of the resulting image.
|
||||||
|
@ -381,7 +372,9 @@ Fl_Shared_Image* Fl_Image_Surface::highres_image()
|
||||||
/** Allows to delete the Fl_Image_Surface object while keeping its underlying Fl_Offscreen
|
/** Allows to delete the Fl_Image_Surface object while keeping its underlying Fl_Offscreen
|
||||||
*/
|
*/
|
||||||
Fl_Offscreen Fl_Image_Surface::get_offscreen_before_delete() {
|
Fl_Offscreen Fl_Image_Surface::get_offscreen_before_delete() {
|
||||||
return platform_surface->get_offscreen_before_delete();
|
Fl_Offscreen keep = platform_surface->offscreen;
|
||||||
|
platform_surface->offscreen = 0;
|
||||||
|
return keep;
|
||||||
}
|
}
|
||||||
|
|
||||||
// implementation of the fl_XXX_offscreen() functions
|
// implementation of the fl_XXX_offscreen() functions
|
||||||
|
|
Loading…
Reference in New Issue