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) 86 skip(
"Cannot perform path comparisons due to failure to retrieve path.\n");
91 ok(
size == expected_size,
"Path size %d does not match expected size %d\n",
98 skip(
"Cannot perform path comparisons due to failure to retrieve path.\n");
102 numskip = expected_size ?
expected[eidx].wine_only_entries_preceding : 0;
103 while (
idx <
size && eidx < expected_size){
114 ok(
match,
"Expected #%d: %s (%.1f,%.1f) but got %s (%.1f,%.1f)\n", eidx,
120 if (
match || !numskip--)
121 numskip =
expected[++eidx].wine_only_entries_preceding;
136 ok(
path !=
NULL,
"Expected path to be initialized\n");
168 (
data.Points[1].X == 100.0) && (
data.Points[1].Y == 50.0),
TRUE);
195 for(
i = 0;
i < 9;
i ++){
196 line2_points[
i].
X =
i * 5.0 * (
REAL)(
i % 2);
197 line2_points[
i].
Y = 50.0 -
i * 5.0;
296 for(
i = 0;
i < 10;
i ++){
297 line2_points[
i].
X = 200.0 +
i * 50.0 * (
i % 2);
298 line2_points[
i].
Y = 200.0 +
i * 50.0 * !(
i % 2);
351 line2_points[2].
X = 2 * line2_points[1].
X - line2_points[0].
X;
352 line2_points[2].
Y = 2 * line2_points[1].
Y - line2_points[0].
Y;
654 rects[0].
Width = 100.0;
658 rects[1].
Width = 120.0;
868 for(
i = 0;
i < 7;
i++){
870 pts[
i].
Y = 50.0 -
i * 5.0;
GpStatus WINGDIPAPI GdipGetPathData(GpPath *path, GpPathData *pathData)
static path_test_t widenline_dash_path[]
static path_test_t addpie_path2[]
static path_test_t flattenarc_path[]
static const WCHAR path2[]
static path_test_t flattenquater_path[]
static void test_isvisible(void)
GpStatus WINGDIPAPI GdipAddPathPolygon(GpPath *path, GDIPCONST GpPointF *points, INT count)
static path_test_t widenline_path[]
GpStatus WINGDIPAPI GdipCreateMatrix2(REAL m11, REAL m12, REAL m21, REAL m22, REAL dx, REAL dy, GpMatrix **matrix)
static void test_linei(void)
int wine_only_entries_preceding
static path_test_t addcurve_path2[]
static void test_arc(void)
char * strcat(char *DstString, const char *SrcString)
GpStatus WINGDIPAPI GdipAddPathClosedCurve2(GpPath *path, GDIPCONST GpPointF *points, INT count, REAL tension)
static void test_addclosedcurve(void)
HDC WINAPI GetDC(_In_opt_ HWND)
static void test_reverse(void)
GpStatus WINGDIPAPI GdipAddPathRectangles(GpPath *path, GDIPCONST GpRectF *rects, INT count)
GLsizei const GLchar ** path
static void test_addcurve(void)
GpStatus WINGDIPAPI GdipGetPathWorldBounds(GpPath *path, GpRectF *bounds, GDIPCONST GpMatrix *matrix, GDIPCONST GpPen *pen)
GpStatus WINGDIPAPI GdipTransformPath(GpPath *path, GpMatrix *matrix)
GLuint GLuint GLsizei count
static void test_addpie(void)
static path_test_t reverse_path[]
GpStatus WINGDIPAPI GdipCreateMatrix(GpMatrix **matrix)
GLsizei GLenum GLenum * types
static void test_ellipse(void)
void WINGDIPAPI GdipFree(void *ptr)
GpStatus WINGDIPAPI GdipSetClipRect(GpGraphics *graphics, REAL x, REAL y, REAL width, REAL height, CombineMode mode)
GpStatus WINGDIPAPI GdipGetPathLastPoint(GpPath *path, GpPointF *lastPoint)
#define expectf(expected, got)
GpStatus WINGDIPAPI GdipFlattenPath(GpPath *path, GpMatrix *matrix, REAL flatness)
static void test_lastpoint(void)
static void test_polygon(void)
GpStatus WINGDIPAPI GdipDeletePath(GpPath *path)
static void ok_path(GpPath *path, const path_test_t *expected, INT expected_size, BOOL todo_size)
static path_test_t poly_path[]
GpStatus WINGDIPAPI GdipGetPathTypes(GpPath *path, BYTE *types, INT count)
GpStatus WINGDIPAPI GdipAddPathArc(GpPath *path, REAL x1, REAL y1, REAL x2, REAL y2, REAL startAngle, REAL sweepAngle)
static void test_empty_rect(void)
GpStatus WINGDIPAPI GdipDeleteGraphics(GpGraphics *graphics)
static path_test_t ellipse_path[]
static void test_widen(void)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
static void test_getpathdata(void)
GpStatus WINGDIPAPI GdipAddPathLine2(GpPath *path, GDIPCONST GpPointF *points, INT count)
static path_test_t flattenline_path[]
static path_test_t pathpath_path[]
GpStatus WINGDIPAPI GdipGetPathPoints(GpPath *path, GpPointF *points, INT count)
static const WCHAR path1[]
static path_test_t addpie_path[]
static path_test_t rect_path[]
GpStatus WINGDIPAPI GdipAddPathLineI(GpPath *path, INT x1, INT y1, INT x2, INT y2)
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define POINT_TYPE_MAX_LEN
GpStatus WINGDIPAPI GdipGetPointCount(GpPath *path, INT *count)
static void test_pathpath(void)
#define todo_wine_if(is_todo)
void WINAPI GdiplusShutdown(ULONG_PTR)
Status WINAPI GdiplusStartup(ULONG_PTR *token, const struct GdiplusStartupInput *input, struct GdiplusStartupOutput *output)
GpStatus WINGDIPAPI GdipClosePathFigure(GpPath *path)
GpStatus WINGDIPAPI GdipAddPathRectangle(GpPath *path, REAL x, REAL y, REAL width, REAL height)
static path_test_t widenline_wide_path[]
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GpStatus WINGDIPAPI GdipAddPathPath(GpPath *path, GDIPCONST GpPath *addingPath, BOOL connect)
static path_test_t line2_path[]
static ULONG_PTR gdiplusToken
GLsizei const GLfloat * points
GpStatus WINGDIPAPI GdipDeleteMatrix(GpMatrix *matrix)
static path_test_t addclosedcurve_path[]
GpStatus WINGDIPAPI GdipAddPathCurve2(GpPath *path, GDIPCONST GpPointF *points, INT count, REAL tension)
GpStatus WINGDIPAPI GdipCreatePath(GpFillMode fill, GpPath **path)
GpStatus WINGDIPAPI GdipScaleMatrix(GpMatrix *matrix, REAL scaleX, REAL scaleY, GpMatrixOrder order)
GpStatus WINGDIPAPI GdipSetPenEndCap(GpPen *pen, GpLineCap cap)
_Check_return_ _CRT_JIT_INTRINSIC double __cdecl fabs(_In_ double x)
static void test_rect(void)
static void test_flatten(void)
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
static void test_line2(void)
int CDECL _controlfp_s(unsigned int *cur, unsigned int newval, unsigned int mask)
GpStatus WINGDIPAPI GdipAddPathLine(GpPath *path, REAL x1, REAL y1, REAL x2, REAL y2)
static path_test_t arc_path[]
static path_test_t flattenellipse_path[]
GpStatus WINGDIPAPI GdipResetPath(GpPath *path)
GpStatus WINGDIPAPI GdipCreateFromHDC(HDC hdc, GpGraphics **graphics)
GpStatus WINGDIPAPI GdipIsVisiblePathPoint(GpPath *path, REAL x, REAL y, GpGraphics *graphics, BOOL *result)
GpStatus WINGDIPAPI GdipWidenPath(GpPath *path, GpPen *pen, GpMatrix *matrix, REAL flatness)
#define expect(expected, got)
static void stringify_point_type(PathPointType type, char *name)
static void test_constructor_destructor(void)
static path_test_t linei_path[]
GpStatus WINGDIPAPI GdipAddPathCurve3(GpPath *path, GDIPCONST GpPointF *points, INT count, INT offset, INT nseg, REAL tension)
#define GetProcAddress(x, y)
void *WINGDIPAPI GdipAlloc(SIZE_T size)
static path_test_t addcurve_path[]
GpStatus WINGDIPAPI GdipDeletePen(GpPen *pen)
GLuint GLuint GLsizei GLenum type
GpStatus WINGDIPAPI GdipAddPathPie(GpPath *path, REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
static SERVICE_STATUS status
GpStatus WINGDIPAPI GdipAddPathEllipse(GpPath *path, REAL x, REAL y, REAL width, REAL height)
GpStatus WINGDIPAPI GdipCreatePen1(ARGB color, REAL width, GpUnit unit, GpPen **pen)
static path_test_t addpie_path3[]
#define HeapFree(x, y, z)
static void test_worldbounds(void)
GpStatus WINGDIPAPI GdipReversePath(GpPath *path)
GpStatus WINGDIPAPI GdipSetPenDashStyle(GpPen *pen, GpDashStyle dash)
static path_test_t addcurve_path3[]
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *