summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Image.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/Image.cc b/src/Image.cc
index 9d3f044..d174953 100644
--- a/src/Image.cc
+++ b/src/Image.cc
@@ -25,7 +25,7 @@
25// stupid macros needed to access some functions in version 2 of the GNU C 25// stupid macros needed to access some functions in version 2 of the GNU C
26// library 26// library
27 27
28// $Id: Image.cc,v 1.7 2002/04/04 11:28:19 fluxgen Exp $ 28// $Id: Image.cc,v 1.8 2002/04/08 18:57:53 fluxgen Exp $
29 29
30//use GNU extensions 30//use GNU extensions
31#ifndef _GNU_SOURCE 31#ifndef _GNU_SOURCE
@@ -100,8 +100,8 @@ BImage::BImage(BImageControl *c, unsigned int w, unsigned int h) {
100 cpccpc = cpc * cpc; 100 cpccpc = cpc * cpc;
101 101
102 control->getColorTables(&red_table, &green_table, &blue_table, 102 control->getColorTables(&red_table, &green_table, &blue_table,
103 &red_offset, &green_offset, &blue_offset, 103 &red_offset, &green_offset, &blue_offset,
104 &red_bits, &green_bits, &blue_bits); 104 &red_bits, &green_bits, &blue_bits);
105 105
106 if (control->getVisual()->c_class != TrueColor) 106 if (control->getVisual()->c_class != TrueColor)
107 control->getXColorTable(&colors, &ncolors); 107 control->getXColorTable(&colors, &ncolors);
@@ -129,8 +129,8 @@ Pixmap BImage::render(BTexture *texture) {
129 129
130Pixmap BImage::render_solid(BTexture *texture) { 130Pixmap BImage::render_solid(BTexture *texture) {
131 Pixmap pixmap = XCreatePixmap(control->getBaseDisplay()->getXDisplay(), 131 Pixmap pixmap = XCreatePixmap(control->getBaseDisplay()->getXDisplay(),
132 control->getDrawable(), width, 132 control->getDrawable(), width,
133 height, control->getDepth()); 133 height, control->getDepth());
134 if (pixmap == None) { 134 if (pixmap == None) {
135 fprintf(stderr, 135 fprintf(stderr,
136 I18n::instance()->getMessage( 136 I18n::instance()->getMessage(
@@ -145,24 +145,24 @@ Pixmap BImage::render_solid(BTexture *texture) {
145 gcv.foreground = texture->getColor()->getPixel(); 145 gcv.foreground = texture->getColor()->getPixel();
146 gcv.fill_style = FillSolid; 146 gcv.fill_style = FillSolid;
147 gc = XCreateGC(control->getBaseDisplay()->getXDisplay(), pixmap, 147 gc = XCreateGC(control->getBaseDisplay()->getXDisplay(), pixmap,
148 GCForeground | GCFillStyle, &gcv); 148 GCForeground | GCFillStyle, &gcv);
149 149
150 gcv.foreground = texture->getHiColor()->getPixel(); 150 gcv.foreground = texture->getHiColor()->getPixel();
151 hgc = XCreateGC(control->getBaseDisplay()->getXDisplay(), pixmap, 151 hgc = XCreateGC(control->getBaseDisplay()->getXDisplay(), pixmap,
152 GCForeground, &gcv); 152 GCForeground, &gcv);
153 153
154 gcv.foreground = texture->getLoColor()->getPixel(); 154 gcv.foreground = texture->getLoColor()->getPixel();
155 lgc = XCreateGC(control->getBaseDisplay()->getXDisplay(), pixmap, 155 lgc = XCreateGC(control->getBaseDisplay()->getXDisplay(), pixmap,
156 GCForeground, &gcv); 156 GCForeground, &gcv);
157 157
158 XFillRectangle(control->getBaseDisplay()->getXDisplay(), pixmap, gc, 0, 0, 158 XFillRectangle(control->getBaseDisplay()->getXDisplay(), pixmap, gc, 0, 0,
159 width, height); 159 width, height);
160 160
161#ifdef INTERLACE 161#ifdef INTERLACE
162 if (texture->getTexture() & BImage::INTERLACED) { 162 if (texture->getTexture() & BImage::INTERLACED) {
163 gcv.foreground = texture->getColorTo()->getPixel(); 163 gcv.foreground = texture->getColorTo()->getPixel();
164 GC igc = XCreateGC(control->getBaseDisplay()->getXDisplay(), pixmap, 164 GC igc = XCreateGC(control->getBaseDisplay()->getXDisplay(), pixmap,
165 GCForeground, &gcv); 165 GCForeground, &gcv);
166 166
167 register unsigned int i = 0; 167 register unsigned int i = 0;
168 for (; i < height; i += 2) 168 for (; i < height; i += 2)