From e3f6e0ff8195e73f2fa8c9db431941e171dd0041 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 14 Feb 2003 19:18:19 +0000 Subject: make reduceDepth set the im->data member, with newly allocated data, so the pixelData in the surface isn't reduced --- otk/rendercontrol.cc | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'otk/rendercontrol.cc') 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); } -- cgit v1.2.3