Microsoft DirectX 9.0

IDirectDrawSurface::SetClipper

The SetClipper method attaches a DirectDrawClipper to a DirectDrawSurface. This function is primarily used by surfaces that are being overlayed on or blitted to the primary surface, but it can be used on any surface. Once a DirectDrawClipper has been attached, and a clip list associated with it, it will be used for Blt, BltBatch, and UpdateOverlay operations involving the parent DirectDrawSurface. This method can also be used to detach a DirectDrawSurface's current Clipper.

Syntax

HRESULT SetClipper(
  LPDIRECTDRAWCLIPPER lpDDClipper
  );

Parameters

lpDirectDrawClipper

Either NULL, or points to the IDirectDrawClipper interface representing the DirectDrawClipper that will be attached to the DirectDrawSurface. If NULL, the current clipper will be detached.

Return Values

Value Description
DD_OK The method succeeded.
DDERR_INVALIDPARAMS One or more of the input parameters is invalid.
DDERR_INVALIDOBJECT DirectDraw received a pointer that was an invalid DirectDraw object.
DDERR_NOCLIPPERATTACHED No clipper object attached to surface object.

See Also