comparison src/redisplay-msw.c @ 388:aabb7f5b1c81 r21-2-9

Import from CVS: tag r21-2-9
author cvs
date Mon, 13 Aug 2007 11:09:42 +0200
parents bbff43aa5eb7
children 74fd4e045ea6
comparison
equal deleted inserted replaced
387:f892a9d0bb8d 388:aabb7f5b1c81
308 RECT rect = { rb->xpos, dl->ypos-dl->ascent, 308 RECT rect = { rb->xpos, dl->ypos-dl->ascent,
309 rb->xpos+rb->width, dl->ypos+dl->descent-dl->clip }; 309 rb->xpos+rb->width, dl->ypos+dl->descent-dl->clip };
310 struct face_cachel *cachel = WINDOW_FACE_CACHEL (w, rb->findex); 310 struct face_cachel *cachel = WINDOW_FACE_CACHEL (w, rb->findex);
311 311
312 Lisp_Object bg_pmap = WINDOW_FACE_CACHEL_BACKGROUND_PIXMAP (w, rb->findex); 312 Lisp_Object bg_pmap = WINDOW_FACE_CACHEL_BACKGROUND_PIXMAP (w, rb->findex);
313 313
314 if (!IMAGE_INSTANCEP (bg_pmap) 314 if (!IMAGE_INSTANCEP (bg_pmap)
315 || !IMAGE_INSTANCE_PIXMAP_TYPE_P (XIMAGE_INSTANCE (bg_pmap))) 315 || !IMAGE_INSTANCE_PIXMAP_TYPE_P (XIMAGE_INSTANCE (bg_pmap)))
316 bg_pmap = Qnil; 316 bg_pmap = Qnil;
317 317
318 if (!NILP(bg_pmap)) 318 if (!NILP(bg_pmap))
500 return; 500 return;
501 501
502 xpos -= xoffset; 502 xpos -= xoffset;
503 503
504 /* sort out the destination rectangle */ 504 /* sort out the destination rectangle */
505 height = dl->ascent + dl->descent - dl->clip; 505 height = DISPLAY_LINE_HEIGHT (dl);
506 rect.left = clip_start; 506 rect.left = clip_start;
507 rect.top = dl->ypos - dl->ascent; 507 rect.top = dl->ypos - dl->ascent;
508 rect.right = clip_end; 508 rect.right = clip_end;
509 rect.bottom = height + dl->ypos - dl->ascent; 509 rect.bottom = height + dl->ypos - dl->ascent;
510 510
589 HGDIOBJ old=NULL; 589 HGDIOBJ old=NULL;
590 COLORREF bgcolor = GetBkColor (hdc); 590 COLORREF bgcolor = GetBkColor (hdc);
591 int need_clipping = (clip_x || clip_y); 591 int need_clipping = (clip_x || clip_y);
592 int yoffset=0; 592 int yoffset=0;
593 int xoffset=0; 593 int xoffset=0;
594
594 /* do we need to offset the pixmap vertically? this is necessary 595 /* do we need to offset the pixmap vertically? this is necessary
595 for background pixmaps. */ 596 for background pixmaps. */
596 if (offset_bitmap) 597 if (offset_bitmap)
597 { 598 {
598 yoffset = y % IMAGE_INSTANCE_PIXMAP_HEIGHT (p); 599 yoffset = y % IMAGE_INSTANCE_PIXMAP_HEIGHT (p);
711 HDC hdc = FRAME_MSWINDOWS_DC (f); 712 HDC hdc = FRAME_MSWINDOWS_DC (f);
712 713
713 struct Lisp_Image_Instance *p = XIMAGE_INSTANCE (image_instance); 714 struct Lisp_Image_Instance *p = XIMAGE_INSTANCE (image_instance);
714 Lisp_Object window; 715 Lisp_Object window;
715 716
716 int lheight = dl->ascent + dl->descent - dl->clip; 717 int lheight = DISPLAY_LINE_HEIGHT (dl);
717 int pheight = ((int) IMAGE_INSTANCE_PIXMAP_HEIGHT (p) > lheight ? lheight : 718 int pheight = ((int) IMAGE_INSTANCE_PIXMAP_HEIGHT (p) > lheight ? lheight :
718 IMAGE_INSTANCE_PIXMAP_HEIGHT (p)); 719 IMAGE_INSTANCE_PIXMAP_HEIGHT (p));
719 int clip_x, clip_y, clip_width, clip_height; 720 int clip_x, clip_y, clip_width, clip_height;
720 721
721 /* The pixmap_offset is used to center the pixmap on lines which are 722 /* The pixmap_offset is used to center the pixmap on lines which are
1175 elt++; 1176 elt++;
1176 } 1177 }
1177 else if (rb->object.chr.ch == '\n') 1178 else if (rb->object.chr.ch == '\n')
1178 { 1179 {
1179 /* Clear in case a cursor was formerly here. */ 1180 /* Clear in case a cursor was formerly here. */
1180 int height = dl->ascent + dl->descent - dl->clip; 1181 int height = DISPLAY_LINE_HEIGHT (dl);
1181 1182
1182 redisplay_clear_region (window, findex, xpos, dl->ypos - dl->ascent, 1183 redisplay_clear_region (window, findex, xpos, dl->ypos - dl->ascent,
1183 rb->width, height); 1184 rb->width, height);
1184 elt++; 1185 elt++;
1185 } 1186 }