ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/xpm.C
(Generate patch)

Comparing rxvt-unicode/src/xpm.C (file contents):
Revision 1.26 by root, Sat Dec 31 17:16:17 2005 UTC vs.
Revision 1.27 by root, Wed Jan 4 04:42:45 2006 UTC

158} 158}
159 159
160void 160void
161rxvt_term::resize_pixmap () 161rxvt_term::resize_pixmap ()
162{ 162{
163 XGCValues gcvalue; 163 XGCValues gcvalue;
164 GC gc; 164 GC gc;
165 unsigned int width = TermWin_TotalWidth ();
166 unsigned int height = TermWin_TotalHeight ();
167 dDisp; 165 dDisp;
168 166
169 if (pixmap != None) 167 if (pixmap != None)
170 XFreePixmap (disp, pixmap); 168 XFreePixmap (disp, pixmap);
171 169
172 if (bgPixmap.pixmap == None) 170 if (bgPixmap.pixmap == None)
173 { /* So be it: I'm not using pixmaps */ 171 { /* So be it: I'm not using pixmaps */
174 pixmap = None; 172 pixmap = None;
175 173
176 if (!OPTION (Opt_transparent) || !am_transparent) 174 if (!OPTION (Opt_transparent) || !am_transparent)
177 XSetWindowBackground (disp, vt, 175 XSetWindowBackground (disp, vt, pix_colors[Color_bg]);
178 pix_colors[Color_bg]);
179 176
180 return; 177 return;
181 } 178 }
182 179
183 gcvalue.foreground = pix_colors[Color_bg]; 180 gcvalue.foreground = pix_colors[Color_bg];
200 w = 0; /* tile */ 197 w = 0; /* tile */
201 198
202 if (w == 0) 199 if (w == 0)
203 { 200 {
204 /* basic X tiling - let the X server do it */ 201 /* basic X tiling - let the X server do it */
205 pixmap = XCreatePixmap (disp, vt, 202 pixmap = XCreatePixmap (disp, vt, xpmw, xpmh,
206 xpmw, xpmh,
207 (unsigned int)display->depth); 203 (unsigned int)display->depth);
208 XCopyArea (disp, bgPixmap.pixmap, pixmap, gc, 204 XCopyArea (disp, bgPixmap.pixmap, pixmap, gc,
209 0, 0, xpmw, xpmh, 0, 0); 205 0, 0, xpmw, xpmh, 0, 0);
210 } 206 }
211 else 207 else
212 { 208 {
213 float incr, p; 209 float incr, p;
214 Pixmap tmp; 210 Pixmap tmp;
215 211
216 pixmap = XCreatePixmap (disp, vt, 212 pixmap = XCreatePixmap (disp, vt, width, height,
217 width, height,
218 (unsigned int)display->depth); 213 (unsigned int)display->depth);
219 /* 214 /*
220 * horizontal scaling 215 * horizontal scaling
221 */ 216 */
222 rxvt_pixmap_incr (&w, &x, &incr, &p, width, xpmw); 217 rxvt_pixmap_incr (&w, &x, &incr, &p, width, xpmw);
223 218
224 tmp = XCreatePixmap (disp, vt, 219 tmp = XCreatePixmap (disp, vt, width, xpmh, (unsigned int)display->depth);
225 width, xpmh, (unsigned int)display->depth);
226 XFillRectangle (disp, tmp, gc, 0, 0, width, 220 XFillRectangle (disp, tmp, gc, 0, 0, width, xpmh);
227 xpmh);
228 221
229 for ( /*nil */ ; x < w; x++, p += incr) 222 for ( /*nil */ ; x < w; x++, p += incr)
230 { 223 {
231 if (p >= xpmw) 224 if (p >= xpmw)
232 p = 0; 225 p = 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines