|
|
1.1 root 1: Sample: StretchBlt Demonstration
2:
3: Summary:
4:
1.1.1.2 ! root 5: The STREBLT sample is an easy to use demonstration of the
1.1 root 6: StretchBlt API function. The program presents a dialog box
7: on the top of the window, and through this dialog box the
8: user can manipulate the parameters to StretchBlt. In the
9: main window, the source bitmap is displayed on the right
10: half of the window, and the destination bitmap is displayed
11: on the left half.
12:
13: More Information:
14:
15: The source and destination rectangles may be changed
16: directly in the dialog, or they may be changed by using the
17: direct manipulation objects in the two halves of the window.
18: Clicking and dragging the mouse in the upper-left corner
19: moves the rectangles; clicking and dragging the mouse in the
20: lower-right corner sizes the rectangles. The source direct
21: manipulation object is temporarily erased before calling
22: StretchBlt so that the top and left edges do not show in the
23: destination image.
24:
25: The raster operation for the StretchBlt call may be changed
26: by altering the values in the right-most entry fields. The
27: contents are interpreted to be in hexadecimal. There is a
28: combo box directly beneath these entry fields that lists all
29: of the standard raster operations. If the user selects a
30: standard ROP from this combo box, its contents are copied
31: into the ROP entry fields and are then used in the
32: StretchBlt call.
33:
34: Several of the raster operations make use of a pattern in
35: the destination HDC. For this reason, the program also
36: allows the user to select one of the standard pattern
37: brushes from a second combo box. This brush is selected into
38: the destination HDC just prior to making the StretchBlt
39: call.
40:
41: The effect of the StretchBlt call is also affected by the
42: "StretchBlt mode" that has been set for the destination HDC.
43: A third combo box allows the user to select from any of the
44: standard modes. The difference is most easily observed when
45: stretching from a large source rectangle to a small
46: destination rectangle.
47:
48: The "Draw" button may be chosen at any time to cause the
49: StretchBlt call to be made. This does not erase the
50: background, so that the effect of multiple ROPs on the HDC
51: can be observed. Manipulating the source rectangle also
52: causes a StretchBlt to occur without erasing the window.
53: However, manipulating the destination rectangle erases the
54: destination half of the window before the next StretchBlt is
55: called.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.