home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / x / xibm.zip / mpel / mpelText.c < prev    next >
C/C++ Source or Header  |  1991-09-17  |  16KB  |  545 lines

  1. /*******************************************************************
  2. Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
  3. and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
  4.  
  5.                         All Rights Reserved
  6.  
  7. Permission to use, copy, modify, and distribute this software and its 
  8. documentation for any purpose and without fee is hereby granted, 
  9. provided that the above copyright notice appear in all copies and that
  10. both that copyright notice and this permission notice appear in 
  11. supporting documentation, and that the names of Digital or MIT not be
  12. used in advertising or publicity pertaining to distribution of the
  13. software without specific, written prior permission.  
  14.  
  15. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  16. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  17. DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  18. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  19. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  20. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  21. SOFTWARE.
  22.  
  23. ************************************************************************/
  24. /***********************************************************
  25.         Copyright IBM Corporation 1987,1988
  26.  
  27.                       All Rights Reserved
  28.  
  29. Permission to use, copy, modify, and distribute this software and its 
  30. documentation for any purpose and without fee is hereby granted, 
  31. provided that the above copyright notice appear in all copies and that
  32. both that copyright notice and this permission notice appear in 
  33. supporting documentation, and that the name of IBM not be
  34. used in advertising or publicity pertaining to distribution of the
  35. software without specific, written prior permission.  
  36.  
  37. IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  38. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  39. IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  40. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  41. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  42. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  43. SOFTWARE.
  44.  
  45. ******************************************************************/
  46.  
  47. /* $Header: mpelText.c,v 1.2 89/12/07 20:35:03 keith Exp $ */
  48. /* $Source: /xsrc/mit/server/ddx/ibm/mpel/RCS/mpelText.c,v $ */
  49.  
  50. #ifndef lint
  51. static char *rcsid = "$Header: mpelText.c,v 1.2 89/12/07 20:35:03 keith Exp $" ;
  52. #endif
  53.  
  54. #include    "X.h"
  55. #include    "Xmd.h"
  56. #include    "Xproto.h"
  57. #include    "misc.h"
  58. #include    "dixfontstr.h"
  59. #include    "gcstruct.h"
  60. #include    "windowstr.h"
  61. #include    "scrnintstr.h"
  62. #include    "pixmapstr.h"
  63. #include    "regionstr.h"
  64.  
  65. #include     "OScompiler.h"
  66.  
  67. #include    "ibmScreen.h"
  68.  
  69. #include    "ppc.h"
  70. #include    "ppcProcs.h"
  71.  
  72. #include    "mpel.h"
  73. #include    "mpelHdwr.h"
  74. #include    "mpelFifo.h"
  75. #include    "mpelFont.h"
  76.  
  77. #include    "ibmTrace.h"
  78.  
  79. /* Cursor Stuff */
  80. extern int mpelcursorSemaphore ;
  81. extern int mpelCheckCursor() ;
  82. extern void mpelReplaceCursor() ;
  83.  
  84. /***==================================================================***/
  85.  
  86. typedef struct {
  87.     void        (*bltfun)();
  88.     DrawablePtr    pDraw;
  89.     GC        *pGC;
  90.     int         baseline;
  91. } glyphBltData ;
  92.  
  93. #define    callGlyphBlt(g,x,n,ppci) \
  94.      ((*(g)->bltfun)((g)->pDraw,(g)->pGC,(x),\
  95.         (g)->baseline-((g)->pDraw)->y,(n),\
  96.         (ppci),0))
  97.  
  98. /* text requests are broken in to MAX_CHARS_PER_CALL chunks for output */
  99. #define MAX_CHARS_PER_CALL 80
  100.  
  101. static int
  102. mpelClipString(gblt,pbox,n,charinfo,brect,txt)
  103.     glyphBltData    *gblt ;
  104.     BoxPtr         pbox ;
  105.     int             n ;
  106.     CharInfoPtr        *charinfo ;
  107.     xRectangle        *brect ;
  108.     mpelAnnotationText    *txt ;
  109. {
  110.     int            x,end,start,i,xCoord ;
  111.  
  112.     TRACE(("mpelClipString(...)\n")) ;
  113.  
  114.     /*
  115.      * Don't even try to deal with characters clipped horizontally,
  116.      * just call GlyphBlt to deal with it.
  117.      */
  118.     if ((pbox->y1>(brect->y))||(pbox->y2<(brect->y+brect->height+1))) {
  119.     xCoord= txt->point.x-(gblt->pDraw)->x ;
  120.     callGlyphBlt(gblt,xCoord,n,charinfo) ;
  121.     return FALSE ;
  122.     }
  123.  
  124.     /*
  125.      * Find first unclipped character in txt 
  126.      * (left edge of character >= pbox->x1)
  127.      * We know we're dealing with fixed width fonts, so at most
  128.      * one character is partially clipped.  Draw partially clipped
  129.      * character with GlyphBlt, and note new starting x in txt.
  130.      */
  131.     i= 0 ;
  132.     x= txt->point.x ;
  133.     while ((i<n)&&(x<pbox->x1)) {
  134.     x+= charinfo[i]->metrics.characterWidth ;
  135.     i++ ;
  136.     } 
  137.     if ( i > 0 ) { /* Some characters clipped out */
  138.     xCoord = x - charinfo[i-1]->metrics.characterWidth ;
  139.     xCoord -= (  gblt->pDraw )->x ;
  140.     callGlyphBlt( gblt, xCoord, 1, &charinfo[i-1] ) ;
  141.     txt->point.x = x ;
  142.     brect->width -=    x - brect->x ;
  143.     brect->x = x ;
  144.     }
  145.     start = i ;
  146.  
  147.     /*
  148.      * Find first clipped character in (adjusted) txt
  149.      * (right edge of character >= pbox->x2
  150.      * Draw partially clipped character (at most 1) with
  151.      * glyphBlt, and note the new length of txt.
  152.      */
  153.     while ( ( i < n )
  154.      && ( x + charinfo[i]->metrics.characterWidth < pbox->x2 ) ) {
  155.     x += charinfo[i]->metrics.characterWidth ;
  156.     i++ ;
  157.     } 
  158.     if ( i < n ) { /* Didn't reach the end of the string, last char clipped */
  159.     brect->width = x - brect->x ;
  160.     xCoord = x - ( gblt->pDraw )->x ;
  161.     callGlyphBlt( gblt, xCoord, 1, &charinfo[i]);
  162.     }
  163.     end = i ;
  164.  
  165.     /*
  166.      * fix up txt to contain only unclipped characters
  167.      */
  168.     if ( !( txt->length = end - start ) ) /* no unclipped characters */
  169.     return FALSE ;
  170.  
  171.     /*
  172.      * fix up string
  173.      */
  174.     for ( i = 0 ; i < txt->length ; i++ )
  175.     txt->string[ i ] = txt->string[ start + i ] ;
  176.  
  177.     /*
  178.      * fix up background rectangle
  179.      */
  180.     brect->x = MAX( pbox->x1, brect->x ) ;
  181.     brect->y = MAX( pbox->y1, brect->y ) ;
  182.     brect->width = MIN( brect->x + brect->width, pbox->x2 ) - brect->x ;
  183.     brect->height= MIN( brect->y + brect->height, pbox->y2 ) - brect->y ;
  184.     return TRUE ;
  185. }
  186.  
  187. /***==================================================================***/
  188.  
  189. int
  190. mpelImageText( pDraw, pGC, x, y, count, chars, fontEncoding )
  191.     DrawablePtr      pDraw ;
  192.     GCPtr         pGC ;
  193.     int             x, y ;
  194.     int             count ;
  195.     char        *chars ;
  196.     FontEncoding     fontEncoding ;
  197. {
  198.     int cursor_saved ;
  199.     glyphBltData     gblt ;
  200.     CharInfoPtr        *charinfo ;
  201.     unsigned int     n ;
  202.     FontPtr          font = pGC->font ;
  203.     ExtentInfoRec     info ;
  204.     int          i,nbox ;
  205.     BoxPtr          pbox ;
  206.     RegionPtr          pRegion ;
  207.     xRectangle         backrect,tmpBackrect ;
  208.     BoxRec          bbox ;
  209.     int             allIn= FALSE ;
  210.     mpelXFont         *xFont ;
  211.     mpelRectangle     *brect,wholeBrect,partBrect ;
  212.     mpelAnnotationText    *txt,wholeTxt,partTxt ;
  213.     int             ht ;
  214.     char         wholeStr[MAX_CHARS_PER_CALL] ;
  215.     char         partStr[MAX_CHARS_PER_CALL] ;
  216.     int            bot_edge;    /* Does bottom edge of screen clip ? */
  217.  
  218.     TRACE(("mpelImageText( 0x%x, 0x%x, (%d,%d), %d, 0x%x)\n", pDraw, pGC, x, y, count, chars,fontEncoding)) ;
  219.  
  220.     /*
  221.      * if not a window, not cached, or merge mode not copy, the
  222.      * hardware can't help us.
  223.      * (I guess we *could* write an glyph blt that uses blt and
  224.      *  the character as stored on the adapter....)
  225.      */
  226.     xFont = (mpelXFont *)FontGetPrivate(font,mpelFontPrivateIndex);
  227.  
  228.     if (xFont == NULL || pDraw->type != DRAWABLE_WINDOW
  229.     || pGC->alu != GXcopy || pGC->planemask == 0)
  230.     return miImageText( pDraw, pGC, x, y, count, chars, fontEncoding ) ;
  231.  
  232.     while ( count > MAX_CHARS_PER_CALL ) { /* Hardware Limit ??? */
  233.     x= mpelImageText(pDraw,pGC,x,y,MAX_CHARS_PER_CALL,chars,fontEncoding) ;
  234.     count -= MAX_CHARS_PER_CALL ;
  235.     chars += MAX_CHARS_PER_CALL ;
  236.     }
  237.  
  238.     x += pDraw->x ;
  239.     y += pDraw->y ;
  240.  
  241.     if (!(charinfo = (CharInfoPtr *)ALLOCATE_LOCAL(count*sizeof(CharInfoPtr))))
  242.     return x ;
  243.  
  244.     (*font->get_glyphs)(font, count, chars, fontEncoding, &n, charinfo);
  245.     if ((count = n) == 0) {
  246.     DEALLOCATE_LOCAL(charinfo);
  247.     return x;
  248.     }
  249.     QueryGlyphExtents(font, charinfo, count, &info);
  250.  
  251.     if (ibmScreenState(pDraw->pScreen->myNum)!=SCREEN_ACTIVE)
  252.     return x+info.overallWidth ;
  253.  
  254.     backrect.x =    x + info.overallLeft ;
  255.     backrect.y =    y - font->info.fontAscent ;
  256.     backrect.width =    MAX( info.overallWidth,
  257.                  info.overallRight - info.overallLeft ) ;
  258.     backrect.height =    font->info.fontAscent + font->info.fontDescent;
  259.  
  260.     bbox.x1 = x + info.overallLeft ;
  261.     bbox.x2 = x + info.overallRight ;
  262.     bbox.y1 = y - info.overallAscent ;
  263.     bbox.y2 = y + info.overallDescent ;
  264.  
  265.     pRegion = ( (ppcPrivGC *) (pGC->devPrivates[mfbGCPrivateIndex].ptr) )->pCompositeClip ;
  266.     nbox = REGION_NUM_RECTS(pRegion) ;
  267.     if ( nbox == 0 ) 
  268.     return x+info.overallWidth ;
  269.     pbox = REGION_RECTS(pRegion) ;
  270.  
  271.     /* If Cursor Is In The Way Remove It */
  272.     cursor_saved = !mpelcursorSemaphore &&
  273.            ( mpelCheckCursor(    bbox.x1, bbox.y1, 
  274.                     bbox.x2-bbox.x1+1, bbox.y2-bbox.y1+1)||
  275.                  mpelCheckCursor(   backrect.x,backrect.y,
  276.                     backrect.width,backrect.height) ) ;
  277.  
  278.     MPELSetPgonInteriorColor( pGC->bgPixel ) ;
  279.     MPELSetTextColor( pGC->fgPixel ) ;
  280.     MPELSetTextFont( xFont->mpelId ) ;
  281.     mpelSetPlaneMask( pGC->planemask ) ;
  282.  
  283.     mpelRemap(xFont, n, chars, wholeStr, charinfo, fontEncoding);
  284.  
  285.     wholeBrect.uright.x =    backrect.x + backrect.width - 1 ;
  286.     wholeBrect.uright.y =    MPEL_HEIGHT - 1 - backrect.y ;
  287.     wholeBrect.lleft.x =    backrect.x ;
  288.     wholeBrect.lleft.y =    MPEL_HEIGHT - ( backrect.y + backrect.height ) ;
  289.  
  290.     ht = ( ( ( fontHeight( xFont ) + 3 ) / 4 ) * 4 ) - fontHeight( xFont ) ;
  291.     wholeTxt.point.x =    x ;
  292.     bot_edge = ((wholeTxt.point.y = MPEL_HEIGHT - y - font->info.fontDescent - ht) < 0);
  293.     wholeTxt.reserved =    0 ;
  294.     wholeTxt.length =    n ;
  295.     wholeTxt.string =    wholeStr ;
  296.  
  297.     setFontDimensions( xFont ) ;
  298.  
  299.     if(bot_edge)
  300.       {
  301.     TRACE(("Bottom edge effects in mpelImageText (ht = %d).\n", ht));
  302.     backrect.height += ht;
  303.     bbox.y2 += ht;
  304.       }
  305.  
  306.     for ( i = 0 ; ( i < nbox ) && !allIn ; i++, pbox++ ) {
  307.     switch ( mpelRectIntersect( pbox, &bbox ) ) {
  308.         case rgnOUT:
  309.         continue ;
  310.         case rgnPART:
  311.         MOVE( &backrect, &tmpBackrect, sizeof backrect ) ;
  312.         MOVE( &wholeTxt, &partTxt, sizeof wholeTxt ) ;
  313.         MOVE( wholeStr, partStr, count) ;
  314.         partTxt.string= partStr ;
  315.         gblt.bltfun=    ppcImageGlyphBlt ;
  316.         gblt.pDraw=    pDraw ;
  317.         gblt.pGC=    pGC ;
  318.         gblt.baseline=    y ;
  319.         if ( !mpelClipString( &gblt, pbox, n, charinfo,
  320.                       &tmpBackrect, &partTxt ) )
  321.             continue ;
  322.         else {
  323.             partBrect.uright.x = tmpBackrect.x + tmpBackrect.width - 1 ;
  324.             partBrect.uright.y = MPEL_HEIGHT - 1 - tmpBackrect.y ;
  325.             partBrect.lleft.x = tmpBackrect.x ;
  326.             partBrect.lleft.y = MPEL_HEIGHT
  327.                       - ( tmpBackrect.y + tmpBackrect.height ) ;
  328.             brect = &partBrect ;
  329.             txt = &partTxt ;
  330.         }
  331.         break ;
  332.         case rgnIN:
  333.         allIn = TRUE ;
  334.         brect = &wholeBrect ;
  335.         txt =    &wholeTxt ;
  336.         break ;
  337.     }
  338.     mpelSetALU( GXcopy ) ;
  339.     MPELFillRectangle( brect ) ;
  340.     mpelSetALU( pGC->alu ) ;
  341.     MPELAnnotationText( txt->length, txt ) ;
  342.     MPELSendData( txt->length, txt->string ) ;
  343.     }
  344.  
  345.     DEALLOCATE_LOCAL( charinfo ) ;
  346.     if ( cursor_saved )
  347.     mpelReplaceCursor() ;
  348.  
  349.     return bbox.x2 - pDraw->x ;
  350. }
  351.  
  352. /***==================================================================***/
  353.  
  354. int
  355. mpelPolyText( pDraw, pGC, x, y, count, chars, fontEncoding )
  356.     DrawablePtr     pDraw ;
  357.     GCPtr        pGC ;
  358.     int            x, y ;
  359.     int            count ;
  360.     char        *chars ;
  361.     FontEncoding     fontEncoding ;
  362. {
  363.     int cursor_saved ;
  364.     glyphBltData     gblt ;
  365.     CharInfoPtr        *charinfo ;
  366.     unsigned int     n ;
  367.     FontPtr          font = pGC->font ;
  368.     ExtentInfoRec     info ;
  369.     int          i,nbox,xOffset ;
  370.     BoxPtr          pbox ;
  371.     RegionPtr          pRegion ;
  372.     BoxRec          bbox ;
  373.     xRectangle         bRect ;
  374.     int             allIn= FALSE ;
  375.     mpelXFont         *xFont ;
  376.     mpelAnnotationText    *txt,wholeTxt,partTxt ;
  377.     int            ht ;
  378.     char        wholeStr[MAX_CHARS_PER_CALL] ;
  379.     char        partStr[MAX_CHARS_PER_CALL] ;
  380.  
  381.     TRACE(("mpelPolyText( 0x%x, 0x%x, (%d,%d), %d, 0x%x, 0x%x)\n", pDraw, pGC, x, y, count, chars, fontEncoding)) ;
  382.  
  383.     xFont = (mpelXFont *)FontGetPrivate(font,mpelFontPrivateIndex);
  384.  
  385.     if (xFont == 0 || pDraw->type!=DRAWABLE_WINDOW || pGC->alu != GXcopy ||
  386.     pGC->planemask == 0 || pGC->fillStyle != FillSolid)
  387.     return miPolyText(pDraw, pGC, x, y, count, chars, fontEncoding);
  388.  
  389.     while (count > MAX_CHARS_PER_CALL) { /* Hardware Limit ??? */
  390.     x = mpelPolyText(pDraw,pGC,x,y,MAX_CHARS_PER_CALL,chars,fontEncoding);
  391.     count -= MAX_CHARS_PER_CALL;
  392.     chars += MAX_CHARS_PER_CALL;
  393.     }
  394.  
  395.     x += (xOffset=pDraw->x);
  396.     y += pDraw->y;
  397.  
  398.     if(!(charinfo = (CharInfoPtr *)ALLOCATE_LOCAL(count*sizeof(CharInfoPtr))))
  399.     return x-xOffset ;
  400.  
  401.     (*font->get_glyphs)(font, count, chars, fontEncoding, &n, charinfo);
  402.     QueryGlyphExtents(font, charinfo, count, &info);
  403.  
  404.     if ((count=n) == 0)
  405.     return x-xOffset ;
  406.  
  407.     if (ibmScreenState(pDraw->pScreen->myNum)!=SCREEN_ACTIVE) {
  408.     return x+info.overallWidth-xOffset ;
  409.     }
  410.  
  411.     bbox.x1 = x + info.overallLeft;
  412.     bbox.x2 = x + info.overallRight;
  413.     bbox.y1 = y - info.overallAscent;
  414.     bbox.y2 = y + info.overallDescent;
  415.  
  416.  
  417.     pRegion = ((ppcPrivGC *)(pGC->devPrivates[mfbGCPrivateIndex].ptr))->pCompositeClip ;
  418.     nbox = REGION_NUM_RECTS(pRegion);
  419.     if ( nbox == 0 )
  420.     return x+info.overallWidth-xOffset;
  421.  
  422.     pbox = REGION_RECTS(pRegion);
  423.  
  424.     /* If Cursor Is In The Way Remove It */
  425.     cursor_saved = !mpelcursorSemaphore && mpelCheckCursor(bbox.x1, bbox.y1,
  426.                                bbox.x2-bbox.x1+1,
  427.                                bbox.y2-bbox.y1+1);
  428.  
  429.     MPELSetTextColor( pGC->fgPixel ) ;
  430.     MPELSetTextFont(xFont->mpelId) ;
  431.     mpelSetALU(pGC->alu) ;
  432.     mpelSetPlaneMask(pGC->planemask) ;
  433.  
  434.     mpelRemap(xFont,n,chars,wholeStr,charinfo, fontEncoding);
  435.  
  436.     ht= (((fontHeight(xFont)+3)/4)*4)-fontHeight(xFont) ;
  437.     wholeTxt.point.x=    x ;
  438.     wholeTxt.point.y=    (1023-y)-font->info.fontDescent-ht+1 ;
  439.     wholeTxt.reserved=    0 ;
  440.     wholeTxt.length=    n ;
  441.     wholeTxt.string=    wholeStr ;
  442.  
  443.     setFontDimensions(xFont) ;
  444.  
  445.     for (i=0 ;(i<nbox)&&(!allIn) ;i++,pbox++) {
  446.     switch (mpelRectIntersect(pbox,&bbox)) {
  447.         case rgnOUT:
  448.         continue ;
  449.         case rgnPART:
  450.         bRect.x= bbox.x1 ; bRect.y= bbox.y1 ;
  451.         bRect.width= bbox.x2-bbox.x1-1 ;
  452.         bRect.height= bbox.y2-bbox.y1-1 ;
  453.         MOVE( &wholeTxt, &partTxt, sizeof wholeTxt ) ;
  454.         MOVE( wholeStr, partTxt.string = partStr, n ) ;
  455.         gblt.bltfun=    ppcPolyGlyphBlt ;
  456.         gblt.pDraw=    pDraw ;
  457.         gblt.pGC=    pGC ;
  458.         gblt.baseline=    y ;
  459.         if (!mpelClipString(&gblt,pbox,n,charinfo,&bRect,&partTxt))
  460.             continue ;
  461.         else 
  462.             txt= &partTxt ;
  463.         break ;
  464.         case rgnIN:
  465.         allIn=     TRUE ;
  466.         txt=    &wholeTxt ;
  467.         break ;
  468.     }
  469.     MPELAnnotationText(txt->length,txt) ;
  470.     MPELSendData(txt->length,txt->string) ;
  471.     }
  472.     DEALLOCATE_LOCAL(charinfo) ;
  473.     if ( cursor_saved )
  474.     mpelReplaceCursor() ;
  475.  
  476.     return x+info.overallWidth-xOffset ;
  477. }
  478.  
  479. /***====================================================================***/
  480.  
  481. int
  482. mpelPolyText8( pDraw, pGC, x, y, count, chars )
  483. DrawablePtr      pDraw ;
  484. GCPtr         pGC ;
  485. int         x, y ;
  486. int         count ;
  487. char        *chars ;
  488. {
  489.     TRACE(("mpelPolyText8( 0x%x, 0x%x, (%d,%d), %d, 0x%x )\n",
  490.     pDraw,pGC,x,y,count,chars)) ;
  491.     return mpelPolyText( pDraw, pGC, x, y, count, chars,  Linear8Bit ) ;
  492. }
  493.  
  494. /***====================================================================***/
  495.  
  496. int
  497. mpelPolyText16( pDraw, pGC, x, y, count, chars )
  498. DrawablePtr      pDraw ;
  499. GCPtr         pGC ;
  500. int         x, y ;
  501. int         count ;
  502. char        *chars ;
  503. {
  504.     TRACE(("mpelPolyText16( 0x%x, 0x%x, (%d,%d), %d, 0x%x )\n",
  505.     pDraw,pGC,x,y,count,chars)) ;
  506.     return mpelPolyText( pDraw, pGC, x, y, count, chars,
  507.              ( pGC->font->info.lastRow )
  508.              ? TwoD16Bit : Linear16Bit ) ;
  509. }
  510.  
  511. /***====================================================================***/
  512.  
  513. void
  514. mpelImageText8( pDraw, pGC, x, y, count, chars )
  515. DrawablePtr      pDraw ;
  516. GCPtr         pGC ;
  517. int         x, y ;
  518. int         count ;
  519. char        *chars ;
  520. {
  521.     TRACE(("mpelImageText8( 0x%x, 0x%x, (%d,%d), %d, 0x%x )\n",
  522.     pDraw,pGC,x,y,count,chars)) ;
  523.     mpelImageText( pDraw, pGC, x, y, count, chars,  Linear8Bit ) ;
  524.     return ;
  525. }
  526.  
  527. /***====================================================================***/
  528.  
  529. void
  530. mpelImageText16( pDraw, pGC, x, y, count, chars )
  531. DrawablePtr      pDraw ;
  532. GCPtr         pGC ;
  533. int         x, y ;
  534. int         count ;
  535. char        *chars ;
  536. {
  537.     TRACE(("mpelImageText16( 0x%x, 0x%x, (%d,%d), %d, 0x%x )\n",
  538.     pDraw,pGC,x,y,count,chars)) ;
  539.  
  540.     mpelImageText( pDraw, pGC, x, y, count, chars,
  541.            ( pGC->font->info.lastRow )
  542.            ? TwoD16Bit : Linear16Bit ) ;
  543.     return ;
  544. }
  545.