Remove virtual member Fl_GraphicsDriver::mask_bitmap(char **) and its re-implementations.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12843 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
9b01ff63e7
commit
26aabc91e1
@ -407,8 +407,6 @@ public:
|
||||
virtual void *gc(void) {return NULL;}
|
||||
/** Support for pixmap drawing */
|
||||
virtual uchar **mask_bitmap() { return 0; }
|
||||
/** Support for pixmap drawing */
|
||||
virtual void mask_bitmap(uchar **) {}
|
||||
// default implementation may be enough
|
||||
/** Support for PostScript drawing */
|
||||
virtual float scale_font_for_PostScript(Fl_Font_Descriptor *desc, int s) { return float(s); }
|
||||
|
||||
@ -48,9 +48,8 @@ protected:
|
||||
HDC gc_;
|
||||
int numcount;
|
||||
int counts[20];
|
||||
uchar **mask_bitmap_;
|
||||
uchar **mask_bitmap() {return mask_bitmap_;}
|
||||
void mask_bitmap(uchar **value) { mask_bitmap_ = value; }
|
||||
uchar *mask_bitmap_;
|
||||
uchar **mask_bitmap() {return &mask_bitmap_;}
|
||||
int p_size;
|
||||
POINT *p;
|
||||
public:
|
||||
|
||||
@ -687,15 +687,16 @@ void Fl_GDI_Printer_Graphics_Driver::draw_pixmap(Fl_Pixmap *pxm, int XP, int YP,
|
||||
void Fl_GDI_Graphics_Driver::cache(Fl_Pixmap *img) {
|
||||
Fl_Image_Surface *surf = new Fl_Image_Surface(img->data_w(), img->data_h());
|
||||
Fl_Surface_Device::push_current(surf);
|
||||
uchar *bitmap = 0;
|
||||
Fl_Surface_Device::surface()->driver()->mask_bitmap(&bitmap);
|
||||
uchar **pbitmap = surf->driver()->mask_bitmap();
|
||||
*pbitmap = 0;
|
||||
fl_draw_pixmap(img->data(), 0, 0, FL_BLACK);
|
||||
*Fl_Graphics_Driver::pixmap_bg_color(img) = Fl_WinAPI_System_Driver::win_pixmap_bg_color; // computed by fl_draw_pixmap()
|
||||
Fl_Surface_Device::surface()->driver()->mask_bitmap(0);
|
||||
uchar *bitmap = *pbitmap;
|
||||
if (bitmap) {
|
||||
*Fl_Graphics_Driver::mask(img) = (fl_uintptr_t)fl_create_bitmask(img->data_w(), img->data_h(), bitmap);
|
||||
*Fl_Graphics_Driver::mask(img) = (fl_uintptr_t)create_bitmask(img->data_w(), img->data_h(), bitmap);
|
||||
delete[] bitmap;
|
||||
}
|
||||
*pbitmap = 0;
|
||||
Fl_Surface_Device::pop_current();
|
||||
Fl_Offscreen id = surf->get_offscreen_before_delete();
|
||||
delete surf;
|
||||
|
||||
@ -91,9 +91,8 @@ protected:
|
||||
static void init_built_in_fonts();
|
||||
#endif
|
||||
static GC gc_;
|
||||
uchar **mask_bitmap_;
|
||||
uchar **mask_bitmap() {return mask_bitmap_;}
|
||||
void mask_bitmap(uchar **value) { mask_bitmap_ = value; }
|
||||
uchar *mask_bitmap_;
|
||||
uchar **mask_bitmap() {return &mask_bitmap_;}
|
||||
int p_size;
|
||||
typedef struct {short x, y;} XPOINT;
|
||||
XPOINT *p;
|
||||
|
||||
@ -869,14 +869,15 @@ void Fl_Xlib_Graphics_Driver::draw_fixed(Fl_Pixmap *pxm, int X, int Y, int W, in
|
||||
void Fl_Xlib_Graphics_Driver::cache(Fl_Pixmap *pxm) {
|
||||
Fl_Image_Surface *surf = new Fl_Image_Surface(pxm->data_w(), pxm->data_h());
|
||||
Fl_Surface_Device::push_current(surf);
|
||||
uchar *bitmap = 0;
|
||||
Fl_Surface_Device::surface()->driver()->mask_bitmap(&bitmap);
|
||||
uchar **pbitmap = surf->driver()->mask_bitmap();
|
||||
*pbitmap = 0;
|
||||
fl_draw_pixmap(pxm->data(), 0, 0, FL_BLACK);
|
||||
Fl_Surface_Device::surface()->driver()->mask_bitmap(0);
|
||||
uchar *bitmap = *pbitmap;
|
||||
if (bitmap) {
|
||||
*Fl_Graphics_Driver::mask(pxm) = (fl_uintptr_t)create_bitmask(pxm->data_w(), pxm->data_h(), bitmap);
|
||||
delete[] bitmap;
|
||||
}
|
||||
*pbitmap = 0;
|
||||
Fl_Surface_Device::pop_current();
|
||||
Fl_Offscreen id = surf->get_offscreen_before_delete();
|
||||
delete surf;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user