2007-06-15 01:09:14 +02:00
|
|
|
/*
|
|
|
|
* Unit test suite for brushes
|
|
|
|
*
|
|
|
|
* Copyright (C) 2007 Google (Evan Stade)
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
2013-10-16 05:49:40 +02:00
|
|
|
#include <math.h>
|
|
|
|
|
|
|
|
#include "objbase.h"
|
2007-06-15 01:09:14 +02:00
|
|
|
#include "gdiplus.h"
|
|
|
|
#include "wine/test.h"
|
|
|
|
|
|
|
|
#define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got)
|
2008-07-21 21:30:50 +02:00
|
|
|
#define expectf(expected, got) ok(fabs(expected - got) < 0.0001, "Expected %.2f, got %.2f\n", expected, got)
|
2007-06-15 01:09:14 +02:00
|
|
|
|
|
|
|
static void test_constructor_destructor(void)
|
|
|
|
{
|
|
|
|
GpStatus status;
|
|
|
|
GpSolidFill *brush = NULL;
|
|
|
|
|
|
|
|
status = GdipCreateSolidFill((ARGB)0xdeadbeef, &brush);
|
|
|
|
expect(Ok, status);
|
|
|
|
ok(brush != NULL, "Expected brush to be initialized\n");
|
|
|
|
|
|
|
|
status = GdipDeleteBrush(NULL);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipDeleteBrush((GpBrush*) brush);
|
|
|
|
expect(Ok, status);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void test_type(void)
|
|
|
|
{
|
|
|
|
GpStatus status;
|
|
|
|
GpBrushType bt;
|
|
|
|
GpSolidFill *brush = NULL;
|
|
|
|
|
|
|
|
GdipCreateSolidFill((ARGB)0xdeadbeef, &brush);
|
|
|
|
|
|
|
|
status = GdipGetBrushType((GpBrush*)brush, &bt);
|
2008-07-24 01:23:22 +02:00
|
|
|
expect(Ok, status);
|
|
|
|
expect(BrushTypeSolidColor, bt);
|
2007-06-15 01:09:14 +02:00
|
|
|
|
|
|
|
GdipDeleteBrush((GpBrush*) brush);
|
|
|
|
}
|
2008-07-21 21:30:39 +02:00
|
|
|
static GpPointF blendcount_ptf[] = {{0.0, 0.0},
|
|
|
|
{50.0, 50.0}};
|
|
|
|
static void test_gradientblendcount(void)
|
|
|
|
{
|
|
|
|
GpStatus status;
|
|
|
|
GpPathGradient *brush;
|
|
|
|
INT count;
|
|
|
|
|
|
|
|
status = GdipCreatePathGradient(blendcount_ptf, 2, WrapModeClamp, &brush);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientBlendCount(NULL, NULL);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
status = GdipGetPathGradientBlendCount(NULL, &count);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
status = GdipGetPathGradientBlendCount(brush, NULL);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientBlendCount(brush, &count);
|
|
|
|
expect(Ok, status);
|
|
|
|
expect(1, count);
|
|
|
|
|
|
|
|
GdipDeleteBrush((GpBrush*) brush);
|
|
|
|
}
|
2007-06-15 01:09:14 +02:00
|
|
|
|
2008-07-21 21:30:50 +02:00
|
|
|
static GpPointF getblend_ptf[] = {{0.0, 0.0},
|
|
|
|
{50.0, 50.0}};
|
|
|
|
static void test_getblend(void)
|
|
|
|
{
|
|
|
|
GpStatus status;
|
|
|
|
GpPathGradient *brush;
|
|
|
|
REAL blends[4];
|
|
|
|
REAL pos[4];
|
|
|
|
|
|
|
|
status = GdipCreatePathGradient(getblend_ptf, 2, WrapModeClamp, &brush);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
/* check some invalid parameters combinations */
|
|
|
|
status = GdipGetPathGradientBlend(NULL, NULL, NULL, -1);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
status = GdipGetPathGradientBlend(brush,NULL, NULL, -1);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
status = GdipGetPathGradientBlend(NULL, blends,NULL, -1);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
status = GdipGetPathGradientBlend(NULL, NULL, pos, -1);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
status = GdipGetPathGradientBlend(NULL, NULL, NULL, 1);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
blends[0] = (REAL)0xdeadbeef;
|
|
|
|
pos[0] = (REAL)0xdeadbeef;
|
|
|
|
status = GdipGetPathGradientBlend(brush, blends, pos, 1);
|
|
|
|
expect(Ok, status);
|
|
|
|
expectf(1.0, blends[0]);
|
|
|
|
expectf((REAL)0xdeadbeef, pos[0]);
|
|
|
|
|
|
|
|
GdipDeleteBrush((GpBrush*) brush);
|
|
|
|
}
|
|
|
|
|
2008-07-23 00:07:28 +02:00
|
|
|
static GpPointF getbounds_ptf[] = {{0.0, 20.0},
|
|
|
|
{50.0, 50.0},
|
|
|
|
{21.0, 25.0},
|
|
|
|
{25.0, 46.0}};
|
|
|
|
static void test_getbounds(void)
|
|
|
|
{
|
|
|
|
GpStatus status;
|
|
|
|
GpPathGradient *brush;
|
|
|
|
GpRectF bounds;
|
|
|
|
|
|
|
|
status = GdipCreatePathGradient(getbounds_ptf, 4, WrapModeClamp, &brush);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientRect(NULL, NULL);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
status = GdipGetPathGradientRect(brush, NULL);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
status = GdipGetPathGradientRect(NULL, &bounds);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientRect(brush, &bounds);
|
|
|
|
expect(Ok, status);
|
|
|
|
expectf(0.0, bounds.X);
|
|
|
|
expectf(20.0, bounds.Y);
|
|
|
|
expectf(50.0, bounds.Width);
|
|
|
|
expectf(30.0, bounds.Height);
|
|
|
|
|
|
|
|
GdipDeleteBrush((GpBrush*) brush);
|
|
|
|
}
|
|
|
|
|
2008-09-02 22:25:39 +02:00
|
|
|
static void test_getgamma(void)
|
|
|
|
{
|
|
|
|
GpStatus status;
|
|
|
|
GpLineGradient *line;
|
|
|
|
GpPointF start, end;
|
|
|
|
BOOL gamma;
|
|
|
|
|
|
|
|
start.X = start.Y = 0.0;
|
|
|
|
end.X = end.Y = 100.0;
|
|
|
|
|
|
|
|
status = GdipCreateLineBrush(&start, &end, (ARGB)0xdeadbeef, 0xdeadbeef, WrapModeTile, &line);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
/* NULL arguments */
|
|
|
|
status = GdipGetLineGammaCorrection(NULL, NULL);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
status = GdipGetLineGammaCorrection(line, NULL);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
status = GdipGetLineGammaCorrection(NULL, &gamma);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
GdipDeleteBrush((GpBrush*)line);
|
|
|
|
}
|
|
|
|
|
2008-09-25 06:54:24 +02:00
|
|
|
static void test_transform(void)
|
|
|
|
{
|
|
|
|
GpStatus status;
|
|
|
|
GpTexture *texture;
|
|
|
|
GpGraphics *graphics = NULL;
|
|
|
|
GpBitmap *bitmap;
|
|
|
|
HDC hdc = GetDC(0);
|
2008-09-25 06:56:35 +02:00
|
|
|
GpMatrix *m, *m1;
|
2008-09-25 06:54:24 +02:00
|
|
|
BOOL res;
|
|
|
|
|
|
|
|
status = GdipCreateMatrix2(2.0, 0.0, 0.0, 0.0, 0.0, 0.0, &m);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
status = GdipCreateFromHDC(hdc, &graphics);
|
|
|
|
expect(Ok, status);
|
|
|
|
status = GdipCreateBitmapFromGraphics(1, 1, graphics, &bitmap);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
status = GdipCreateTexture((GpImage*)bitmap, WrapModeTile, &texture);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
/* NULL */
|
|
|
|
status = GdipGetTextureTransform(NULL, NULL);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
status = GdipGetTextureTransform(texture, NULL);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
2008-09-25 06:56:35 +02:00
|
|
|
/* get default value - identity matrix */
|
2008-09-25 06:54:24 +02:00
|
|
|
status = GdipGetTextureTransform(texture, m);
|
|
|
|
expect(Ok, status);
|
|
|
|
status = GdipIsMatrixIdentity(m, &res);
|
|
|
|
expect(Ok, status);
|
|
|
|
expect(TRUE, res);
|
2008-09-25 06:56:35 +02:00
|
|
|
/* set and get then */
|
|
|
|
status = GdipCreateMatrix2(2.0, 0.0, 0.0, 2.0, 0.0, 0.0, &m1);
|
|
|
|
expect(Ok, status);
|
|
|
|
status = GdipSetTextureTransform(texture, m1);
|
|
|
|
expect(Ok, status);
|
|
|
|
status = GdipGetTextureTransform(texture, m);
|
|
|
|
expect(Ok, status);
|
|
|
|
status = GdipIsMatrixEqual(m, m1, &res);
|
|
|
|
expect(Ok, status);
|
|
|
|
expect(TRUE, res);
|
2008-09-25 06:57:55 +02:00
|
|
|
/* reset */
|
|
|
|
status = GdipResetTextureTransform(texture);
|
|
|
|
expect(Ok, status);
|
|
|
|
status = GdipGetTextureTransform(texture, m);
|
|
|
|
expect(Ok, status);
|
|
|
|
status = GdipIsMatrixIdentity(m, &res);
|
|
|
|
expect(Ok, status);
|
|
|
|
expect(TRUE, res);
|
2008-09-25 06:54:24 +02:00
|
|
|
|
|
|
|
status = GdipDeleteBrush((GpBrush*)texture);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
2008-09-25 06:56:35 +02:00
|
|
|
status = GdipDeleteMatrix(m1);
|
|
|
|
expect(Ok, status);
|
2008-09-25 06:54:24 +02:00
|
|
|
status = GdipDeleteMatrix(m);
|
|
|
|
expect(Ok, status);
|
|
|
|
status = GdipDisposeImage((GpImage*)bitmap);
|
|
|
|
expect(Ok, status);
|
|
|
|
status = GdipDeleteGraphics(graphics);
|
|
|
|
expect(Ok, status);
|
|
|
|
ReleaseDC(0, hdc);
|
|
|
|
}
|
|
|
|
|
2008-10-21 17:39:21 +02:00
|
|
|
static void test_texturewrap(void)
|
|
|
|
{
|
|
|
|
GpStatus status;
|
|
|
|
GpTexture *texture;
|
|
|
|
GpGraphics *graphics = NULL;
|
|
|
|
GpBitmap *bitmap;
|
|
|
|
HDC hdc = GetDC(0);
|
|
|
|
GpWrapMode wrap;
|
|
|
|
|
|
|
|
status = GdipCreateFromHDC(hdc, &graphics);
|
|
|
|
expect(Ok, status);
|
|
|
|
status = GdipCreateBitmapFromGraphics(1, 1, graphics, &bitmap);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
status = GdipCreateTexture((GpImage*)bitmap, WrapModeTile, &texture);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
/* NULL */
|
|
|
|
status = GdipGetTextureWrapMode(NULL, NULL);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
status = GdipGetTextureWrapMode(texture, NULL);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
status = GdipGetTextureWrapMode(NULL, &wrap);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
/* get */
|
|
|
|
wrap = WrapModeClamp;
|
|
|
|
status = GdipGetTextureWrapMode(texture, &wrap);
|
|
|
|
expect(Ok, status);
|
|
|
|
expect(WrapModeTile, wrap);
|
|
|
|
/* set, then get */
|
|
|
|
wrap = WrapModeClamp;
|
|
|
|
status = GdipSetTextureWrapMode(texture, wrap);
|
|
|
|
expect(Ok, status);
|
|
|
|
wrap = WrapModeTile;
|
|
|
|
status = GdipGetTextureWrapMode(texture, &wrap);
|
|
|
|
expect(Ok, status);
|
|
|
|
expect(WrapModeClamp, wrap);
|
|
|
|
|
|
|
|
status = GdipDeleteBrush((GpBrush*)texture);
|
|
|
|
expect(Ok, status);
|
|
|
|
status = GdipDisposeImage((GpImage*)bitmap);
|
|
|
|
expect(Ok, status);
|
|
|
|
status = GdipDeleteGraphics(graphics);
|
|
|
|
expect(Ok, status);
|
|
|
|
ReleaseDC(0, hdc);
|
|
|
|
}
|
|
|
|
|
2009-02-09 14:58:59 +01:00
|
|
|
static void test_gradientgetrect(void)
|
|
|
|
{
|
|
|
|
GpLineGradient *brush;
|
2010-10-30 22:19:00 +02:00
|
|
|
GpMatrix *transform;
|
|
|
|
REAL elements[6];
|
2009-02-09 14:58:59 +01:00
|
|
|
GpRectF rectf;
|
|
|
|
GpStatus status;
|
|
|
|
GpPointF pt1, pt2;
|
|
|
|
|
2010-10-30 22:19:00 +02:00
|
|
|
status = GdipCreateMatrix(&transform);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
2009-02-09 14:58:59 +01:00
|
|
|
pt1.X = pt1.Y = 1.0;
|
|
|
|
pt2.X = pt2.Y = 100.0;
|
|
|
|
status = GdipCreateLineBrush(&pt1, &pt2, 0, 0, WrapModeTile, &brush);
|
|
|
|
expect(Ok, status);
|
|
|
|
memset(&rectf, 0, sizeof(GpRectF));
|
|
|
|
status = GdipGetLineRect(brush, &rectf);
|
|
|
|
expect(Ok, status);
|
|
|
|
expectf(1.0, rectf.X);
|
|
|
|
expectf(1.0, rectf.Y);
|
|
|
|
expectf(99.0, rectf.Width);
|
|
|
|
expectf(99.0, rectf.Height);
|
2010-10-30 22:19:00 +02:00
|
|
|
status = GdipGetLineTransform(brush, transform);
|
|
|
|
todo_wine expect(Ok, status);
|
|
|
|
if (status == Ok)
|
|
|
|
{
|
|
|
|
status = GdipGetMatrixElements(transform, elements);
|
2011-02-09 01:06:06 +01:00
|
|
|
expect(Ok, status);
|
2010-10-30 22:19:00 +02:00
|
|
|
expectf(1.0, elements[0]);
|
|
|
|
expectf(1.0, elements[1]);
|
|
|
|
expectf(-1.0, elements[2]);
|
|
|
|
expectf(1.0, elements[3]);
|
|
|
|
expectf(50.50, elements[4]);
|
|
|
|
expectf(-50.50, elements[5]);
|
|
|
|
}
|
2009-02-09 14:58:59 +01:00
|
|
|
status = GdipDeleteBrush((GpBrush*)brush);
|
2011-02-09 01:06:06 +01:00
|
|
|
expect(Ok, status);
|
2009-02-09 14:58:59 +01:00
|
|
|
/* vertical gradient */
|
|
|
|
pt1.X = pt1.Y = pt2.X = 0.0;
|
|
|
|
pt2.Y = 10.0;
|
|
|
|
status = GdipCreateLineBrush(&pt1, &pt2, 0, 0, WrapModeTile, &brush);
|
|
|
|
expect(Ok, status);
|
|
|
|
memset(&rectf, 0, sizeof(GpRectF));
|
|
|
|
status = GdipGetLineRect(brush, &rectf);
|
|
|
|
expect(Ok, status);
|
2009-08-03 16:02:49 +02:00
|
|
|
expectf(-5.0, rectf.X);
|
2009-02-09 14:58:59 +01:00
|
|
|
expectf(0.0, rectf.Y);
|
2009-08-03 16:02:49 +02:00
|
|
|
expectf(10.0, rectf.Width);
|
2009-02-09 14:58:59 +01:00
|
|
|
expectf(10.0, rectf.Height);
|
2010-10-30 22:19:00 +02:00
|
|
|
status = GdipGetLineTransform(brush, transform);
|
|
|
|
todo_wine expect(Ok, status);
|
|
|
|
if (status == Ok)
|
|
|
|
{
|
|
|
|
status = GdipGetMatrixElements(transform, elements);
|
2011-02-09 01:06:06 +01:00
|
|
|
expect(Ok, status);
|
2010-10-30 22:19:00 +02:00
|
|
|
expectf(0.0, elements[0]);
|
|
|
|
expectf(1.0, elements[1]);
|
|
|
|
expectf(-1.0, elements[2]);
|
|
|
|
expectf(0.0, elements[3]);
|
|
|
|
expectf(5.0, elements[4]);
|
|
|
|
expectf(5.0, elements[5]);
|
|
|
|
}
|
2009-02-09 14:58:59 +01:00
|
|
|
status = GdipDeleteBrush((GpBrush*)brush);
|
2011-02-09 01:06:06 +01:00
|
|
|
expect(Ok, status);
|
2009-02-09 14:58:59 +01:00
|
|
|
/* horizontal gradient */
|
|
|
|
pt1.X = pt1.Y = pt2.Y = 0.0;
|
|
|
|
pt2.X = 10.0;
|
|
|
|
status = GdipCreateLineBrush(&pt1, &pt2, 0, 0, WrapModeTile, &brush);
|
|
|
|
expect(Ok, status);
|
|
|
|
memset(&rectf, 0, sizeof(GpRectF));
|
|
|
|
status = GdipGetLineRect(brush, &rectf);
|
|
|
|
expect(Ok, status);
|
|
|
|
expectf(0.0, rectf.X);
|
2009-08-03 16:02:49 +02:00
|
|
|
expectf(-5.0, rectf.Y);
|
2009-02-09 14:58:59 +01:00
|
|
|
expectf(10.0, rectf.Width);
|
2009-08-03 16:02:49 +02:00
|
|
|
expectf(10.0, rectf.Height);
|
2010-10-30 22:19:00 +02:00
|
|
|
status = GdipGetLineTransform(brush, transform);
|
|
|
|
todo_wine expect(Ok, status);
|
|
|
|
if (status == Ok)
|
|
|
|
{
|
|
|
|
status = GdipGetMatrixElements(transform, elements);
|
2011-02-09 01:06:06 +01:00
|
|
|
expect(Ok, status);
|
2010-10-30 22:19:00 +02:00
|
|
|
expectf(1.0, elements[0]);
|
|
|
|
expectf(0.0, elements[1]);
|
|
|
|
expectf(0.0, elements[2]);
|
|
|
|
expectf(1.0, elements[3]);
|
|
|
|
expectf(0.0, elements[4]);
|
|
|
|
expectf(0.0, elements[5]);
|
|
|
|
}
|
2009-02-09 14:58:59 +01:00
|
|
|
status = GdipDeleteBrush((GpBrush*)brush);
|
2011-02-09 01:06:06 +01:00
|
|
|
expect(Ok, status);
|
2009-05-07 18:28:08 +02:00
|
|
|
/* slope = -1 */
|
|
|
|
pt1.X = pt1.Y = 0.0;
|
|
|
|
pt2.X = 20.0;
|
|
|
|
pt2.Y = -20.0;
|
|
|
|
status = GdipCreateLineBrush(&pt1, &pt2, 0, 0, WrapModeTile, &brush);
|
|
|
|
expect(Ok, status);
|
|
|
|
memset(&rectf, 0, sizeof(GpRectF));
|
|
|
|
status = GdipGetLineRect(brush, &rectf);
|
|
|
|
expect(Ok, status);
|
|
|
|
expectf(0.0, rectf.X);
|
|
|
|
expectf(-20.0, rectf.Y);
|
|
|
|
expectf(20.0, rectf.Width);
|
|
|
|
expectf(20.0, rectf.Height);
|
2010-10-30 22:19:00 +02:00
|
|
|
status = GdipGetLineTransform(brush, transform);
|
|
|
|
todo_wine expect(Ok, status);
|
|
|
|
if (status == Ok)
|
|
|
|
{
|
|
|
|
status = GdipGetMatrixElements(transform, elements);
|
2011-02-09 01:06:06 +01:00
|
|
|
expect(Ok, status);
|
2010-10-30 22:19:00 +02:00
|
|
|
expectf(1.0, elements[0]);
|
|
|
|
expectf(-1.0, elements[1]);
|
|
|
|
expectf(1.0, elements[2]);
|
|
|
|
expectf(1.0, elements[3]);
|
|
|
|
expectf(10.0, elements[4]);
|
|
|
|
expectf(10.0, elements[5]);
|
|
|
|
}
|
2009-05-07 18:28:08 +02:00
|
|
|
status = GdipDeleteBrush((GpBrush*)brush);
|
2011-02-09 01:06:06 +01:00
|
|
|
expect(Ok, status);
|
2009-05-07 18:28:08 +02:00
|
|
|
/* slope = 1/100 */
|
|
|
|
pt1.X = pt1.Y = 0.0;
|
|
|
|
pt2.X = 100.0;
|
|
|
|
pt2.Y = 1.0;
|
|
|
|
status = GdipCreateLineBrush(&pt1, &pt2, 0, 0, WrapModeTile, &brush);
|
|
|
|
expect(Ok, status);
|
|
|
|
memset(&rectf, 0, sizeof(GpRectF));
|
|
|
|
status = GdipGetLineRect(brush, &rectf);
|
|
|
|
expect(Ok, status);
|
|
|
|
expectf(0.0, rectf.X);
|
|
|
|
expectf(0.0, rectf.Y);
|
|
|
|
expectf(100.0, rectf.Width);
|
|
|
|
expectf(1.0, rectf.Height);
|
2010-10-30 22:19:00 +02:00
|
|
|
status = GdipGetLineTransform(brush, transform);
|
|
|
|
todo_wine expect(Ok, status);
|
|
|
|
if (status == Ok)
|
|
|
|
{
|
|
|
|
status = GdipGetMatrixElements(transform, elements);
|
2011-02-09 01:06:06 +01:00
|
|
|
expect(Ok,status);
|
2010-10-30 22:19:00 +02:00
|
|
|
expectf(1.0, elements[0]);
|
|
|
|
expectf(0.01, elements[1]);
|
|
|
|
expectf(-0.02, elements[2]);
|
|
|
|
/* expectf(2.0, elements[3]); */
|
|
|
|
expectf(0.01, elements[4]);
|
|
|
|
/* expectf(-1.0, elements[5]); */
|
|
|
|
}
|
2009-05-07 18:28:08 +02:00
|
|
|
status = GdipDeleteBrush((GpBrush*)brush);
|
2011-02-09 01:06:06 +01:00
|
|
|
expect(Ok,status);
|
2010-10-28 01:02:30 +02:00
|
|
|
/* zero height rect */
|
|
|
|
rectf.X = rectf.Y = 10.0;
|
|
|
|
rectf.Width = 100.0;
|
|
|
|
rectf.Height = 0.0;
|
|
|
|
status = GdipCreateLineBrushFromRect(&rectf, 0, 0, LinearGradientModeVertical,
|
|
|
|
WrapModeTile, &brush);
|
|
|
|
expect(OutOfMemory, status);
|
|
|
|
/* zero width rect */
|
|
|
|
rectf.X = rectf.Y = 10.0;
|
|
|
|
rectf.Width = 0.0;
|
|
|
|
rectf.Height = 100.0;
|
|
|
|
status = GdipCreateLineBrushFromRect(&rectf, 0, 0, LinearGradientModeHorizontal,
|
|
|
|
WrapModeTile, &brush);
|
|
|
|
expect(OutOfMemory, status);
|
2009-02-09 14:58:59 +01:00
|
|
|
/* from rect with LinearGradientModeHorizontal */
|
|
|
|
rectf.X = rectf.Y = 10.0;
|
|
|
|
rectf.Width = rectf.Height = 100.0;
|
|
|
|
status = GdipCreateLineBrushFromRect(&rectf, 0, 0, LinearGradientModeHorizontal,
|
|
|
|
WrapModeTile, &brush);
|
|
|
|
expect(Ok, status);
|
|
|
|
memset(&rectf, 0, sizeof(GpRectF));
|
|
|
|
status = GdipGetLineRect(brush, &rectf);
|
|
|
|
expect(Ok, status);
|
|
|
|
expectf(10.0, rectf.X);
|
|
|
|
expectf(10.0, rectf.Y);
|
|
|
|
expectf(100.0, rectf.Width);
|
|
|
|
expectf(100.0, rectf.Height);
|
2010-10-30 22:19:00 +02:00
|
|
|
status = GdipGetLineTransform(brush, transform);
|
|
|
|
todo_wine expect(Ok, status);
|
|
|
|
if (status == Ok)
|
|
|
|
{
|
|
|
|
status = GdipGetMatrixElements(transform, elements);
|
2011-02-09 01:06:06 +01:00
|
|
|
expect(Ok,status);
|
2010-10-30 22:19:00 +02:00
|
|
|
expectf(1.0, elements[0]);
|
|
|
|
expectf(0.0, elements[1]);
|
|
|
|
expectf(0.0, elements[2]);
|
|
|
|
expectf(1.0, elements[3]);
|
|
|
|
expectf(0.0, elements[4]);
|
|
|
|
expectf(0.0, elements[5]);
|
|
|
|
}
|
2009-02-09 14:58:59 +01:00
|
|
|
status = GdipDeleteBrush((GpBrush*)brush);
|
2011-02-09 01:06:06 +01:00
|
|
|
expect(Ok,status);
|
2009-05-07 18:28:08 +02:00
|
|
|
/* passing negative Width/Height to LinearGradientModeHorizontal */
|
|
|
|
rectf.X = rectf.Y = 10.0;
|
|
|
|
rectf.Width = rectf.Height = -100.0;
|
|
|
|
status = GdipCreateLineBrushFromRect(&rectf, 0, 0, LinearGradientModeHorizontal,
|
|
|
|
WrapModeTile, &brush);
|
|
|
|
expect(Ok, status);
|
|
|
|
memset(&rectf, 0, sizeof(GpRectF));
|
|
|
|
status = GdipGetLineRect(brush, &rectf);
|
|
|
|
expect(Ok, status);
|
2009-05-07 18:40:13 +02:00
|
|
|
expectf(10.0, rectf.X);
|
|
|
|
expectf(10.0, rectf.Y);
|
|
|
|
expectf(-100.0, rectf.Width);
|
|
|
|
expectf(-100.0, rectf.Height);
|
2010-10-30 22:19:00 +02:00
|
|
|
status = GdipGetLineTransform(brush, transform);
|
|
|
|
todo_wine expect(Ok, status);
|
|
|
|
if (status == Ok)
|
|
|
|
{
|
|
|
|
status = GdipGetMatrixElements(transform, elements);
|
2011-02-09 01:06:06 +01:00
|
|
|
expect(Ok,status);
|
2010-10-30 22:19:00 +02:00
|
|
|
expectf(1.0, elements[0]);
|
|
|
|
expectf(0.0, elements[1]);
|
|
|
|
expectf(0.0, elements[2]);
|
|
|
|
expectf(1.0, elements[3]);
|
|
|
|
expectf(0.0, elements[4]);
|
|
|
|
expectf(0.0, elements[5]);
|
|
|
|
}
|
2009-05-07 18:28:08 +02:00
|
|
|
status = GdipDeleteBrush((GpBrush*)brush);
|
2011-02-09 01:06:06 +01:00
|
|
|
expect(Ok,status);
|
2010-10-30 22:19:00 +02:00
|
|
|
|
|
|
|
GdipDeleteMatrix(transform);
|
2009-02-09 14:58:59 +01:00
|
|
|
}
|
|
|
|
|
2009-04-29 00:30:39 +02:00
|
|
|
static void test_lineblend(void)
|
|
|
|
{
|
|
|
|
GpLineGradient *brush;
|
|
|
|
GpStatus status;
|
|
|
|
GpPointF pt1, pt2;
|
|
|
|
INT count=10;
|
|
|
|
int i;
|
|
|
|
const REAL factors[5] = {0.0f, 0.1f, 0.5f, 0.9f, 1.0f};
|
|
|
|
const REAL positions[5] = {0.0f, 0.2f, 0.5f, 0.8f, 1.0f};
|
2009-09-14 23:08:25 +02:00
|
|
|
const REAL two_positions[2] = {0.0f, 1.0f};
|
|
|
|
const ARGB colors[5] = {0xff0000ff, 0xff00ff00, 0xff00ffff, 0xffff0000, 0xffffffff};
|
2009-04-29 00:30:39 +02:00
|
|
|
REAL res_factors[6] = {0.3f, 0.0f, 0.0f, 0.0f, 0.0f};
|
|
|
|
REAL res_positions[6] = {0.3f, 0.0f, 0.0f, 0.0f, 0.0f};
|
2009-09-14 23:08:25 +02:00
|
|
|
ARGB res_colors[6] = {0xdeadbeef, 0, 0, 0, 0};
|
2009-04-29 00:30:39 +02:00
|
|
|
|
2010-10-28 01:02:30 +02:00
|
|
|
pt1.X = pt1.Y = pt2.Y = pt2.X = 1.0;
|
|
|
|
status = GdipCreateLineBrush(&pt1, &pt2, 0, 0, WrapModeTile, &brush);
|
|
|
|
expect(OutOfMemory, status);
|
|
|
|
|
2009-04-29 00:30:39 +02:00
|
|
|
pt1.X = pt1.Y = 1.0;
|
|
|
|
pt2.X = pt2.Y = 100.0;
|
|
|
|
status = GdipCreateLineBrush(&pt1, &pt2, 0, 0, WrapModeTile, &brush);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
status = GdipGetLineBlendCount(NULL, &count);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetLineBlendCount(brush, NULL);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetLineBlendCount(brush, &count);
|
|
|
|
expect(Ok, status);
|
|
|
|
expect(1, count);
|
|
|
|
|
|
|
|
status = GdipGetLineBlend(NULL, res_factors, res_positions, 1);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetLineBlend(brush, NULL, res_positions, 1);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetLineBlend(brush, res_factors, NULL, 1);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetLineBlend(brush, res_factors, res_positions, 0);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetLineBlend(brush, res_factors, res_positions, -1);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetLineBlend(brush, res_factors, res_positions, 1);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
status = GdipGetLineBlend(brush, res_factors, res_positions, 2);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
status = GdipSetLineBlend(NULL, factors, positions, 5);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipSetLineBlend(brush, NULL, positions, 5);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipSetLineBlend(brush, factors, NULL, 5);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipSetLineBlend(brush, factors, positions, 0);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipSetLineBlend(brush, factors, positions, -1);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
/* leave off the 0.0 position */
|
|
|
|
status = GdipSetLineBlend(brush, &factors[1], &positions[1], 4);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
/* leave off the 1.0 position */
|
|
|
|
status = GdipSetLineBlend(brush, factors, positions, 4);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipSetLineBlend(brush, factors, positions, 5);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
status = GdipGetLineBlendCount(brush, &count);
|
|
|
|
expect(Ok, status);
|
|
|
|
expect(5, count);
|
|
|
|
|
|
|
|
status = GdipGetLineBlend(brush, res_factors, res_positions, 4);
|
|
|
|
expect(InsufficientBuffer, status);
|
|
|
|
|
|
|
|
status = GdipGetLineBlend(brush, res_factors, res_positions, 5);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
for (i=0; i<5; i++)
|
|
|
|
{
|
|
|
|
expectf(factors[i], res_factors[i]);
|
|
|
|
expectf(positions[i], res_positions[i]);
|
|
|
|
}
|
|
|
|
|
|
|
|
status = GdipGetLineBlend(brush, res_factors, res_positions, 6);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
status = GdipSetLineBlend(brush, factors, positions, 1);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
status = GdipGetLineBlendCount(brush, &count);
|
|
|
|
expect(Ok, status);
|
|
|
|
expect(1, count);
|
|
|
|
|
|
|
|
status = GdipGetLineBlend(brush, res_factors, res_positions, 1);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
2009-09-14 23:08:25 +02:00
|
|
|
status = GdipGetLinePresetBlendCount(NULL, &count);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetLinePresetBlendCount(brush, NULL);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetLinePresetBlendCount(brush, &count);
|
|
|
|
expect(Ok, status);
|
|
|
|
expect(0, count);
|
|
|
|
|
|
|
|
status = GdipGetLinePresetBlend(NULL, res_colors, res_positions, 1);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetLinePresetBlend(brush, NULL, res_positions, 1);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetLinePresetBlend(brush, res_colors, NULL, 1);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetLinePresetBlend(brush, res_colors, res_positions, 0);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetLinePresetBlend(brush, res_colors, res_positions, -1);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetLinePresetBlend(brush, res_colors, res_positions, 1);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetLinePresetBlend(brush, res_colors, res_positions, 2);
|
|
|
|
expect(GenericError, status);
|
|
|
|
|
|
|
|
status = GdipSetLinePresetBlend(NULL, colors, positions, 5);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipSetLinePresetBlend(brush, NULL, positions, 5);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipSetLinePresetBlend(brush, colors, NULL, 5);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipSetLinePresetBlend(brush, colors, positions, 0);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipSetLinePresetBlend(brush, colors, positions, -1);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipSetLinePresetBlend(brush, colors, positions, 1);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
/* leave off the 0.0 position */
|
|
|
|
status = GdipSetLinePresetBlend(brush, &colors[1], &positions[1], 4);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
/* leave off the 1.0 position */
|
|
|
|
status = GdipSetLinePresetBlend(brush, colors, positions, 4);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipSetLinePresetBlend(brush, colors, positions, 5);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
status = GdipGetLinePresetBlendCount(brush, &count);
|
|
|
|
expect(Ok, status);
|
|
|
|
expect(5, count);
|
|
|
|
|
|
|
|
status = GdipGetLinePresetBlend(brush, res_colors, res_positions, 4);
|
|
|
|
expect(InsufficientBuffer, status);
|
|
|
|
|
|
|
|
status = GdipGetLinePresetBlend(brush, res_colors, res_positions, 5);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
for (i=0; i<5; i++)
|
|
|
|
{
|
|
|
|
expect(colors[i], res_colors[i]);
|
|
|
|
expectf(positions[i], res_positions[i]);
|
|
|
|
}
|
|
|
|
|
|
|
|
status = GdipGetLinePresetBlend(brush, res_colors, res_positions, 6);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
status = GdipSetLinePresetBlend(brush, colors, two_positions, 2);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
2009-04-29 00:30:39 +02:00
|
|
|
status = GdipDeleteBrush((GpBrush*)brush);
|
|
|
|
expect(Ok, status);
|
|
|
|
}
|
|
|
|
|
2009-07-11 18:49:44 +02:00
|
|
|
static void test_linelinearblend(void)
|
|
|
|
{
|
|
|
|
GpLineGradient *brush;
|
|
|
|
GpStatus status;
|
|
|
|
GpPointF pt1, pt2;
|
|
|
|
INT count=10;
|
|
|
|
REAL res_factors[3] = {0.3f};
|
|
|
|
REAL res_positions[3] = {0.3f};
|
|
|
|
|
|
|
|
status = GdipSetLineLinearBlend(NULL, 0.6, 0.8);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
pt1.X = pt1.Y = 1.0;
|
|
|
|
pt2.X = pt2.Y = 100.0;
|
|
|
|
status = GdipCreateLineBrush(&pt1, &pt2, 0, 0, WrapModeTile, &brush);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
|
|
|
|
status = GdipSetLineLinearBlend(brush, 0.6, 0.8);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
status = GdipGetLineBlendCount(brush, &count);
|
|
|
|
expect(Ok, status);
|
|
|
|
expect(3, count);
|
|
|
|
|
|
|
|
status = GdipGetLineBlend(brush, res_factors, res_positions, 3);
|
|
|
|
expect(Ok, status);
|
|
|
|
expectf(0.0, res_factors[0]);
|
|
|
|
expectf(0.0, res_positions[0]);
|
|
|
|
expectf(0.8, res_factors[1]);
|
|
|
|
expectf(0.6, res_positions[1]);
|
|
|
|
expectf(0.0, res_factors[2]);
|
|
|
|
expectf(1.0, res_positions[2]);
|
|
|
|
|
|
|
|
|
|
|
|
status = GdipSetLineLinearBlend(brush, 0.0, 0.8);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
status = GdipGetLineBlendCount(brush, &count);
|
|
|
|
expect(Ok, status);
|
|
|
|
expect(2, count);
|
|
|
|
|
|
|
|
status = GdipGetLineBlend(brush, res_factors, res_positions, 3);
|
|
|
|
expect(Ok, status);
|
|
|
|
expectf(0.8, res_factors[0]);
|
|
|
|
expectf(0.0, res_positions[0]);
|
|
|
|
expectf(0.0, res_factors[1]);
|
|
|
|
expectf(1.0, res_positions[1]);
|
|
|
|
|
|
|
|
|
|
|
|
status = GdipSetLineLinearBlend(brush, 1.0, 0.8);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
status = GdipGetLineBlendCount(brush, &count);
|
|
|
|
expect(Ok, status);
|
|
|
|
expect(2, count);
|
|
|
|
|
|
|
|
status = GdipGetLineBlend(brush, res_factors, res_positions, 3);
|
|
|
|
expect(Ok, status);
|
|
|
|
expectf(0.0, res_factors[0]);
|
|
|
|
expectf(0.0, res_positions[0]);
|
|
|
|
expectf(0.8, res_factors[1]);
|
|
|
|
expectf(1.0, res_positions[1]);
|
2009-12-05 19:50:50 +01:00
|
|
|
|
|
|
|
status = GdipDeleteBrush((GpBrush*)brush);
|
|
|
|
expect(Ok, status);
|
2009-07-11 18:49:44 +02:00
|
|
|
}
|
|
|
|
|
2010-03-27 22:55:27 +01:00
|
|
|
static void test_gradientsurroundcolorcount(void)
|
|
|
|
{
|
|
|
|
GpStatus status;
|
|
|
|
GpPathGradient *grad;
|
2012-02-22 23:09:29 +01:00
|
|
|
ARGB color[3];
|
|
|
|
INT count;
|
2010-03-27 22:55:27 +01:00
|
|
|
|
|
|
|
status = GdipCreatePathGradient(blendcount_ptf, 2, WrapModeClamp, &grad);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
2012-02-22 23:09:29 +01:00
|
|
|
count = 0;
|
|
|
|
status = GdipGetPathGradientSurroundColorCount(grad, &count);
|
2012-02-29 22:23:38 +01:00
|
|
|
expect(Ok, status);
|
|
|
|
expect(2, count);
|
2012-02-22 23:09:29 +01:00
|
|
|
|
|
|
|
color[0] = color[1] = color[2] = 0xdeadbeef;
|
|
|
|
count = 3;
|
|
|
|
status = GdipGetPathGradientSurroundColorsWithCount(grad, color, &count);
|
2012-02-29 22:23:38 +01:00
|
|
|
expect(Ok, status);
|
|
|
|
expect(1, count);
|
|
|
|
expect(0xffffffff, color[0]);
|
|
|
|
expect(0xffffffff, color[1]);
|
2012-02-22 23:09:29 +01:00
|
|
|
expect(0xdeadbeef, color[2]);
|
|
|
|
|
|
|
|
color[0] = color[1] = color[2] = 0xdeadbeef;
|
|
|
|
count = 2;
|
|
|
|
status = GdipGetPathGradientSurroundColorsWithCount(grad, color, &count);
|
2012-02-29 22:23:38 +01:00
|
|
|
expect(Ok, status);
|
|
|
|
expect(1, count);
|
|
|
|
expect(0xffffffff, color[0]);
|
|
|
|
expect(0xffffffff, color[1]);
|
2012-02-22 23:09:29 +01:00
|
|
|
expect(0xdeadbeef, color[2]);
|
|
|
|
|
|
|
|
color[0] = color[1] = color[2] = 0xdeadbeef;
|
|
|
|
count = 1;
|
|
|
|
status = GdipGetPathGradientSurroundColorsWithCount(grad, color, &count);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
expect(1, count);
|
|
|
|
expect(0xdeadbeef, color[0]);
|
|
|
|
expect(0xdeadbeef, color[1]);
|
|
|
|
expect(0xdeadbeef, color[2]);
|
|
|
|
|
|
|
|
color[0] = color[1] = color[2] = 0xdeadbeef;
|
|
|
|
count = 0;
|
|
|
|
status = GdipGetPathGradientSurroundColorsWithCount(grad, color, &count);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
expect(0, count);
|
|
|
|
expect(0xdeadbeef, color[0]);
|
|
|
|
expect(0xdeadbeef, color[1]);
|
|
|
|
expect(0xdeadbeef, color[2]);
|
2010-03-27 22:55:27 +01:00
|
|
|
|
2012-02-22 23:09:29 +01:00
|
|
|
count = 3;
|
2010-03-27 22:55:27 +01:00
|
|
|
status = GdipSetPathGradientSurroundColorsWithCount(grad, color, &count);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
count = 2;
|
|
|
|
|
|
|
|
color[0] = 0x00ff0000;
|
|
|
|
color[1] = 0x0000ff00;
|
|
|
|
|
|
|
|
status = GdipSetPathGradientSurroundColorsWithCount(NULL, color, &count);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipSetPathGradientSurroundColorsWithCount(grad, NULL, &count);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
/* WinXP crashes on this test */
|
|
|
|
if(0)
|
|
|
|
{
|
|
|
|
status = GdipSetPathGradientSurroundColorsWithCount(grad, color, NULL);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
}
|
|
|
|
|
|
|
|
status = GdipSetPathGradientSurroundColorsWithCount(grad, color, &count);
|
2012-02-29 22:23:38 +01:00
|
|
|
expect(Ok, status);
|
2010-03-27 22:55:27 +01:00
|
|
|
expect(2, count);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientSurroundColorCount(NULL, &count);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientSurroundColorCount(grad, NULL);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
count = 0;
|
|
|
|
status = GdipGetPathGradientSurroundColorCount(grad, &count);
|
2012-02-29 22:23:38 +01:00
|
|
|
expect(Ok, status);
|
|
|
|
expect(2, count);
|
2010-03-27 22:55:27 +01:00
|
|
|
|
2012-02-22 23:09:29 +01:00
|
|
|
color[0] = color[1] = color[2] = 0xdeadbeef;
|
|
|
|
count = 2;
|
|
|
|
status = GdipGetPathGradientSurroundColorsWithCount(grad, color, &count);
|
2012-02-29 22:23:38 +01:00
|
|
|
expect(Ok, status);
|
2012-02-22 23:09:29 +01:00
|
|
|
expect(2, count);
|
2012-02-29 22:23:38 +01:00
|
|
|
expect(0x00ff0000, color[0]);
|
|
|
|
expect(0x0000ff00, color[1]);
|
2012-02-22 23:09:29 +01:00
|
|
|
expect(0xdeadbeef, color[2]);
|
|
|
|
|
2012-02-29 21:56:55 +01:00
|
|
|
count = 1;
|
|
|
|
status = GdipSetPathGradientSurroundColorsWithCount(grad, color, &count);
|
2012-02-29 22:23:38 +01:00
|
|
|
expect(Ok, status);
|
2012-02-29 21:56:55 +01:00
|
|
|
expect(1, count);
|
|
|
|
|
2012-02-29 22:23:38 +01:00
|
|
|
count = 0;
|
|
|
|
status = GdipGetPathGradientSurroundColorCount(grad, &count);
|
|
|
|
expect(Ok, status);
|
|
|
|
expect(2, count);
|
|
|
|
|
2012-04-24 17:14:35 +02:00
|
|
|
/* If all colors are the same, count is set to 1. */
|
|
|
|
color[0] = color[1] = 0;
|
|
|
|
count = 2;
|
|
|
|
status = GdipSetPathGradientSurroundColorsWithCount(grad, color, &count);
|
|
|
|
expect(Ok, status);
|
|
|
|
expect(2, count);
|
|
|
|
|
|
|
|
color[0] = color[1] = color[2] = 0xdeadbeef;
|
|
|
|
count = 2;
|
|
|
|
status = GdipGetPathGradientSurroundColorsWithCount(grad, color, &count);
|
|
|
|
expect(Ok, status);
|
|
|
|
expect(1, count);
|
|
|
|
expect(0x00000000, color[0]);
|
|
|
|
expect(0x00000000, color[1]);
|
|
|
|
expect(0xdeadbeef, color[2]);
|
|
|
|
|
|
|
|
color[0] = color[1] = 0xff00ff00;
|
|
|
|
count = 2;
|
|
|
|
status = GdipSetPathGradientSurroundColorsWithCount(grad, color, &count);
|
|
|
|
expect(Ok, status);
|
|
|
|
expect(2, count);
|
|
|
|
|
|
|
|
color[0] = color[1] = color[2] = 0xdeadbeef;
|
|
|
|
count = 2;
|
|
|
|
status = GdipGetPathGradientSurroundColorsWithCount(grad, color, &count);
|
|
|
|
expect(Ok, status);
|
|
|
|
expect(1, count);
|
|
|
|
expect(0xff00ff00, color[0]);
|
|
|
|
expect(0xff00ff00, color[1]);
|
|
|
|
expect(0xdeadbeef, color[2]);
|
|
|
|
|
2012-02-29 21:56:55 +01:00
|
|
|
count = 0;
|
|
|
|
status = GdipSetPathGradientSurroundColorsWithCount(grad, color, &count);
|
2012-02-29 22:23:38 +01:00
|
|
|
expect(InvalidParameter, status);
|
2012-02-29 21:56:55 +01:00
|
|
|
expect(0, count);
|
|
|
|
|
2012-02-22 23:09:29 +01:00
|
|
|
GdipDeleteBrush((GpBrush*)grad);
|
|
|
|
|
|
|
|
status = GdipCreatePathGradient(getbounds_ptf, 3, WrapModeClamp, &grad);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
color[0] = color[1] = color[2] = 0xdeadbeef;
|
|
|
|
count = 3;
|
|
|
|
status = GdipGetPathGradientSurroundColorsWithCount(grad, color, &count);
|
2012-02-29 22:23:38 +01:00
|
|
|
expect(Ok, status);
|
|
|
|
expect(1, count);
|
|
|
|
expect(0xffffffff, color[0]);
|
|
|
|
expect(0xffffffff, color[1]);
|
|
|
|
expect(0xffffffff, color[2]);
|
2012-02-22 23:09:29 +01:00
|
|
|
|
|
|
|
color[0] = color[1] = color[2] = 0xdeadbeef;
|
|
|
|
count = 2;
|
|
|
|
status = GdipGetPathGradientSurroundColorsWithCount(grad, color, &count);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
expect(2, count);
|
|
|
|
expect(0xdeadbeef, color[0]);
|
|
|
|
expect(0xdeadbeef, color[1]);
|
|
|
|
expect(0xdeadbeef, color[2]);
|
|
|
|
|
2012-02-29 22:23:38 +01:00
|
|
|
count = 0;
|
|
|
|
status = GdipGetPathGradientSurroundColorCount(grad, &count);
|
|
|
|
expect(Ok, status);
|
|
|
|
expect(3, count);
|
|
|
|
|
2010-03-27 22:55:27 +01:00
|
|
|
GdipDeleteBrush((GpBrush*)grad);
|
|
|
|
}
|
|
|
|
|
2012-02-20 21:02:37 +01:00
|
|
|
static void test_pathgradientpath(void)
|
|
|
|
{
|
|
|
|
GpStatus status;
|
|
|
|
GpPath *path=NULL;
|
|
|
|
GpPathGradient *grad=NULL;
|
|
|
|
|
|
|
|
status = GdipCreatePathGradient(blendcount_ptf, 2, WrapModeClamp, &grad);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientPath(grad, NULL);
|
|
|
|
expect(NotImplemented, status);
|
|
|
|
|
|
|
|
status = GdipCreatePath(FillModeWinding, &path);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientPath(NULL, path);
|
|
|
|
expect(NotImplemented, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientPath(grad, path);
|
|
|
|
expect(NotImplemented, status);
|
|
|
|
|
|
|
|
status = GdipDeletePath(path);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
status = GdipDeleteBrush((GpBrush*)grad);
|
|
|
|
expect(Ok, status);
|
|
|
|
}
|
|
|
|
|
2012-02-20 22:04:07 +01:00
|
|
|
static void test_pathgradientcenterpoint(void)
|
|
|
|
{
|
|
|
|
static const GpPointF path_points[] = {{0,0}, {3,0}, {0,4}};
|
|
|
|
GpStatus status;
|
|
|
|
GpPathGradient *grad;
|
|
|
|
GpPointF point;
|
|
|
|
|
|
|
|
status = GdipCreatePathGradient(path_points+1, 2, WrapModeClamp, &grad);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientCenterPoint(NULL, &point);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientCenterPoint(grad, NULL);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientCenterPoint(grad, &point);
|
|
|
|
expect(Ok, status);
|
|
|
|
expectf(1.5, point.X);
|
|
|
|
expectf(2.0, point.Y);
|
|
|
|
|
|
|
|
status = GdipSetPathGradientCenterPoint(NULL, &point);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipSetPathGradientCenterPoint(grad, NULL);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
point.X = 10.0;
|
|
|
|
point.Y = 15.0;
|
|
|
|
status = GdipSetPathGradientCenterPoint(grad, &point);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
point.X = point.Y = -1;
|
|
|
|
status = GdipGetPathGradientCenterPoint(grad, &point);
|
|
|
|
expect(Ok, status);
|
|
|
|
expectf(10.0, point.X);
|
|
|
|
expectf(15.0, point.Y);
|
|
|
|
|
|
|
|
status = GdipDeleteBrush((GpBrush*)grad);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
status = GdipCreatePathGradient(path_points, 3, WrapModeClamp, &grad);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientCenterPoint(grad, &point);
|
|
|
|
expect(Ok, status);
|
|
|
|
todo_wine expectf(1.0, point.X);
|
|
|
|
todo_wine expectf(4.0/3.0, point.Y);
|
|
|
|
|
|
|
|
status = GdipDeleteBrush((GpBrush*)grad);
|
|
|
|
expect(Ok, status);
|
|
|
|
}
|
|
|
|
|
2012-04-20 08:40:12 +02:00
|
|
|
static void test_pathgradientpresetblend(void)
|
2012-03-31 19:38:29 +02:00
|
|
|
{
|
|
|
|
static const GpPointF path_points[] = {{0,0}, {3,0}, {0,4}};
|
|
|
|
GpStatus status;
|
|
|
|
GpPathGradient *grad;
|
|
|
|
INT count;
|
|
|
|
int i;
|
|
|
|
const REAL positions[5] = {0.0f, 0.2f, 0.5f, 0.8f, 1.0f};
|
|
|
|
const REAL two_positions[2] = {0.0f, 1.0f};
|
|
|
|
const ARGB colors[5] = {0xff0000ff, 0xff00ff00, 0xff00ffff, 0xffff0000, 0xffffffff};
|
|
|
|
REAL res_positions[6] = {0.3f, 0.0f, 0.0f, 0.0f, 0.0f};
|
|
|
|
ARGB res_colors[6] = {0xdeadbeef, 0, 0, 0, 0};
|
|
|
|
|
|
|
|
status = GdipCreatePathGradient(path_points+1, 2, WrapModeClamp, &grad);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientPresetBlendCount(NULL, &count);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientPresetBlendCount(grad, NULL);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientPresetBlendCount(grad, &count);
|
|
|
|
expect(Ok, status);
|
|
|
|
expect(0, count);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientPresetBlend(NULL, res_colors, res_positions, 1);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientPresetBlend(grad, NULL, res_positions, 1);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientPresetBlend(grad, res_colors, NULL, 1);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientPresetBlend(grad, res_colors, res_positions, 0);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientPresetBlend(grad, res_colors, res_positions, -1);
|
|
|
|
expect(OutOfMemory, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientPresetBlend(grad, res_colors, res_positions, 1);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientPresetBlend(grad, res_colors, res_positions, 2);
|
|
|
|
expect(GenericError, status);
|
|
|
|
|
|
|
|
status = GdipSetPathGradientPresetBlend(NULL, colors, positions, 5);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipSetPathGradientPresetBlend(grad, NULL, positions, 5);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
if (0)
|
|
|
|
{
|
|
|
|
/* crashes on windows xp */
|
|
|
|
status = GdipSetPathGradientPresetBlend(grad, colors, NULL, 5);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
}
|
|
|
|
|
|
|
|
status = GdipSetPathGradientPresetBlend(grad, colors, positions, 0);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipSetPathGradientPresetBlend(grad, colors, positions, -1);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipSetPathGradientPresetBlend(grad, colors, positions, 1);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
/* leave off the 0.0 position */
|
|
|
|
status = GdipSetPathGradientPresetBlend(grad, &colors[1], &positions[1], 4);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
/* leave off the 1.0 position */
|
|
|
|
status = GdipSetPathGradientPresetBlend(grad, colors, positions, 4);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipSetPathGradientPresetBlend(grad, colors, positions, 5);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientPresetBlendCount(grad, &count);
|
|
|
|
expect(Ok, status);
|
|
|
|
expect(5, count);
|
|
|
|
|
|
|
|
if (0)
|
|
|
|
{
|
|
|
|
/* Native GdipGetPathGradientPresetBlend seems to copy starting from
|
|
|
|
* the end of each array and do no bounds checking. This is so braindead
|
|
|
|
* I'm not going to copy it. */
|
|
|
|
|
|
|
|
res_colors[0] = 0xdeadbeef;
|
|
|
|
res_positions[0] = 0.3;
|
|
|
|
|
|
|
|
status = GdipGetPathGradientPresetBlend(grad, &res_colors[1], &res_positions[1], 4);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
expect(0xdeadbeef, res_colors[0]);
|
|
|
|
expectf(0.3, res_positions[0]);
|
|
|
|
|
|
|
|
for (i=1; i<5; i++)
|
|
|
|
{
|
|
|
|
expect(colors[i], res_colors[i]);
|
|
|
|
expectf(positions[i], res_positions[i]);
|
|
|
|
}
|
|
|
|
|
|
|
|
status = GdipGetPathGradientPresetBlend(grad, res_colors, res_positions, 6);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
for (i=0; i<5; i++)
|
|
|
|
{
|
|
|
|
expect(colors[i], res_colors[i+1]);
|
|
|
|
expectf(positions[i], res_positions[i+1]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
status = GdipGetPathGradientPresetBlend(grad, res_colors, res_positions, 5);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
for (i=0; i<5; i++)
|
|
|
|
{
|
|
|
|
expect(colors[i], res_colors[i]);
|
|
|
|
expectf(positions[i], res_positions[i]);
|
|
|
|
}
|
|
|
|
|
|
|
|
status = GdipGetPathGradientPresetBlend(grad, res_colors, res_positions, 0);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientPresetBlend(grad, res_colors, res_positions, -1);
|
|
|
|
expect(OutOfMemory, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientPresetBlend(grad, res_colors, res_positions, 1);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipSetPathGradientPresetBlend(grad, colors, two_positions, 2);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
status = GdipDeleteBrush((GpBrush*)grad);
|
|
|
|
expect(Ok, status);
|
|
|
|
}
|
|
|
|
|
2012-04-24 16:44:43 +02:00
|
|
|
static void test_pathgradientblend(void)
|
|
|
|
{
|
|
|
|
static const GpPointF path_points[] = {{0,0}, {3,0}, {0,4}};
|
|
|
|
GpPathGradient *brush;
|
|
|
|
GpStatus status;
|
|
|
|
INT count, i;
|
|
|
|
const REAL factors[5] = {0.0f, 0.1f, 0.5f, 0.9f, 1.0f};
|
|
|
|
const REAL positions[5] = {0.0f, 0.2f, 0.5f, 0.8f, 1.0f};
|
|
|
|
REAL res_factors[6] = {0.3f, 0.0f, 0.0f, 0.0f, 0.0f};
|
|
|
|
REAL res_positions[6] = {0.3f, 0.0f, 0.0f, 0.0f, 0.0f};
|
|
|
|
|
|
|
|
status = GdipCreatePathGradient(path_points, 3, WrapModeClamp, &brush);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientBlendCount(NULL, &count);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientBlendCount(brush, NULL);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientBlendCount(brush, &count);
|
|
|
|
expect(Ok, status);
|
|
|
|
expect(1, count);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientBlend(NULL, res_factors, res_positions, 1);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientBlend(brush, NULL, res_positions, 1);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientBlend(brush, res_factors, NULL, 1);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientBlend(brush, res_factors, res_positions, 0);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientBlend(brush, res_factors, res_positions, -1);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientBlend(brush, res_factors, res_positions, 1);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientBlend(brush, res_factors, res_positions, 2);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
status = GdipSetPathGradientBlend(NULL, factors, positions, 5);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipSetPathGradientBlend(brush, NULL, positions, 5);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipSetPathGradientBlend(brush, factors, NULL, 5);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipSetPathGradientBlend(brush, factors, positions, 0);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipSetPathGradientBlend(brush, factors, positions, -1);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
/* leave off the 0.0 position */
|
|
|
|
status = GdipSetPathGradientBlend(brush, &factors[1], &positions[1], 4);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
/* leave off the 1.0 position */
|
|
|
|
status = GdipSetPathGradientBlend(brush, factors, positions, 4);
|
|
|
|
expect(InvalidParameter, status);
|
|
|
|
|
|
|
|
status = GdipSetPathGradientBlend(brush, factors, positions, 5);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientBlendCount(brush, &count);
|
|
|
|
expect(Ok, status);
|
|
|
|
expect(5, count);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientBlend(brush, res_factors, res_positions, 4);
|
|
|
|
expect(InsufficientBuffer, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientBlend(brush, res_factors, res_positions, 5);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
for (i=0; i<5; i++)
|
|
|
|
{
|
|
|
|
expectf(factors[i], res_factors[i]);
|
|
|
|
expectf(positions[i], res_positions[i]);
|
|
|
|
}
|
|
|
|
|
|
|
|
status = GdipGetPathGradientBlend(brush, res_factors, res_positions, 6);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
status = GdipSetPathGradientBlend(brush, factors, positions, 1);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientBlendCount(brush, &count);
|
|
|
|
expect(Ok, status);
|
|
|
|
expect(1, count);
|
|
|
|
|
|
|
|
status = GdipGetPathGradientBlend(brush, res_factors, res_positions, 1);
|
|
|
|
expect(Ok, status);
|
|
|
|
|
|
|
|
status = GdipDeleteBrush((GpBrush*)brush);
|
|
|
|
expect(Ok, status);
|
|
|
|
}
|
|
|
|
|
2007-06-15 01:09:14 +02:00
|
|
|
START_TEST(brush)
|
|
|
|
{
|
|
|
|
struct GdiplusStartupInput gdiplusStartupInput;
|
|
|
|
ULONG_PTR gdiplusToken;
|
|
|
|
|
|
|
|
gdiplusStartupInput.GdiplusVersion = 1;
|
|
|
|
gdiplusStartupInput.DebugEventCallback = NULL;
|
|
|
|
gdiplusStartupInput.SuppressBackgroundThread = 0;
|
|
|
|
gdiplusStartupInput.SuppressExternalCodecs = 0;
|
|
|
|
|
|
|
|
GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
|
|
|
|
|
|
|
|
test_constructor_destructor();
|
|
|
|
test_type();
|
2008-07-21 21:30:39 +02:00
|
|
|
test_gradientblendcount();
|
2008-07-21 21:30:50 +02:00
|
|
|
test_getblend();
|
2008-07-23 00:07:28 +02:00
|
|
|
test_getbounds();
|
2008-09-02 22:25:39 +02:00
|
|
|
test_getgamma();
|
2008-09-25 06:54:24 +02:00
|
|
|
test_transform();
|
2008-10-21 17:39:21 +02:00
|
|
|
test_texturewrap();
|
2009-02-09 14:58:59 +01:00
|
|
|
test_gradientgetrect();
|
2009-04-29 00:30:39 +02:00
|
|
|
test_lineblend();
|
2009-07-11 18:49:44 +02:00
|
|
|
test_linelinearblend();
|
2010-03-27 22:55:27 +01:00
|
|
|
test_gradientsurroundcolorcount();
|
2012-02-20 21:02:37 +01:00
|
|
|
test_pathgradientpath();
|
2012-02-20 22:04:07 +01:00
|
|
|
test_pathgradientcenterpoint();
|
2012-03-31 19:38:29 +02:00
|
|
|
test_pathgradientpresetblend();
|
2012-04-24 16:44:43 +02:00
|
|
|
test_pathgradientblend();
|
2007-06-15 01:09:14 +02:00
|
|
|
|
|
|
|
GdiplusShutdown(gdiplusToken);
|
|
|
|
}
|