summaryrefslogtreecommitdiff
path: root/src/drivers/GDI
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/GDI')
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx
index f750e1785..070c65568 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx
@@ -106,6 +106,8 @@ static void monodither(uchar* to, const uchar* from, int w, int delta) {
#endif // USE_COLORMAP
+static int fl_abs(int v) { return v<0 ? -v : v; }
+
static void innards(const uchar *buf, int X, int Y, int W, int H,
int delta, int linedelta, int depth,
Fl_Draw_Image_Cb cb, void* userdata, HDC gc)
@@ -120,7 +122,7 @@ static void innards(const uchar *buf, int X, int Y, int W, int H,
if (indexed || !fl_can_do_alpha_blending())
depth = (depth-1)|1;
- if (!linedelta) linedelta = W*delta;
+ if (!linedelta) linedelta = W*fl_abs(delta);
int x, y, w, h;
fl_clip_box(X,Y,W,H,x,y,w,h);
@@ -281,8 +283,6 @@ 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_GDI_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;