Changeset 4157

Show
Ignore:
Timestamp:
09/03/06 18:01:41 (2 years ago)
Author:
miyoshi
Message:

(mw32_draw_glyph_string_foreground): Take account of
horizontal offsets of the glyph string. This code is moved from
xdisp.c.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/ChangeLog.Meadow

    r4156 r4157  
     12006-09-03  MIYOSHI Masanori  <miyoshi@meadowy.org> 
     2 
     3        * mw32term.c (mw32_draw_glyph_string_foreground): Take account of 
     4        horizontal offsets of the glyph string. This code is moved from 
     5        xdisp.c. 
     6 
    172006-09-02  MIYOSHI Masanori  <miyoshi@meadowy.org> 
    28 
  • trunk/src/mw32term.c

    r4156 r4157  
    16531653      char *char1b = (char *) s->char2b; 
    16541654      int charset_dim = s->two_byte_p ? 2 : 1; 
     1655      int *pdx = (int*) alloca (s->nchars * sizeof (int) * MAXBYTES1FCP); 
     1656      int *p = pdx; 
     1657      int option; 
    16551658 
    16561659      if (s->font_info->vertical_centering) 
     
    16741677          } 
    16751678 
     1679      memset (pdx, 0, (s->nchars * sizeof (int) * MAXBYTES1FCP)); 
     1680      for (i = 0; i < s->nchars; ++i) 
     1681        { 
     1682          struct glyph *g = s->first_glyph + i; 
     1683          *p = g->pixel_width; 
     1684          /* Strip off extra width of a box line */ 
     1685          if (i == 0 
     1686              && s->face->box != FACE_NO_BOX 
     1687              && s->first_glyph->left_box_line_p) 
     1688            *p -= abs (s->face->box_line_width); 
     1689          p += charset_dim; 
     1690        } 
     1691 
    16761692      /* Draw text.  If background has already been filled, don't fill 
    16771693         background.  But when drawing the cursor, always fill background 
     
    16801696      if (s->for_overlaps 
    16811697          || (s->background_filled_p && s->hl != DRAW_CURSOR)) 
    1682         { 
    1683           MW32_INVOKE_OUTPUTPROC (s->font, s->hdc, s->char2b, 
    1684                                   x, s->ybase - boff, 
    1685                                   s->nchars * charset_dim, 0, &r, 0); 
    1686         } 
     1698        option = 0; 
    16871699      else 
    1688         { 
    1689           MW32_INVOKE_OUTPUTPROC (s->font, s->hdc, s->char2b, 
    1690                                  x, s->ybase - boff
    1691                                  s->nchars * charset_dim, 0, &r, ETO_OPAQUE); 
    1692         } 
     1700        option = ETO_OPAQUE; 
     1701 
     1702      MW32_INVOKE_OUTPUTPROC (s->font, s->hdc, s->char2b
     1703                              x, s->ybase - boff, 
     1704                             s->nchars * charset_dim, pdx, &r, option); 
    16931705    } 
    16941706}