Verify GDI Printer (Compact 7)
3/12/2014
The Graphics Device Interface (GDI) Printing Test exercises the GDI drawing APIs on a printer to verify that the print driver and middleware produce the correct printed page. It describes what is expected to be printed, and also prints a reference image of the expected result on the page using a single BitBlt operation instead of sending each operation individually to the page. Optionally, if desired for verification, it also draws the expected output to the primary monitor.
Test Prerequisites
Your device must meet the following requirements before you run this test.
The GDI Printer Test requires that the Windows Embedded Compact-based device be equipped with a parallel, serial, IR, USB, or network connection to a printer. In addition, the operating system needs a printer driver, printer transport, and printing support in the GDI middleware. For example, to run this on a parallel printer using the shipped PCL printer driver, you would need the parallel port driver (SYSGEN_PARALLEL), the PCL printer driver (SYSGEN_PCL), and the OS printing component (SYSGEN_PRINTING). To use the test's ability to draw the printed page to the primary, you need a headed image with a shell available.
The following tables show the software required for the GDI Printing Test.
Requirement | Description |
---|---|
Tux.exe |
Test harness, required for executing the test. |
Kato.dll |
Logging engine, required for logging the test data. |
GDIPrint.dll |
Library containing the test code, loaded by the Tux test harness. |
Note: When you run the Graphics Device Interface Performance Test, the Windows Embedded Compact Test Kit (CTK) temporarily copies files to the root directory of the target device. Before running the test, verify that there is at least 0.6 megabytes (MB) of free space in the root directory of the target device. If there is not sufficient space in the root directory of the target device, the test cannot run.
Subtests
The table below lists the subtests included in this test.
SubTest ID | Description |
---|---|
100 |
Verifies the functionality of BitBlt with various source bitmaps. It has four subtests within it, so there should be four sets of images and instructions on the page. Test 1: Verifies the functionality of BitBlt. This image should be a 1bpp picture of a puppy. As 1bpp only has black and white, the expected image is mostly black with a few white highlights from the grass and outlines of the puppy. Test 2: Verifies the functionality of BitBlt. This image should be a 4bpp picture of a puppy; it should contain color if color was selected as a print option. Test 3: Verifies the functionality of BitBlt. This image should be a 8bpp picture of a puppy, it should contain color if color was selected as a print option. Test 4: Verifies the functionality of BitBlt. This image should be a 24bpp picture of a puppy; it should contain color if color was selected as a print option. |
101 |
Verifies the functionality of MaskBlt using three different ROP4 operations. There should be three sets of images and instructions on the page Test 1: Verifies the functionality of MaskBlt. The bitmap on the left should match the bitmap on the right, have no artifacts in the interior, and be in color if color was selected as a print option. Test 2: Verifies the functionality of MaskBlt. The bitmap on the left should match the bitmap on the right, and have a set of diagonal boxes from each of the corners; the boxes should be in blue if color was selected. Test 3: Verifies the functionality of MaskBlt. The bitmap on the left should match the bitmap on the right, and the box should be mostly blue with portions of the puppy picture in the diagonal boxes across the square. |
102 |
Verifies the functionality of StretchBlt using 4 different source bitmaps and with both stretching and shrinking. There should be 8 sets of images and instructions on the page. Test 1: Verifies the functionality of StretchBlt. This image should be a 1bpp picture of a puppy, and it should be 1/2 the size of the image on the right. As 1bpp only has black and white, the expected image is mostly black with a few white highlights from the grass and outlines of the puppy. Test 2: Verifies the functionality of StretchBlt. This image should be a 4bpp picture of a puppy, it should be 1/2 the size of the image on the right, and it should contain color if color was selected as a print option. Test 3: Verifies the functionality of StretchBlt. This image should be a 8bpp picture of a puppy, it should be 1/2 the size of the image on the right, and it should contain color if color was selected as a print option. Test 4: Verifies the functionality of StretchBlt. This image should be a 24bpp picture of a puppy, it should be 1/2 the size of the image on the right, and it should contain color if color was selected as a print option. Test 5: Verifies the functionality of StretchBlt. This image should be a 1bpp picture of a puppy, and it should be 2x the size of the image on the right. As 1bpp only has black and white, the expected image is mostly black with a few white highlights from the grass and outlines of the puppy. Test 6: Verifies the functionality of StretchBlt. This image should be a 4bpp picture of a puppy, it should be 2x the size of the image on the right, and it should contain color if color was selected as a print option.Test 7: Verifies the functionality of StretchBlt. This image should be a 8bpp picture of a puppy, it should be 2x the size of the image on the right, and it should contain color if color was selected as a print option.Test 8: Verifies the functionality of StretchBlt. This image should be a 24bpp picture of a puppy, it should be 2x the size of the image on the right, and it should contain color if color was selected as a print option. |
103 |
Verifies the functionality of PatBlt using three different raster operations. There should be three sets of images and instructions on the page. Test 1: Verifies the functionality of PatBlt. The left should match the right. This should be a black box. Test 2: Verifies the functionality of PatBlt. The left should match the right and this should be a white box (empty). Test 3: Verifies the functionality of PatBlt. The left should match the right, and it should be four pictures of the puppy laid out in a tiled wallpaper fashion. |
104 |
Verifies the functionality of TransparentBlt using five different transparent colors. There should be five sets of images and instructions on the page. Test 1: Verifies the functionality of TransparentBlt. The left image should match the right, and there should be four squares of color. If color printing was enabled, going clockwise the colors should be black, red, blue, and green. Test 2: Verifies the functionality of TransparentBlt. The left image should match the right, and there should be three squares of color with the upper left square (black) missing. Test 3: Verifies the functionality of TransparentBlt. The left image should match the right, and there should be three squares of color, with the upper right square (red) missing. Test 4: Verifies the functionality of TransparentBlt. The left image should match the right, and there should be three squares of color, with the upper lower left (green) missing. Test 5: Verifies the functionality of TransparentBlt. The left image should match the right, and there should be three squares of color, with the lower right square (blue) missing. |
105 |
Verifies the functionality of AlphaBlend using five different levels of source constant alpha blending. There should be five sets of images and instructions on the page.Test 1: Verifies the functionality of AlphaBlend. The left image should match the right, and it should be an opaque picture of a puppy.Test 2: Verifies the functionality of AlphaBlend. The left image should match the right, and it should be a 75% opaque picture of a puppy.Test 3: Verifies the functionality of AlphaBlend. The left image should match the right, and it should be a 50% opaque picture of a puppy.Test 4: Verifies the functionality of AlphaBlend. The left image should match the right, and it should be a 25% opaque picture of a puppy.Test 5: Verifies the functionality of AlphaBlend. The left image should match the right, and it should be an empty area from a 0% opaque (100% transparent) picture of a puppy. |
106 |
Verifies the functionality of StretchDIBits using 23 different Device Independent Bitmaps as the source. There should be 23 sets of images and instructions on the page.Test 1: Verifies the functionality of StretchDIBits. This is testing a 16bpp BI_RGB DIB to the printer; the left image should match the right.Test 2: Verifies the functionality of StretchDIBits. This is testing a 16bpp RGB4444 DIB to the printer; the left image should match the right.Test 3: Verifies the functionality of StretchDIBits. This is testing a 16bpp RGB565 DIB to the printer; the left image should match the right.Test 4: Verifies the functionality of StretchDIBits. This is testing a 16bpp RGB555 DIB to the printer; the left image should match the right.Test 5: Verifies the functionality of StretchDIBits. This is testing a 16bpp RGB1555 DIB to the printer; the left image should match the right.Test 6: Verifies the functionality of StretchDIBits. This is testing a 16bpp BGR4444 DIB to the printer; the left image should match the right.Test 7: Verifies the functionality of StretchDIBits. This is testing a 16bpp BGR565 DIB to the printer; the left image should match the right.Test 8: Verifies the functionality of StretchDIBits. This is testing a 16bpp BGR555 DIB to the printer; the left image should match the right.Test 9: Verifies the functionality of StretchDIBits. This is testing a 16bpp BGR1555 DIB to the printer; the left image should match the right.Test 10: Verifies the functionality of StretchDIBits. This is testing a 24bpp BI_RGB DIB to the printer; the left image should match the right.Test 11: Verifies the functionality of StretchDIBits. This is testing a 32bpp BI_RGB DIB to the printer; the left image should match the right.Test 12: Verifies the functionality of StretchDIBits. This is testing a 32bpp RGB8888 DIB to the printer; the left image should match the right.Test 13: Verifies the functionality of StretchDIBits. This is testing a 32bpp RGB888 DIB to the printer; the left image should match the right.Test 14: Verifies the functionality of StretchDIBits. This is testing a 32bpp BGR8888 DIB to the printer; the left image should match the right.Test 15: Verifies the functionality of StretchDIBits. This is testing a 32bpp BGR888 DIB to the printer; the left image should match the right.Test 16: Verifies the functionality of StretchDIBits. This is testing a 1bpp DIB_PAL_COLORS DIB to the printer; the left image should match the right. The image should be mostly black with a few white specks.Test 17: Verifies the functionality of StretchDIBits. This is testing a 2bpp DIB_PAL_COLORS DIB to the printer; the left image should match the right. Due to the limited colors in a 2bpp surface, this only has a bare resemblance to a puppy.Test 18: Verifies the functionality of StretchDIBits. This is testing a 4bpp DIB_PAL_COLORS DIB to the printer; the left image should match the right.Test 19: Verifies the functionality of StretchDIBits. This is testing a 8bpp DIB_PAL_COLORS DIB to the printer; the left image should match the right.Test 20: Verifies the functionality of StretchDIBits. This is testing a 1bpp user-paletted DIB to the printer; the left image should match the right. The images should be mostly black with a few white specks.Test 21: Verifies the functionality of StretchDIBits. This is testing a 2bpp user-paletted DIB to the printer; the left image should match the right. This should be a black box.Test 22: Verifies the functionality of StretchDIBits. This is testing a 4bpp user-paletted DIB to the printer; the left image should match the right. This should be a grayscale picture of the puppy.Test 23: Verifies the functionality of StretchDIBits. This is testing a 8bpp user-paletted DIB to the printer; the left image should match the right. This should be a grayscale picture of the puppy. |
107 |
Verifies the functionality of SetDIBitsToDevice using 23 different Device Independent Bitmaps as the source. There should be 23 sets of images and instructions on the page.Test 1: Verifies the functionality of SetDIBitsToDevice. This is testing a 16bpp BI_RGB DIB to the printer; the left image should match the right. Test 2: Verifies the functionality of SetDIBitsToDevice. This is testing a 16bpp RGB4444 DIB to the printer; the left image should match the right. Test 3: Verifies the functionality of SetDIBitsToDevice. This is testing a 16bpp RGB565 DIB to the printer; the left image should match the right. Test 4: Verifies the functionality of SetDIBitsToDevice. This is testing a 16bpp RGB555 DIB to the printer; the left image should match the right. Test 5: Verifies the functionality of SetDIBitsToDevice. This is testing a 16bpp RGB1555 DIB to the printer; the left image should match the right. Test 6: Verifies the functionality of SetDIBitsToDevice. This is testing a 16bpp BGR4444 DIB to the printer; the left image should match the right.Test 7: Verifies the functionality of StretchDIBits. This is testing a 16bpp BGR565 DIB to the printer; the left image should match the right. Test 8: Verifies the functionality of SetDIBitsToDevice. This is testing a 16bpp BGR555 DIB to the printer; the left image should match the right. Test 9: Verifies the functionality of SetDIBitsToDevice. This is testing a 16bpp BGR1555 DIB to the printer; the left image should match the right. Test 10: Verifies the functionality of SetDIBitsToDevice. This is testing a 24bpp BI_RGB DIB to the printer; the left image should match the right.Test 11: Verifies the functionality of SetDIBitsToDevice. This is testing a 32bpp BI_RGB DIB to the printer; the left image should match the right.Test 12: Verifies the functionality of SetDIBitsToDevice. This is testing a 32bpp RGB8888 DIB to the printer; the left image should match the right.Test 13: Verifies the functionality of SetDIBitsToDevice. This is testing a 32bpp RGB888 DIB to the printer; the left image should match the right.Test 14: Verifies the functionality of SetDIBitsToDevice. This is testing a 32bpp BGR8888 DIB to the printer; the left image should match the right.Test 15: Verifies the functionality of SetDIBitsToDevice. This is testing a 32bpp BGR888 DIB to the printer; the left image should match the right.Test 16: Verifies the functionality of SetDIBitsToDevice. This is testing a 1bpp DIB_PAL_COLORS DIB to the printer; the left image should match the right. The image should be mostly black with a few white specks.Test 17: Verifies the functionality of SetDIBitsToDevice. This is testing a 2bpp DIB_PAL_COLORS DIB to the printer; the left image should match the right. Due to the limited colors in a 2bpp surface, this only has a bare resemblance to a puppy.Test 18: Verifies the functionality of SetDIBitsToDevice. This is testing a 4bpp DIB_PAL_COLORS DIB to the printer; the left image should match the right.Test 19: Verifies the functionality of SetDIBitsToDevice. This is testing a 8bpp DIB_PAL_COLORS DIB to the printer; the left image should match the right.Test 20: Verifies the functionality of SetDIBitsToDevice. This is testing a 1bpp user-paletted DIB to the printer; the left image should match the right. The images should be mostly black with a few white specks.Test 21: Verifies the functionality of SetDIBitsToDevice. This is testing a 2bpp user-paletted DIB to the printer; the left image should match the right. This should be a black box.Test 22: Verifies the functionality of SetDIBitsToDevice. This is testing a 4bpp user-paletted DIB to the printer; the left image should match the right. This should be a grayscale picture of the puppy.Test 23: Verifies the functionality of SetDIBitsToDevice. This is testing a 8bpp user-paletted DIB to the printer; the left image should match the right. This should be a grayscale picture of the puppy. |
108 |
Verifies the functionality of GradientFill using six different gradients. There should be six sets of images and instructions on the page. Test 1: Verifies the functionality of GradientFill. The left image should match the right. This should be a solid black box. Test 2: Verifies the functionality of GradientFill. The left image should match the right. This should be a black to white gradient changing from left to right. Test 3: Verifies the functionality of GradientFill. The left image should match the right. This should be a red to green gradient changing from left to right. Test 4: Verifies the functionality of GradientFill. The left image should match the right. This should be a solid black box. Test 5: Verifies the functionality of GradientFill. The left image should match the right. This should be a black to white gradient changing from top to bottom. Test 6: Verifies the functionality of GradientFill. The left image should match the right. This should be a red to green gradient changing from top to bottom. |
109 |
Verifies the functionality of FillRect using two different gradients. There should be two sets of images and instructions on the page. Test 1: Verifies the functionality of FillRect. The image to the left should match the image to the right, and be a red box if color printing was enabled. Test 2: Verifies the functionality of FillRect. The image to the left should match the image to the right, and be a tiled picture of a puppy. |
110 |
Verifies the functionality of PolyLine using three different gradients. There should be three sets of images and instructions on the page. Test 1: Verifies the functionality of PolyLine. The image on the left should match the image on the right, the image should be a triangle with a thin black pen and an empty interior. Test 2: Verifies the functionality of PolyLine. The image on the left should match the image on the right, the image should be a triangle with a thin red dashed pen and an empty interior. Test 3: Verifies the functionality of PolyLine. The image on the left should match the image on the right, the image should be a triangle with a wide pen, it should be white on a black background. |
111 |
Verifies the functionality of Polygon using four different gradients. There should be four sets of images and instructions on the page. Test 1: Verifies the functionality of Polygon. The image on the left should match the image on the right; the image should be a triangle with a thin black pen and a puppy-filled interior. Test 2: Verifies the functionality of Polygon. The image on the left should match the image on the right; the image should be a triangle with a thin green pen and a solid interior. Test 3: Verifies the functionality of Polygon. The image on the left should match the image on the right; the image should be a triangle with a thin dashed pen and a puppy-filled interior. Test 4: Verifies the functionality of Polygon. The image on the left should match the image on the right, the image should be a triangle with a wide blue pen, it should be on a green background, and have a puppy-filled interior. |
112 |
Verifies the functionality of LineTo using three different gradients. There should be three sets of images and instructions on the page.Test 1: Verifies the functionality of MoveTo/LineTo. The image on the left should match the image on the right; the image should be a triangle with a thin black pen and an empty interior.Test 2: Verifies the functionality of MoveTo/LineTo. The image on the left should match the image on the right; the image should be a triangle with a thin red dashed pen and an empty interior.Test 3: Verifies the functionality of MoveTo/LineTo. The image on the left should match the image on the right; the image should be a triangle with a wide pen. It should be white on a black background. |
113 |
Verifies the functionality of Rectangle using four different gradients. There should be four sets of images and instructions on the page. Test 1: Verifies the functionality of Rectangle. The image on the left should match the image on the right; the image should be a rectangle with a thin black pen and a puppy-filled interior. Test 2: Verifies the functionality of Rectangle. The image on the left should match the image on the right; the image should be a rectangle with a thin green pen and a solid red-filled interior. Test 3: Verifies the functionality of Rectangle. The image on the left should match the image on the right; the image should be a rectangle with a thin dashed pen and a puppy-filled interior. Test 4: Verifies the functionality of Rectangle. The image on the left should match the image on the right; the image should be a rectangle with a wide blue pen on a green background with a puppy-filled interior. |
114 |
Verifies the functionality of RoundRect using four different gradients. There should be four sets of images and instructions on the page.Test 1: Verifies the functionality of RoundRect. The image on the left should match the image on the right; the image should be a rounded rectangle with a thin black pen and a puppy-filled interior.Test 2: Verifies the functionality of RoundRect. The image on the left should match the image on the right; the image should be a rounded rectangle with a thin green pen and a solid red-filled interior.Test 3: Verifies the functionality of RoundRect. The image on the left should match the image on the right; the image should be a rounded rectangle with a thin dashed pen and a puppy-filled interior.Test 4: Verifies the functionality of RoundRect. The image on the left should match the image on the right, the image should be a rounded rectangle with a wide blue pen on a green background, with a puppy-filled interior. |
115 |
Verifies the functionality of Ellipse using four different gradients. There should be four sets of images and instructions on the page. Test 1: Verifies the functionality of Ellipse. The image on the left should match the image on the right; the image should be a circle with a thin black pen and a puppy-filled interior. Test 2: Verifies the functionality of Ellipse. The image on the left should match the image on the right; the image should be a circle with a thin green pen and a solid red-filled interior. Test 3: Verifies the functionality of Ellipse. The image on the left should match the image on the right; the image should be a circle with a thin dashed pen and a puppy-filled interior. Test 4: Verifies the functionality of Ellipse. The image on the left should match the image on the right; the image should be a circle with a wide blue pen on a green background and a puppy-filled interior. |
116 |
Verifies the functionality of DrawText using three different gradients. There should be three sets of images and instructions on the page. Test 1: Verifies the functionality of DrawText. The string "Test String" should be printed on the page. Please also verify that the left half of the page matches the right half. It should be black text on a white background. Test 2: Verifies the functionality of DrawText. The string "Test String" should be printed on the page. Please also verify that the left half of the page matches the right half. It should be white text on a black background. Test 3: Verifies the functionality of DrawText. The string "Test String" should be printed on the page. Please also verify that the left half of the page matches the right half. It should be green text on a fuchsia background. |
117 |
Verifies the functionality of ExtTextOut using three different gradients. There should be three sets of images and instructions on the page. Test 1: Verifies the functionality of ExtTextOut. The string "Test String" should be printed on the page. Please also verify that the left half of the page matches the right half. It should be black text on a white background. Test 2: Verifies the functionality of ExtTextOut. The string "Test String" should be printed on the page. Please also verify that the left half of the page matches the right half. It should be white text on a black background. Test 3: Verifies the functionality of ExtTextOut. The string "Test String" should be printed on the page. Please also verify that the left half of the page matches the right half. It should be green text on a fuchsia background. |
Setting Up the Test
Ensure the Windows Embedded Compact-based device is connected to a PCL printer described in the prerequisites.
Running the Test
"Command Line Parameters for the Graphics Device Interface Printer Test :"
Tux can pass command line parameters to test DLLs using the -c option. Each parameter has an associated value separated by a space. Because of this space, the parameter list must always be enclosed in quotation marks. The exceptions are /DrawToPrimary and /?, which do not have associated values.
When passing in parameters, the /Driver, /Device, and /Output parameters must be present. If any are missing, the parameters will be ignored and a print dialog will appear to gather the information.
The following table shows the command line parameters for the Graphics Device Interface (GDI) Printing Test, passed in through the Tux -c option.
Parameter | Description |
---|---|
/? |
Output usage information. |
/DrawToPrimary |
For manual verification of the images drawn to the primary. |
/Driver name |
Specifies the driver. If this parameter is not specified, all parameters are ignored and a print dialog requests the information. |
/Device name |
Specifies the device. If this parameter is not specified, all parameters are ignored and a print dialog requests the information. |
/Output port |
Specifies the output device; for example, LPT1. If this parameter is not specified, all parameters are ignored and a print dialog requests the information. |
/Copies n |
Specifies the integer number of copies. |
/Quality specify |
Specifies the print quality: Draft or High. |
/Color specify |
Specifies the color: Monochrome or Color. |
/Orientation specify |
Specifies the page orientation: Portrait or Landscape. |
/Papersize specify |
Specifies the size of the paper: Letter, Legal, A4, B4, or B5. |
The following examples show how to run the GDI Printing Test under specific configurations.
To run this test on an image with a shell, using the print dialog to configure it:
"tux -o -d gdiprint "
To run this test on an image that is designed to work on a device without a graphical UI and give the print parameters through the command line:
"tux -o -dgdiprint -c "/Driver pcl.dll /Device Inkjet /Output LPT1 /Copies 1 /Quality Draft /Color Monochome /Orientation Portrait /Papersize Letter" "
Verifying the Test
When the test completes running, verify that "PASS" appears in the test log for all sub-tests.
Troubleshooting the Test
1. Ensure the image loaded on the Windows Embedded Compact-based device has all of the required SYSGENs set.
2. Ensure the PCL printer is firmly connected.
For additional platform specific issues, consult the CTK articles on the TechNet wiki.