diff options
| author | Manolo Gouy <Manolo> | 2010-05-27 17:20:18 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2010-05-27 17:20:18 +0000 |
| commit | 26049351e09d75bdf8b35273a76cf65202583fa7 (patch) | |
| tree | 010685555b9f83d071a14262e8ce346c7388f254 /src/fl_draw_image_win32.cxx | |
| parent | 0a280ce591046f6834f1233087a72fa6bdd97bad (diff) | |
Better device hierarchy with surfaces and graphics drivers.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7617 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_draw_image_win32.cxx')
| -rw-r--r-- | src/fl_draw_image_win32.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/fl_draw_image_win32.cxx b/src/fl_draw_image_win32.cxx index 403dfd9fe..e1d970ad7 100644 --- a/src/fl_draw_image_win32.cxx +++ b/src/fl_draw_image_win32.cxx @@ -46,6 +46,7 @@ #include <config.h> #include <FL/Fl.H> +#include <FL/Fl_Printer.H> #include <FL/fl_draw.H> #include <FL/x.H> @@ -254,7 +255,7 @@ static void innards(const uchar *buf, int X, int Y, int W, int H, } } } - if(Fl_Device::current()->type() == Fl_Device::gdi_printer) { + if(Fl_Surface_Device::surface()->type() == Fl_Printer::device_type) { // if print context, device and logical units are not equal, so SetDIBitsToDevice // does not do the expected job, whereas StretchDIBits does it. StretchDIBits(fl_gc, x, y+j-k, w, k, 0, 0, w, k, @@ -283,7 +284,7 @@ static void innards(const uchar *buf, int X, int Y, int W, int H, static int fl_abs(int v) { return v<0 ? -v : v; } -void Fl_Device::draw_image(const uchar* buf, int x, int y, int w, int h, int d, int l){ +void Fl_Graphics_Driver::draw_image(const uchar* buf, int x, int y, int w, int h, int d, int l){ if (fl_abs(d)&FL_IMAGE_WITH_ALPHA) { d ^= FL_IMAGE_WITH_ALPHA; innards(buf,x,y,w,h,d,l,fl_abs(d),0,0); @@ -292,7 +293,7 @@ void Fl_Device::draw_image(const uchar* buf, int x, int y, int w, int h, int d, } } -void Fl_Device::draw_image(Fl_Draw_Image_Cb cb, void* data, +void Fl_Graphics_Driver::draw_image(Fl_Draw_Image_Cb cb, void* data, int x, int y, int w, int h,int d) { if (fl_abs(d)&FL_IMAGE_WITH_ALPHA) { d ^= FL_IMAGE_WITH_ALPHA; @@ -302,7 +303,7 @@ void Fl_Device::draw_image(Fl_Draw_Image_Cb cb, void* data, } } -void Fl_Device::draw_image_mono(const uchar* buf, int x, int y, int w, int h, int d, int l){ +void Fl_Graphics_Driver::draw_image_mono(const uchar* buf, int x, int y, int w, int h, int d, int l){ if (fl_abs(d)&FL_IMAGE_WITH_ALPHA) { d ^= FL_IMAGE_WITH_ALPHA; innards(buf,x,y,w,h,d,l,1,0,0); @@ -311,7 +312,7 @@ void Fl_Device::draw_image_mono(const uchar* buf, int x, int y, int w, int h, in } } -void Fl_Device::draw_image_mono(Fl_Draw_Image_Cb cb, void* data, +void Fl_Graphics_Driver::draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int x, int y, int w, int h,int d) { if (fl_abs(d)&FL_IMAGE_WITH_ALPHA) { d ^= FL_IMAGE_WITH_ALPHA; |
