blob: 57eae978c36cf6ebbde445bdf86ed0d47635d77f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
/**
* Base test for gdImageString16()
*/
#include <gd.h>
#include <gdfontl.h>
#include "gdtest.h"
int main()
{
/* Declare the image */
gdImagePtr im = NULL;
wchar_t *wchr = L"H";
unsigned short *sptr;
sptr = (unsigned short *)wchr;
int foreground;
int errorcode = 0;
gdFontPtr fontptr = gdFontGetLarge();
im = gdImageCreate(20, 20);
gdImageColorAllocate(im, 255, 255, 255);
foreground = gdImageColorAllocate(im, 22, 4, 238);
gdImageString16(im, fontptr, 2, 2, sptr, foreground);
if (!gdAssertImageEqualsToFile("gdimagestring16/gdimagestring16_exp.png", im))
errorcode = 1;
/* Destroy the image in memory */
gdImageDestroy(im);
return errorcode;
}
|