|Widget Class: _snapShot|
|objectName._snapShot( objectID );|
|objectName._snapShot( objectID, successful );|
|objectName._snapShot( objectID,successful, snapType );|
|objectName._snapShot( objectID, successful,snapType,upperLeftX );|
|objectName._snapShot( objectID, successful, snapType,upperLeftX,upperRightY );|
|objectName._snapShot( objectID, successful, snapType,upperLeftX,upperRightY, width );|
|objectName._snapShot( objectID, successful,snapType,upperLeftX, upperRightY, width, height );|
|objectID||Numeric||Input||specifies the object identifier of the Image Data Object that is the target of the snapshot operation|
|successful||Numeric||Output||returns whether or not the _snapshot method was successfully completed: 0 if successful|
|snapType||Character||Input||specifies the type of snapshot operation: BOUNDED (default), UNBOUNDED or MAIN|
|upperLeftX||Numeric||Input||specifies the the upper left x pixel coordinate for explicit bounding specification|
|upperRightY||Numeric||Input||specifies the the upper right y pixel coordinate for explicit bounding specification|
|width||Numeric||Input||specifies the the width in pxels for explicit bounding specification|
|height||Numeric||Input||specifies the the height in pxels for explicit bounding specification|
An Image Data Object, which contains the results of the snapshot operation, must be provided. Not all objects will have a useful _snapshot image placed in the Image Data Object. Host widgets (such as push buttons and list boxes) are notable examples.
The following example has a SAS/GRAPH Output object (
Graph) on the left half of the display and two Image objects (
Unscaled) on the right half. The first Image object
Scaled) has scaling enabled and the second Image object (
Unscaled) has scaling disabled. A radio box (snapType) contains the different snap_types. There is also a Graphic Text object nested in the SAS/GRAPH
Output object that contains the string 'Texas'. When the radio box is selected,
a new snapshot is created.
The following SCL code is used:
INIT: scaled._getDataId(scaledId); unscaled._getDataId(unscaledId); return; SNAPTYPE: graph._snapshot(scaledId, rc, snaptype); scaled._update(); graph._snapshot(unscaledId, rc, snaptype); unscaled._update(); return;Before selecting a snaptype,
Original Graphis scrolled down and to the right so that parts of Montana and Idaho are in the upper left. Selecting
Boundedfrom the radio box produces a snapshot.
Notice the Image object
Scaled contains the entire
picture visible in GRAPH, whereas
Unscaled only contains
the upper left portion. Both images contain parts of Montana and Idaho in
the upper left.
Unbounded is selected,
Scaled contains the entire
Grseg entry that GRAPH displays, whereas
Unscaled contains only
the upper left portion.
Unbounded attempts to take a snapshot
of the entire object, but only the upper left fits in
Main is selected, you get results similar to
Bounded except that nested objects are included in the snapshot. Notice
the string 'Texas' appears in the snapshot images, whereas the string does
not appear in the previous
Top of Page
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.