summaryrefslogtreecommitdiff
path: root/otk/rendercontrol.cc
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-02-14 19:18:19 +0000
committerDana Jansens <danakj@orodu.net>2003-02-14 19:18:19 +0000
commite3f6e0ff8195e73f2fa8c9db431941e171dd0041 (patch)
tree138b580fd1d5d831f22554e9338e1ee9fbec051b /otk/rendercontrol.cc
parent53b5c60a5e8bbf2942ef174c2db64db6cdac3e26 (diff)
make reduceDepth set the im->data member, with newly allocated data, so the pixelData in the surface isn't reduced
Diffstat (limited to 'otk/rendercontrol.cc')
-rw-r--r--otk/rendercontrol.cc12
1 files changed, 1 insertions, 11 deletions
diff --git a/otk/rendercontrol.cc b/otk/rendercontrol.cc
index 90f99632..a4de270a 100644
--- a/otk/rendercontrol.cc
+++ b/otk/rendercontrol.cc
@@ -285,12 +285,7 @@ void RenderControl::drawGradientBackground(
}
reduceDepth(sf, im);
-
- im->data = (char*) data;
-
sf.setPixmap(im);
-
- im->data = NULL;
XDestroyImage(im);
}
@@ -451,7 +446,7 @@ void RenderControl::drawImage(Surface &sf, int w, int h,
if (x < 0) x = 0;
if (y < 0) y = 0;
- // XXX SCALING!@!&*(@! to make it fit on the surface
+ // Reduce the image size if its too big to make it fit on the surface
int oldw = w, oldh = h;
unsigned long *olddata = data;
if (w > sfw) w = sfw;
@@ -507,12 +502,7 @@ void RenderControl::drawImage(Surface &sf, int w, int h,
im->byte_order = endian;
reduceDepth(sf, im);
-
- im->data = (char*) bg;
-
sf.setPixmap(im);
-
- im->data = NULL;
XDestroyImage(im);
}