Purpose |
Expands a graphic target into autosize mode. |
Syntax |
GRAPHIC SET AUTOSIZE nWidth, nHeight [,USERSIZE] |
Remarks |
AUTOSIZE mode allows the attached graphic target
(control or window)to
display the contents of a virtual
window, which may be larger or smaller. The
entire contents of the virtual window are always displayed on the screen,
so the image is stretched or condensed to fit properly. The
physical size of the display area is not changed. If the graphic target
is a
This statement may be used to change a target to AUTOSIZE mode, or to change the sizes and UserSize option of an existing AUTOSIZE target. When executed, a new virtual bitmap of the specified height and width is created. nWidth and nHeight are always specified in Pixels or Dialog Units, depending upon the original window creation. The new virtual bitmap is immediately filled with the original bitmap, but stretched or condensed to fit. This is done to avoid flashing effects which sometimes occur with a brief color change. Your program may now draw to the new bitmap in the normal fashion for a bitmap of the new size. If a clip area had been established to create margins, it is reset. If scaled coordinates had been established, they are also reset, as neither would be appropriate for the altered size. You can enable these attributes again with GRAPHIC SCALE or GRAPHIC SET CLIP, based upon the new size of the drawing area. You can retrieve the size of the virtual drawing area, at any time, with GRAPHIC GET CANVAS. AUTOSIZE mode is quite similar to VIRTUAL mode. Both create a virtual window which is the target of your drawing and text printing operations. The difference is the way in which they are displayed. VIRTUAL displays a viewport, smaller than the virtual window, which can be moved to various positions. This allows the user to view one selected section at a time. AUTOSIZE displays the entire virtual window, all of the time, by stretching or condensing it as needed. If you add the USERSIZE option, an attached graphic window is displayed with a thick frame, which allows the user to "drag" the edges to a new size at any time. This option is not appropriate for a graphic control, and is ignored in that case. |
See also |
GRAPHIC GET CANVAS, GRAPHIC SCALE, GRAPHIC SET CLIP, GRAPHIC SET FIXED, GRAPHIC SET VIRTUAL, |