SGGrabPict
The SGGrabPict function provides a simple interface that allows your application to obtain a QuickDraw picture from a sequence grabber component. The sequence grabber can display the picture directly, or it can write the picture to an offscreen buffer. This function is limited in scope, however, and does not allow you to control all of the parameters that govern the operation. When you call this function, the sequence grabber component obtains and configures appropriate sequence grabber channel components (if necessary), grabs the data, and then releases any components it obtained.
pascal ComponentResult SGGrabPict (SeqGrabComponent s,
PicHandle *p,
const Rect *bounds,
short offscreenDepth,
long grabPictFlags);
s
- Specifies the component instance that identifies your connection to the sequence grabber component. You obtain this value from the Component Manager's
OpenDefaultComponent or OpenComponent function.
p
- Contains a pointer to a field that is to receive a handle to the picture. If the
SGGrabPict function cannot create the picture, it sets this handle to nil.
bounds
- Contains a pointer to the boundary region for the picture. By default,
this rectangle lies in the current graphics port. If you set the grabPictOffScreen flag in the grabPictFlags parameter to 1, the sequence grabber places the picture in an offscreen graphics world. In this case, the rectangle is interpreted in that offscreen world.
offscreenDepth
- Specifies the pixel depth for the offscreen graphics world. This parameter is typically set to 0, which chooses the best available depth. If you set the
grabPictOffScreen flag in the grabPictFlags parameter to 1, the sequence grabber places the picture in an offscreen graphics world. You specify the pixel depth of this offscreen graphics world with this parameter. If you are displaying the picture, this parameter is ignored.
grabPictFlags
- Contains flags that control the operation. The following flags are defined (set unused flags to 0):
grabPictOffScreen
- Instructs the sequence grabber to place the picture in
an offscreen graphics world. Set this flag to 1 to
use an offscreen graphics world. In this case, you use the offscreenDepth parameter to specify the pixel depth
in the offscreen buffer. In addition, the rectangle specified by the bounds parameter is applied to the offscreen buffer.
grabPictIgnoreClip
- Instructs the sequence grabber to ignore any clipping regions you may have defined for the sequence grabber's channels. Set this flag to 1 to have the sequence grabber ignore these clipping regions.
DESCRIPTION
If you have created any channels for the sequence grabber component, the SGGrabPict function uses those channels to obtain the data for the captured image.
SPECIAL CONSIDERATIONS
Some digitizer sources do not support grabbing offscreen, so the SGGrabPict function may fail. In this case, try again grabbing onscreen.
RESULT CODES
| notEnoughMemoryToGrab | -9403 | Insufficient memory for record operation |
| deviceCantMeetRequest | -9408 | Device cannot support grabber |
File Manager errors
Memory Manager errors