26#define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got)
27#define expectf(expected, got) ok(fabs(expected - got) < 2.0, "Expected %.2f, got %.2f\n", expected, got)
28#define POINT_TYPE_MAX_LEN (75)
49 type &= ~PathPointTypePathTypeMask;
78#define ok_path(a,b,c,d) _ok_path_fudge(a,b,c,d,1.0,__LINE__)
79#define ok_path_fudge(a,b,c,d,e) _ok_path_fudge(a,b,c,d,e,__LINE__)
89 skip(
"Cannot perform path comparisons due to failure to retrieve path.\n");
94 ok_(__FILE__,
line)(
size == expected_size,
"Path size %d does not match expected size %d\n",
101 skip(
"Cannot perform path comparisons due to failure to retrieve path.\n");
105 numskip = expected_size ?
expected[eidx].wine_only_entries_preceding : 0;
106 while (
idx <
size && eidx < expected_size){
117 ok_(__FILE__,
line)(
match,
"Expected #%d: %s (%.6f,%.6f) but got %s (%.6f,%.6f)\n", eidx,
123 if (
match || !numskip--)
124 numskip =
expected[++eidx].wine_only_entries_preceding;
139 ok(
path !=
NULL,
"Expected path to be initialized\n");
171 (
data.Points[1].X == 100.0) && (
data.Points[1].Y == 50.0),
TRUE);
186 PointF test_line_points[] = {{1.0,1.0}, {2.0,1.0}, {2.0,2.0}};
189 PointF test_bez_points[] = {{1.0,1.0}, {2.0,1.0}, {3.0,1.0}, {4.0,1.0},
190 {5.0,1.0}, {6.0,1.0}, {7.0,1.0}};
209 path = (
void *)0xdeadbeef;
213 if(
path &&
path != (
void *)0xdeadbeef)
216 path = (
void *)0xdeadbeef;
220 if(
path &&
path != (
void *)0xdeadbeef)
223 path = (
void *)0xdeadbeef;
226 ok(
path == (
void *)0xdeadbeef,
"Expected %p, got %p\n", (
void *)0xdeadbeef,
path);
227 if(
path &&
path != (
void *)0xdeadbeef)
230 path = (
void *)0xdeadbeef;
233 ok(
path == (
void *)0xdeadbeef,
"Expected %p, got %p\n", (
void *)0xdeadbeef,
path);
234 if(
path &&
path != (
void *)0xdeadbeef)
249 test_line_points[1].
X = test_line_points[0].
X;
250 test_line_points[1].
Y = test_line_points[0].
Y;
277 for(
i = 2;
i <= 7;
i++) {
278 expect_count = (
i % 3 == 1) ?
i : 0;
307 for(
i = 0;
i < 9;
i ++){
308 line2_points[
i].
X =
i * 5.0 * (
REAL)(
i % 2);
309 line2_points[
i].
Y = 50.0 -
i * 5.0;
382 PointF bezier_points1[] = {{10.0,10.0}, {20.0,10.0}, {20.0,20.0}, {30.0,20.0}};
383 PointF bezier_points2[] = {{30.0,20.0}, {40.0,20.0}, {40.0,30.0}, {50.0,30.0}};
384 PointF bezier_points3[] = {{50.0,10.0}, {60.0,10.0}, {60.0,20.0}, {70.0,20.0}};
509 for(
i = 0;
i < 10;
i ++){
510 line2_points[
i].
X = 200.0 +
i * 50.0 * (
i % 2);
511 line2_points[
i].
Y = 200.0 +
i * 50.0 * !(
i % 2);
564 line2_points[2].
X = 2 * line2_points[1].
X - line2_points[0].
X;
565 line2_points[2].
Y = 2 * line2_points[1].
Y - line2_points[0].
Y;
870 rects[0].
Width = 100.0;
874 rects[1].
Width = 120.0;
1152 for(
i = 0;
i < 7;
i++){
1153 pts[
i].
X =
i * 5.0 * (
REAL)(
i % 2);
1154 pts[
i].
Y = 50.0 -
i * 5.0;
1914 ok(
status ==
Ok,
"Failed to set middle inset inadjustable cap, %d\n",
status);
2010 ok(graphics !=
NULL,
"Expected the graphics context to be initialized.\n");
2020 ok(pen !=
NULL,
"Expected pen to be initialized\n");
#define GetProcAddress(x, y)
GpStatus WINGDIPAPI GdipCreateAdjustableArrowCap(REAL height, REAL width, BOOL fill, GpAdjustableArrowCap **cap)
GpStatus WINGDIPAPI GdipSetAdjustableArrowCapMiddleInset(GpAdjustableArrowCap *cap, REAL middle)
GpStatus WINGDIPAPI GdipCreateFromHDC(HDC hdc, GpGraphics **graphics)
GpStatus WINGDIPAPI GdipDeleteGraphics(GpGraphics *graphics)
GpStatus WINGDIPAPI GdipScaleWorldTransform(GpGraphics *graphics, REAL sx, REAL sy, GpMatrixOrder order)
GpStatus WINGDIPAPI GdipTranslateWorldTransform(GpGraphics *graphics, REAL dx, REAL dy, GpMatrixOrder order)
GpStatus WINGDIPAPI GdipSetClipRect(GpGraphics *graphics, REAL x, REAL y, REAL width, REAL height, CombineMode mode)
GpStatus WINGDIPAPI GdipSetPageUnit(GpGraphics *graphics, GpUnit unit)
GpStatus WINGDIPAPI GdipResetWorldTransform(GpGraphics *graphics)
GpStatus WINGDIPAPI GdipAddPathCurve3(GpPath *path, GDIPCONST GpPointF *points, INT count, INT offset, INT nseg, REAL tension)
GpStatus WINGDIPAPI GdipAddPathRectangleI(GpPath *path, INT x, INT y, INT width, INT height)
GpStatus WINGDIPAPI GdipCreatePath(GpFillMode fill, GpPath **path)
GpStatus WINGDIPAPI GdipDeletePath(GpPath *path)
GpStatus WINGDIPAPI GdipAddPathPie(GpPath *path, REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
GpStatus WINGDIPAPI GdipAddPathLine(GpPath *path, REAL x1, REAL y1, REAL x2, REAL y2)
GpStatus WINGDIPAPI GdipAddPathRectangle(GpPath *path, REAL x, REAL y, REAL width, REAL height)
GpStatus WINGDIPAPI GdipAddPathCurve(GpPath *path, GDIPCONST GpPointF *points, INT count)
GpStatus WINGDIPAPI GdipIsOutlineVisiblePathPoint(GpPath *path, REAL x, REAL y, GpPen *pen, GpGraphics *graphics, BOOL *result)
GpStatus WINGDIPAPI GdipGetPathData(GpPath *path, GpPathData *pathData)
GpStatus WINGDIPAPI GdipResetPath(GpPath *path)
GpStatus WINGDIPAPI GdipCreatePath2(GDIPCONST GpPointF *points, GDIPCONST BYTE *types, INT count, GpFillMode fill, GpPath **path)
GpStatus WINGDIPAPI GdipAddPathLine2(GpPath *path, GDIPCONST GpPointF *points, INT count)
GpStatus WINGDIPAPI GdipFlattenPath(GpPath *path, GpMatrix *matrix, REAL flatness)
GpStatus WINGDIPAPI GdipGetPathLastPoint(GpPath *path, GpPointF *lastPoint)
GpStatus WINGDIPAPI GdipClosePathFigure(GpPath *path)
GpStatus WINGDIPAPI GdipAddPathPolygon(GpPath *path, GDIPCONST GpPointF *points, INT count)
GpStatus WINGDIPAPI GdipTransformPath(GpPath *path, GpMatrix *matrix)
GpStatus WINGDIPAPI GdipAddPathLineI(GpPath *path, INT x1, INT y1, INT x2, INT y2)
GpStatus WINGDIPAPI GdipAddPathPath(GpPath *path, GDIPCONST GpPath *addingPath, BOOL connect)
GpStatus WINGDIPAPI GdipWidenPath(GpPath *path, GpPen *pen, GpMatrix *matrix, REAL flatness)
GpStatus WINGDIPAPI GdipAddPathBeziers(GpPath *path, GDIPCONST GpPointF *points, INT count)
GpStatus WINGDIPAPI GdipGetPathWorldBounds(GpPath *path, GpRectF *bounds, GDIPCONST GpMatrix *matrix, GDIPCONST GpPen *pen)
GpStatus WINGDIPAPI GdipAddPathRectangles(GpPath *path, GDIPCONST GpRectF *rects, INT count)
GpStatus WINGDIPAPI GdipIsVisiblePathPoint(GpPath *path, REAL x, REAL y, GpGraphics *graphics, BOOL *result)
GpStatus WINGDIPAPI GdipAddPathCurve2(GpPath *path, GDIPCONST GpPointF *points, INT count, REAL tension)
GpStatus WINGDIPAPI GdipGetPointCount(GpPath *path, INT *count)
GpStatus WINGDIPAPI GdipGetPathPoints(GpPath *path, GpPointF *points, INT count)
GpStatus WINGDIPAPI GdipAddPathBezier(GpPath *path, REAL x1, REAL y1, REAL x2, REAL y2, REAL x3, REAL y3, REAL x4, REAL y4)
GpStatus WINGDIPAPI GdipReversePath(GpPath *path)
GpStatus WINGDIPAPI GdipGetPathTypes(GpPath *path, BYTE *types, INT count)
GpStatus WINGDIPAPI GdipStartPathFigure(GpPath *path)
GpStatus WINGDIPAPI GdipAddPathArc(GpPath *path, REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
GpStatus WINGDIPAPI GdipAddPathEllipse(GpPath *path, REAL x, REAL y, REAL width, REAL height)
GpStatus WINGDIPAPI GdipAddPathClosedCurve(GpPath *path, GDIPCONST GpPointF *points, INT count)
GpStatus WINGDIPAPI GdipAddPathClosedCurve2(GpPath *path, GDIPCONST GpPointF *points, INT count, REAL tension)
GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT width, INT height, INT stride, PixelFormat format, BYTE *scan0, GpBitmap **bitmap)
GpStatus WINGDIPAPI GdipGetImageGraphicsContext(GpImage *image, GpGraphics **graphics)
GpStatus WINGDIPAPI GdipScaleMatrix(GpMatrix *matrix, REAL scaleX, REAL scaleY, GpMatrixOrder order)
GpStatus WINGDIPAPI GdipCreateMatrix2(REAL m11, REAL m12, REAL m21, REAL m22, REAL dx, REAL dy, GpMatrix **matrix)
GpStatus WINGDIPAPI GdipDeleteMatrix(GpMatrix *matrix)
GpStatus WINGDIPAPI GdipCreateMatrix(GpMatrix **matrix)
GpStatus WINGDIPAPI GdipCreatePen1(ARGB color, REAL width, GpUnit unit, GpPen **pen)
GpStatus WINGDIPAPI GdipDeletePen(GpPen *pen)
GpStatus WINGDIPAPI GdipSetPenDashStyle(GpPen *pen, GpDashStyle dash)
GpStatus WINGDIPAPI GdipSetPenWidth(GpPen *pen, REAL width)
GpStatus WINGDIPAPI GdipSetPenCustomEndCap(GpPen *pen, GpCustomLineCap *customCap)
GpStatus WINGDIPAPI GdipSetPenEndCap(GpPen *pen, GpLineCap cap)
GpStatus WINGDIPAPI GdipSetPenStartCap(GpPen *pen, GpLineCap cap)
GpStatus WINGDIPAPI GdipSetPenCustomStartCap(GpPen *pen, GpCustomLineCap *customCap)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
_ACRTIMP errno_t __cdecl _controlfp_s(unsigned int *, unsigned int, unsigned int)
_ACRTIMP double __cdecl fabs(double)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
void WINGDIPAPI GdipFree(void *ptr)
Status WINAPI GdiplusStartup(ULONG_PTR *token, const struct GdiplusStartupInput *input, struct GdiplusStartupOutput *output)
void *WINGDIPAPI GdipAlloc(SIZE_T size)
@ PathPointTypePathMarker
@ PathPointTypePathTypeMask
@ PathPointTypeCloseSubpath
void WINAPI GdiplusShutdown(ULONG_PTR)
GLuint GLuint GLsizei count
GLuint GLuint GLsizei GLenum type
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
GLsizei const GLfloat * points
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define todo_wine_if(is_todo)
static void stringify_point_type(PathPointType type, char *name)
static void test_addclosedcurve(void)
static path_test_t widenline_capdiamondanchor_path[]
static void test_is_outline_visible_path_point(void)
static void test_createpath2(void)
static path_test_t linei_path[]
static path_test_t ellipse_path[]
#define POINT_TYPE_MAX_LEN
static path_test_t widenline_capround_path[]
static path_test_t bezier_path[]
static path_test_t pathpath_path[]
static path_test_t widenline_capsquareanchor_multifigure_path[]
static void test_addcurve(void)
static path_test_t addclosedcurve_path_default_tension[]
#define ok_path_fudge(a, b, c, d, e)
static path_test_t widenline_unit_path[]
static void test_empty_rect(void)
static path_test_t widenline_capsquareanchor_thin_path[]
static path_test_t widenline_capsquareanchor_dashed_path[]
static path_test_t widenline_thin_dash_path[]
static void test_ellipse(void)
static void test_beziers(void)
static path_test_t poly_path[]
static void test_bezier(void)
static path_test_t line2_path[]
static void test_line2(void)
static path_test_t flattenarc_path[]
static path_test_t widenline_path[]
static void _ok_path_fudge(GpPath *path, const path_test_t *expected, INT expected_size, BOOL todo_size, REAL fudge, int line)
static path_test_t arc_path[]
static void test_linei(void)
static path_test_t flattenellipse_path[]
static path_test_t addcurve_path2[]
static path_test_t rect_line_path[]
static path_test_t flattenquater_path[]
static void test_reverse(void)
static path_test_t addcurve_path4[]
static path_test_t addcurve_path[]
#define expect(expected, got)
static path_test_t addcurve_path_default_tension[]
static void test_isvisible(void)
static void test_pathpath(void)
static void test_widen(void)
static path_test_t addcurve_path3[]
static void test_widen_cap(void)
static void test_polygon(void)
static path_test_t widenline_capsquareanchor_path[]
static void test_getpathdata(void)
#define ok_path(a, b, c, d)
static path_test_t addcurve_path5[]
static path_test_t addpie_path2[]
static path_test_t addclosedcurve_path[]
static void test_rect_line(void)
static void test_lastpoint(void)
static path_test_t widenline_caparrowanchor_path[]
static path_test_t widenline_dash_path[]
#define expectf(expected, got)
static path_test_t arc_path2[]
static path_test_t reverse_path[]
static path_test_t widenline_captriangle_path[]
static void test_addpie(void)
static path_test_t rect_path[]
static path_test_t widenline_caproundanchor_path[]
static path_test_t widenline_capflat_path[]
static path_test_t widenline_customarrow_multifigure_path[]
static void test_flatten(void)
static path_test_t widenline_wide_path[]
static void test_worldbounds(void)
static void test_constructor_destructor(void)
static path_test_t addpie_path3[]
static path_test_t addpie_path[]
static void test_rect(void)
static void test_arc(void)
static path_test_t flattenline_path[]
static path_test_t widenline_capsquare_path[]
static const WCHAR path1[]
static const WCHAR path2[]
int wine_only_entries_preceding
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HDC WINAPI GetDC(_In_opt_ HWND)