Delphi 2.0 needs to allocate a bitmap bigger than 4096 bits wide.
[wine/multimedia.git] / graphics / metafiledrv / text.c
blob1a8617a2f69c961a5c51e5e93afd9ef65a2aded4
1 /*
2 * metafile driver text functions
4 * Copyright 1993, 1994 Alexandre Julliard
6 */
8 #include <stdlib.h>
9 #include "windows.h"
10 #include "dc.h"
11 #include "gdi.h"
12 #include "callback.h"
13 #include "heap.h"
14 #include "metafile.h"
15 #include "metafiledrv.h"
16 #include "debug.h"
17 #include "xmalloc.h"
20 /***********************************************************************
21 * MFDRV_ExtTextOut
23 BOOL32
24 MFDRV_ExtTextOut( DC *dc, INT32 x, INT32 y, UINT32 flags,
25 const RECT32 *lprect, LPCSTR str, UINT32 count,
26 const INT32 *lpDx )
28 RECT16 rect16;
29 LPINT16 lpdx16 = lpDx?(LPINT16)xmalloc(sizeof(INT16)*count):NULL;
30 BOOL32 ret;
31 int i;
33 if (lprect) CONV_RECT32TO16(lprect,&rect16);
34 if (lpdx16) for (i=count;i--;) lpdx16[i]=lpDx[i];
35 ret=MF_ExtTextOut(dc,x,y,flags,lprect?&rect16:NULL,str,count,lpdx16);
36 if (lpdx16) free(lpdx16);
37 return ret;