Home | History | Annotate | Download | only in layout
      1 /*
      2  *   Copyright (C) 2003, International Business Machines
      3  *   Corporation and others.  All Rights Reserved.
      4  */
      5 void GDISurface::setFont(RenderingFontInstance *font)
      6 {
      7     GDIFontInstance *gFont = (GDIFontInstance *) font;
      8 
      9     if (fCurrentFont != font) {
     10         fCurrentFont = font;
     11         SelectObject(fHdc, gFont->fFont);
     12     }
     13 }
     14 
     15 void GDISurface::drawGlyphs(RenderingFontInstance *font, const LEGlyphID *glyphs, le_int32 count, const le_int32 *dx,
     16     le_int32 x, le_int32 y, le_int32 width, le_int32 height)
     17 {
     18     RECT clip;
     19 
     20     clip.top    = 0;
     21     clip.left   = 0;
     22     clip.bottom = height;
     23     clip.right  = width;
     24 
     25     setFont(font);
     26 
     27     ExtTextOut(fHdc, x, y - fAscent, ETO_CLIPPED | ETO_GLYPH_INDEX, &clip,
     28         glyphs, count, (INT *) dx);
     29 }
     30 
     31