summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Bitmap.cxx8
-rw-r--r--src/Fl_Device.cxx16
-rw-r--r--src/Fl_Image.cxx8
-rw-r--r--src/Fl_Pixmap.cxx8
4 files changed, 18 insertions, 22 deletions
diff --git a/src/Fl_Bitmap.cxx b/src/Fl_Bitmap.cxx
index 3995c0773..13d5bcaee 100644
--- a/src/Fl_Bitmap.cxx
+++ b/src/Fl_Bitmap.cxx
@@ -248,10 +248,10 @@ Fl_Bitmask fl_create_alphamask(int w, int h, int d, int ld, const uchar *array)
}
void Fl_Bitmap::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
- if(fl_device->type() == Fl_Device::postscript_device) {
- fl_device->draw(this, XP, YP, WP, HP, cx, cy);
- return;
- }
+ fl_device->draw(this, XP, YP, WP, HP, cx, cy);
+}
+
+void Fl_Bitmap::generic_device_draw(int XP, int YP, int WP, int HP, int cx, int cy) {
if (!array) {
draw_empty(XP, YP);
return;
diff --git a/src/Fl_Device.cxx b/src/Fl_Device.cxx
index 98a5ad8fa..9c76d3f6f 100644
--- a/src/Fl_Device.cxx
+++ b/src/Fl_Device.cxx
@@ -27,7 +27,6 @@
#include <FL/Fl.H>
#include <FL/Fl_Device.H>
-//#include <FL/fl_draw.H>
#include <FL/Fl_Image.H>
/** \brief Draws an Fl_Pixmap object to the device.
@@ -35,9 +34,8 @@
Specifies a bounding box for the image, with the origin (upper left-hand corner) of
the image offset by the cx and cy arguments.
*/
-void Fl_Device::draw(Fl_Pixmap *pxm,int XP, int YP, int WP, int HP, int cx, int cy)
-{
- pxm->draw(XP, YP, WP, HP, cx, cy);
+void Fl_Device::draw(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy) {
+ pxm->generic_device_draw(XP, YP, WP, HP, cx, cy);
}
/** \brief Draws an Fl_Bitmap object to the device.
@@ -45,9 +43,8 @@ void Fl_Device::draw(Fl_Pixmap *pxm,int XP, int YP, int WP, int HP, int cx, int
Specifies a bounding box for the image, with the origin (upper left-hand corner) of
the image offset by the cx and cy arguments.
*/
-void Fl_Device::draw(Fl_Bitmap *bm,int XP, int YP, int WP, int HP, int cx, int cy)
-{
- bm->draw(XP, YP, WP, HP, cx, cy);
+void Fl_Device::draw(Fl_Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy) {
+ bm->generic_device_draw(XP, YP, WP, HP, cx, cy);
}
/** \brief Draws an Fl_RGB_Image object to the device.
@@ -55,9 +52,8 @@ void Fl_Device::draw(Fl_Bitmap *bm,int XP, int YP, int WP, int HP, int cx, int c
Specifies a bounding box for the image, with the origin (upper left-hand corner) of
the image offset by the cx and cy arguments.
*/
-void Fl_Device::draw(Fl_RGB_Image *rgb,int XP, int YP, int WP, int HP, int cx, int cy)
-{
- rgb->draw(XP, YP, WP, HP, cx, cy);
+void Fl_Device::draw(Fl_RGB_Image *rgb, int XP, int YP, int WP, int HP, int cx, int cy) {
+ rgb->generic_device_draw(XP, YP, WP, HP, cx, cy);
}
/**
diff --git a/src/Fl_Image.cxx b/src/Fl_Image.cxx
index c7a79bfd1..bf39f6b09 100644
--- a/src/Fl_Image.cxx
+++ b/src/Fl_Image.cxx
@@ -434,10 +434,10 @@ static void alpha_blend(Fl_RGB_Image *img, int X, int Y, int W, int H, int cx, i
#endif // !WIN32 && !__APPLE_QUARTZ__
void Fl_RGB_Image::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
- if(fl_device->type() == Fl_Device::postscript_device) {
- fl_device->draw(this, XP, YP, WP, HP, cx, cy);
- return;
- }
+ fl_device->draw(this, XP, YP, WP, HP, cx, cy);
+}
+
+void Fl_RGB_Image::generic_device_draw(int XP, int YP, int WP, int HP, int cx, int cy) {
// Don't draw an empty image...
if (!d() || !array) {
draw_empty(XP, YP);
diff --git a/src/Fl_Pixmap.cxx b/src/Fl_Pixmap.cxx
index eb030c615..0bb602e8e 100644
--- a/src/Fl_Pixmap.cxx
+++ b/src/Fl_Pixmap.cxx
@@ -74,10 +74,10 @@ void Fl_Pixmap::measure() {
}
void Fl_Pixmap::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
- if(fl_device->type() == Fl_Device::postscript_device) {
- fl_device->draw(this, XP, YP, WP, HP, cx, cy);
- return;
- }
+ fl_device->draw(this, XP, YP, WP, HP, cx, cy);
+}
+
+void Fl_Pixmap::generic_device_draw(int XP, int YP, int WP, int HP, int cx, int cy) {
// ignore empty or bad pixmap data:
if (!data()) {
draw_empty(XP, YP);