gdiplus: Add test for GdipDrawDriverString.

This commit is contained in:
Vincent Povirk 2011-03-28 16:40:19 -05:00 committed by Alexandre Julliard
parent 319a748f7b
commit 204253b6ba
2 changed files with 41 additions and 0 deletions

View File

@ -1954,6 +1954,8 @@ static void test_GdipDrawString(void)
LOGFONTA logfont;
HDC hdc = GetDC( hwnd );
static const WCHAR string[] = {'T','e','s','t',0};
static const PointF positions[4] = {{0,0}, {1,1}, {2,2}, {3,3}};
GpMatrix *matrix;
memset(&logfont,0,sizeof(logfont));
strcpy(logfont.lfFaceName,"Arial");
@ -1985,6 +1987,36 @@ static void test_GdipDrawString(void)
status = GdipDrawString(graphics, string, 4, fnt, &rect, format, brush);
expect(Ok, status);
status = GdipCreateMatrix(&matrix);
expect(Ok, status);
todo_wine {
status = GdipDrawDriverString(NULL, string, 4, fnt, brush, positions, DriverStringOptionsCmapLookup, matrix);
expect(InvalidParameter, status);
status = GdipDrawDriverString(graphics, NULL, 4, fnt, brush, positions, DriverStringOptionsCmapLookup, matrix);
expect(InvalidParameter, status);
status = GdipDrawDriverString(graphics, string, 4, NULL, brush, positions, DriverStringOptionsCmapLookup, matrix);
expect(InvalidParameter, status);
status = GdipDrawDriverString(graphics, string, 4, fnt, NULL, positions, DriverStringOptionsCmapLookup, matrix);
expect(InvalidParameter, status);
status = GdipDrawDriverString(graphics, string, 4, fnt, brush, NULL, DriverStringOptionsCmapLookup, matrix);
expect(InvalidParameter, status);
status = GdipDrawDriverString(graphics, string, 4, fnt, brush, positions, DriverStringOptionsCmapLookup|0x10, matrix);
expect(Ok, status);
status = GdipDrawDriverString(graphics, string, 4, fnt, brush, positions, DriverStringOptionsCmapLookup, NULL);
expect(Ok, status);
status = GdipDrawDriverString(graphics, string, 4, fnt, brush, positions, DriverStringOptionsCmapLookup, matrix);
expect(Ok, status);
}
GdipDeleteMatrix(matrix);
GdipDeleteGraphics(graphics);
GdipDeleteBrush(brush);
GdipDeleteFont(fnt);

View File

@ -42,6 +42,14 @@ enum BrushType
BrushTypeLinearGradient = 4
};
enum DriverStringOptions
{
DriverStringOptionsCmapLookup = 1,
DriverStringOptionsVertical = 2,
DriverStringOptionsRealizedAdvance = 4,
DriverStringOptionsLimitSubpixel = 4
};
enum FillMode
{
FillModeAlternate = 0,
@ -707,6 +715,7 @@ enum EmfPlusRecordType {
typedef enum Unit Unit;
typedef enum BrushType BrushType;
typedef enum DriverStringOptions DriverStringOptions;
typedef enum FillMode FillMode;
typedef enum LineCap LineCap;
typedef enum PathPointType PathPointType;