28#define expect(expected, got) ok((got) == (expected), "Expected %d, got %d\n", (INT)(expected), (INT)(got))
29#define expectf_(expected, got, precision) ok(fabs((expected) - (got)) <= (precision), "Expected %f, got %f\n", (expected), (got))
30#define expectf(expected, got) expectf_((expected), (got), 0.001)
63 ok(0,
"Unsupported unit: %d\n",
unit);
85 ok(0,
"Unsupported unit: %d\n",
unit);
227 state_a = state_b = state_c = 0xdeadbeef;
416 ok(
hdc !=
NULL,
"Expected HDC to be initialized\n");
420 ok(graphics !=
NULL,
"Expected graphics to be initialized\n");
487 ok(
hdc !=
NULL,
"Expected HDC to be initialized\n");
491 ok(graphics !=
NULL,
"Expected graphics to be initialized\n");
539 ok(
hdc !=
NULL,
"Expected HDC to be initialized\n");
543 ok(graphics !=
NULL,
"Expected graphics to be initialized\n");
547 ok(pen !=
NULL,
"Expected pen to be initialized\n");
583 ok(
hdc !=
NULL,
"Expected HDC to be initialized\n");
587 ok(graphics !=
NULL,
"Expected graphics to be initialized\n");
591 ok(pen !=
NULL,
"Expected pen to be initialized\n");
623 REAL defClip[] = {5, 10, 15, 20};
624 REAL elems[6], defTrans[] = {1, 2, 3, 4, 5, 6};
633 UINT contrast, defContrast = 5;
640 ok(
hdc !=
NULL,
"Expected HDC to be initialized\n");
644 ok(graphics !=
NULL,
"Expected graphics to be initialized\n");
684 ok(defCompmode == compmode,
"Expected Compositing Mode to be restored to %d, got %d\n", defCompmode, compmode);
687 ok(defCompqual == compqual,
"Expected Compositing Quality to be restored to %d, got %d\n", defCompqual, compqual);
690 ok(defInterp ==
interp,
"Expected Interpolation Mode to be restored to %d, got %d\n", defInterp,
interp);
693 ok(
fabs(defScale -
scale) < 0.0001,
"Expected Page Scale to be restored to %f, got %f\n", defScale,
scale);
696 ok(defUnit ==
unit,
"Expected Page Unit to be restored to %d, got %d\n", defUnit,
unit);
699 ok(defOffsetmode == offsetmode,
"Expected Pixel Offset Mode to be restored to %d, got %d\n", defOffsetmode, offsetmode);
702 ok(defSmoothmode == smoothmode,
"Expected Smoothing Mode to be restored to %d, got %d\n", defSmoothmode, smoothmode);
705 ok(defContrast == contrast,
"Expected Text Contrast to be restored to %d, got %d\n", defContrast, contrast);
709 ok(defTexthint == texthint,
"Expected Text Hint to be restored to %d, got %d\n", defTexthint, texthint);
741 ok(
fabs(defTrans[0] - elems[0]) < 0.0001 &&
742 fabs(defTrans[1] - elems[1]) < 0.0001 &&
743 fabs(defTrans[2] - elems[2]) < 0.0001 &&
744 fabs(defTrans[3] - elems[3]) < 0.0001 &&
745 fabs(defTrans[4] - elems[4]) < 0.0001 &&
746 fabs(defTrans[5] - elems[5]) < 0.0001,
747 "Expected World Transform Matrix to be restored to [%f, %f, %f, %f, %f, %f], got [%f, %f, %f, %f, %f, %f]\n",
748 defTrans[0], defTrans[1], defTrans[2], defTrans[3], defTrans[4], defTrans[5],
749 elems[0], elems[1], elems[2], elems[3], elems[4], elems[5]);
775 ok(
fabs(defClip[0] - clip.
X) < 0.0001 &&
776 fabs(defClip[1] - clip.
Y) < 0.0001 &&
777 fabs(defClip[2] - clip.
Width) < 0.0001 &&
779 "Expected Clipping Rectangle to be restored to [%f, %f, %f, %f], got [%f, %f, %f, %f]\n",
780 defClip[0], defClip[1], defClip[2], defClip[3],
825 ok(
hdc !=
NULL,
"Expected HDC to be initialized\n");
829 ok(graphics !=
NULL,
"Expected graphics to be initialized\n");
833 ok(pen !=
NULL,
"Expected pen to be initialized\n");
873 ok(
hdc !=
NULL,
"Expected HDC to be initialized\n");
877 ok(graphics !=
NULL,
"Expected graphics to be initialized\n");
881 ok(pen !=
NULL,
"Expected pen to be initialized\n");
953 ok(
hdc !=
NULL,
"Expected HDC to be initialized\n");
957 ok(graphics !=
NULL,
"Expected graphics to be initialized\n");
961 ok(pen !=
NULL,
"Expected pen to be initialized\n");
1033 ok(
hdc !=
NULL,
"Expected HDC to be initialized\n");
1037 ok(graphics !=
NULL,
"Expected graphics to be initialized\n");
1041 ok(pen !=
NULL,
"Expected pen to be initialized\n");
1100 ok(
hdc !=
NULL,
"Expected HDC to be initialized\n");
1104 ok(graphics !=
NULL,
"Expected graphics to be initialized\n");
1108 ok(pen !=
NULL,
"Expected pen to be initialized\n");
1167 ok(
hdc !=
NULL,
"Expected HDC to be initialized\n");
1171 ok(graphics !=
NULL,
"Expected graphics to be initialized\n");
1175 ok(pen !=
NULL,
"Expected pen to be initialized\n");
1228 ok(
hdc !=
NULL,
"Expected HDC to be initialized\n");
1232 ok(graphics !=
NULL,
"Expected graphics to be initialized\n");
1236 ok(pen !=
NULL,
"Expected pen to be initialized\n");
1279 ok(
hdc !=
NULL,
"Expected HDC to be initialized\n");
1283 ok(graphics !=
NULL,
"Expected graphics to be initialized\n");
1287 ok(pen !=
NULL,
"Expected pen to be initialized\n");
1322 memset(rbmi, 0,
sizeof(rbmi));
1331 ok(
NULL != bm,
"Expected bitmap to be initialized\n");
1342 status =
GdipDrawImagePointsRect(graphics, (
GpImage*)bm, ptf, 4, 0, 0, 10, 10,
UnitPixel,
NULL,
NULL,
NULL);
1344 status =
GdipDrawImagePointsRect(graphics, (
GpImage*)bm, ptf, 2, 0, 0, 10, 10,
UnitPixel,
NULL,
NULL,
NULL);
1346 status =
GdipDrawImagePointsRect(graphics, (
GpImage*)bm, ptf, 3, 0, 0, 10, 10,
UnitPixel,
NULL,
NULL,
NULL);
1348 status =
GdipDrawImagePointsRect(graphics,
NULL, ptf, 3, 0, 0, 10, 10,
UnitPixel,
NULL,
NULL,
NULL);
1350 status =
GdipDrawImagePointsRect(graphics, (
GpImage*)bm,
NULL, 3, 0, 0, 10, 10,
UnitPixel,
NULL,
NULL,
NULL);
1352 status =
GdipDrawImagePointsRect(graphics, (
GpImage*)bm, ptf, 3, 0, 0, 0, 0,
UnitPixel,
NULL,
NULL,
NULL);
1354 memset(ptf, 0,
sizeof(ptf));
1355 status =
GdipDrawImagePointsRect(graphics, (
GpImage*)bm, ptf, 3, 0, 0, 10, 10,
UnitPixel,
NULL,
NULL,
NULL);
1372 ok(
hdc !=
NULL,
"Expected HDC to be initialized\n");
1376 ok(graphics !=
NULL,
"Expected graphics to be initialized\n");
1380 ok(pen !=
NULL,
"Expected pen to be initialized\n");
1433 ok(
hdc !=
NULL,
"Expected HDC to be initialized\n");
1437 ok(graphics !=
NULL,
"Expected graphics to be initialized\n");
1504 ok(
hdc !=
NULL,
"Expected HDC to be initialized\n");
1508 ok(graphics !=
NULL,
"Expected graphics to be initialized\n");
1556 ok(
hdc !=
NULL,
"Expected HDC to be initialized\n");
1559 ok(graphics !=
NULL,
"Expected graphics to be initialized\n");
1562 ok(brush !=
NULL,
"Expected brush to be initialized\n");
1565 ok(
path !=
NULL,
"Expected path to be initialized\n");
1634 for(
i = 0;
i < 5;
i++){
1642 rect[0].Height = 70;
1646 rect[1].Height = 20;
1648 for(
i = 0;
i < 2;
i++){
1666 ok(graphics !=
NULL,
"Expected graphics to be initialized\n");
1692 ok(retdc ==
hdc,
"Invalid HDC returned\n");
2122 UINT region_data_size;
2149 expect(36, region_data_size);
2150 expect(28, region_data.size);
2151 expect(0, region_data.num_children);
2152 expect(0x10000000 , region_data.element_type);
2155 expectf(10.0, region_data.width);
2156 expectf(10.0, region_data.height);
2188 expect(36, region_data_size);
2189 expect(28, region_data.size);
2190 expect(0, region_data.num_children);
2191 expect(0x10000000 , region_data.element_type);
2194 expectf(5.0, region_data.width);
2195 expectf(5.0, region_data.height);
2282 static const WCHAR string[] = {
'T',
'e',
's',
't',0};
2283 static const PointF positions[4] = {{0,0}, {1,1}, {2,2}, {3,3}};
2286 memset(&logfont,0,
sizeof(logfont));
2297 skip(
"Arial not installed.\n");
2360 ok(
hdc !=
NULL,
"Expected HDC to be initialized\n");
2364 ok(graphics !=
NULL,
"Expected graphics to be initialized\n");
2378 "Expected clip bounds (%0.f, %0.f, %0.f, %0.f) to be the size of "
2379 "the screen (%0.f, %0.f, %0.f, %0.f)\n",
2384 exp.X = clipr.
X = 10;
2385 exp.Y = clipr.
Y = 12;
2398 "Expected clip bounds (%0.f, %0.f, %0.f, %0.f) to be the size of "
2399 "the clipping rect (%0.f, %0.f, %0.f, %0.f)\n",
2423 "Expected clip bounds (%0.f, %0.f, %0.f, %0.f) to be the size of "
2424 "the visible clipping rect (%0.f, %0.f, %0.f, %0.f)\n",
2434 "Expected clip bounds (%d, %d, %d, %d) to be the size of "
2435 "the visible clipping rect (%0.f, %0.f, %0.f, %0.f)\n",
2464 ok(graphics !=
NULL,
"Expected graphics to be initialized\n");
2472 "Expected clip bounds (%0.f, %0.f, %0.f, %0.f) to be the size of "
2473 "the window (%0.f, %0.f, %0.f, %0.f)\n",
2478 exp.X = clipr.
X = 20;
2479 exp.Y = clipr.
Y = 8;
2492 "Expected clip bounds (%0.f, %0.f, %0.f, %0.f) to be the size of "
2493 "the clipping rect (%0.f, %0.f, %0.f, %0.f)\n",
2517 "Expected clip bounds (%0.f, %0.f, %0.f, %0.f) to be the size of "
2518 "the visible clipping rect (%0.f, %0.f, %0.f, %0.f)\n",
2528 "Expected clip bounds (%d, %d, %d, %d) to be the size of "
2529 "the visible clipping rect (%0.f, %0.f, %0.f, %0.f)\n",
2551 "Expected clip bounds (%0.f, %0.f, %0.f, %0.f) to be "
2552 "twice the window size (%0.f, %0.f, %0.f, %0.f)\n",
2570 ok(graphics !=
NULL,
"Expected graphics to be initialized\n");
2691 ok(
hdc !=
NULL,
"Expected HDC to be initialized\n");
2695 ok(graphics !=
NULL,
"Expected graphics to be initialized\n");
2714 ok(
val ==
TRUE,
"Expected (%.2f, %.2f) to be visible\n",
x,
y);
2720 ok(
val ==
FALSE,
"Expected (%.2f, %.2f) not to be visible\n",
x,
y);
2726 ok(
val ==
FALSE,
"Expected (%.2f, %.2f) not to be visible\n",
x,
y);
2732 ok(
val ==
TRUE,
"Expected (%.2f, %.2f) to be visible\n",
x,
y);
2741 ok(
val ==
FALSE,
"After clipping, expected (%.2f, %.2f) not to be visible\n",
x,
y);
2747 ok(
val ==
TRUE,
"After clipping, expected (%.2f, %.2f) to be visible\n",
x,
y);
2756 ok(
val ==
TRUE,
"Expected (%.2f, %.2f) to be visible\n",
x,
y);
2762 ok(
val ==
FALSE,
"Expected (%.2f, %.2f) not to be visible\n",
x,
y);
2771 ok(
val ==
FALSE,
"After clipping, expected (%.2f, %.2f) not to be visible\n",
x,
y);
2777 ok(
val ==
FALSE,
"After clipping, expected (%.2f, %.2f) not to be visible\n",
x,
y);
2783 ok(
val ==
TRUE,
"After clipping, expected (%.2f, %.2f) to be visible\n",
x,
y);
2789 ok(
val ==
TRUE,
"After clipping, expected (%.2f, %.2f) to be visible\n",
x,
y);
2795 ok(
val ==
TRUE,
"After clipping, expected (%.2f, %.2f) to be visible\n",
x,
y);
2801 ok(
val ==
FALSE,
"After clipping, expected (%.2f, %.2f) not to be visible\n",
x,
y);
2807 ok(
val ==
TRUE,
"After clipping, expected (%.2f, %.2f) to be visible\n",
x,
y);
2813 ok(
val ==
TRUE,
"After clipping, expected (%.2f, %.2f) to be visible\n",
x,
y);
2819 ok(
val ==
FALSE,
"After clipping, expected (%.2f, %.2f) not to be visible\n",
x,
y);
2825 ok(
val ==
FALSE,
"After clipping, expected (%.2f, %.2f) not to be visible\n",
x,
y);
2831 ok(
val ==
FALSE,
"After clipping, expected (%.2f, %.2f) not to be visible\n",
x,
y);
2837 ok(
val ==
FALSE,
"After clipping, expected (%.2f, %.2f) not to be visible\n",
x,
y);
2843 ok(
val ==
FALSE,
"After clipping, expected (%.2f, %.2f) not to be visible\n",
x,
y);
2850 ok(
val ==
TRUE,
"After clipping, expected (%.2f, %.2f) to be visible\n",
x,
y);
2856 ok(
val ==
FALSE,
"After clipping, expected (%.2f, %.2f) not to be visible\n",
x,
y);
2870 ok(
hdc !=
NULL,
"Expected HDC to be initialized\n");
2874 ok(graphics !=
NULL,
"Expected graphics to be initialized\n");
3033 ok(
hdc !=
NULL,
"Expected HDC to be initialized\n");
3037 ok(graphics !=
NULL,
"Expected graphics to be initialized\n");