Mercurial > emacs
comparison src/w32term.c @ 34229:54b8aa09c4a9
(expose_area): Complete last change.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Tue, 05 Dec 2000 22:42:49 +0000 |
parents | 7e09cff3b2ab |
children | 0322014fcf27 |
comparison
equal
deleted
inserted
replaced
34228:ba5ae95b5888 | 34229:54b8aa09c4a9 |
---|---|
5499 struct window *w; | 5499 struct window *w; |
5500 struct glyph_row *row; | 5500 struct glyph_row *row; |
5501 RECT *r; | 5501 RECT *r; |
5502 enum glyph_row_area area; | 5502 enum glyph_row_area area; |
5503 { | 5503 { |
5504 int x; | |
5505 struct glyph *first = row->glyphs[area]; | 5504 struct glyph *first = row->glyphs[area]; |
5506 struct glyph *end = row->glyphs[area] + row->used[area]; | 5505 struct glyph *end = row->glyphs[area] + row->used[area]; |
5507 struct glyph *last; | 5506 struct glyph *last; |
5508 int first_x; | 5507 int first_x, start_x, x; |
5509 | 5508 |
5510 /* Set x to the window-relative start position for drawing glyphs of | 5509 /* Set x to the window-relative start position for drawing glyphs of |
5511 AREA. The first glyph of the text area can be partially visible. | 5510 AREA. The first glyph of the text area can be partially visible. |
5512 The first glyphs of other areas cannot. */ | 5511 The first glyphs of other areas cannot. */ |
5513 if (area == LEFT_MARGIN_AREA) | 5512 if (area == LEFT_MARGIN_AREA) |
5524 0, row->used[area], | 5523 0, row->used[area], |
5525 row->inverse_p ? DRAW_INVERSE_VIDEO : DRAW_NORMAL_TEXT, | 5524 row->inverse_p ? DRAW_INVERSE_VIDEO : DRAW_NORMAL_TEXT, |
5526 NULL, NULL, 0); | 5525 NULL, NULL, 0); |
5527 else | 5526 else |
5528 { | 5527 { |
5528 /* Set START_X to the window-relative start position for drawing glyphs of | |
5529 AREA. The first glyph of the text area can be partially visible. | |
5530 The first glyphs of other areas cannot. */ | |
5531 if (area == LEFT_MARGIN_AREA) | |
5532 start_x = 0; | |
5533 else if (area == TEXT_AREA) | |
5534 start_x = row->x + window_box_width (w, LEFT_MARGIN_AREA); | |
5535 else | |
5536 start_x = (window_box_width (w, LEFT_MARGIN_AREA) | |
5537 + window_box_width (w, TEXT_AREA)); | |
5538 x = start_x; | |
5539 | |
5529 /* Find the first glyph that must be redrawn. */ | 5540 /* Find the first glyph that must be redrawn. */ |
5530 while (first < end | 5541 while (first < end |
5531 && x + first->pixel_width < r->left) | 5542 && x + first->pixel_width < r->left) |
5532 { | 5543 { |
5533 x += first->pixel_width; | 5544 x += first->pixel_width; |
5541 && x < r->right) | 5552 && x < r->right) |
5542 { | 5553 { |
5543 x += last->pixel_width; | 5554 x += last->pixel_width; |
5544 ++last; | 5555 ++last; |
5545 } | 5556 } |
5546 | 5557 |
5547 /* Repaint. */ | 5558 /* Repaint. */ |
5548 if (last > first) | 5559 if (last > first) |
5549 x_draw_glyphs (w, first_x - start_x, row, area, | 5560 x_draw_glyphs (w, first_x - start_x, row, area, |
5550 first - row->glyphs[area], | 5561 first - row->glyphs[area], |
5551 last - row->glyphs[area], | 5562 last - row->glyphs[area], |