Platform SDK: DirectX

DirectDrawSurface7.SetClipper

The DirectDrawSurface7.SetClipper method attaches a clipper object to, or deletes one from, a surface.

object.SetClipper(val As DirectDrawClipper)

Parameters

object
Object expression that resolves to a DirectDrawSurface7 object.
val
DirectDrawClipper object for the DirectDrawClipper object to be attached to the DirectDrawSurface object. If this parameter is Nothing, the current DirectDrawClipper object is detached.

Error Codes

If the method fails, it raises an error, and Err.Number can be set to one of the following values:

DDERR_INVALIDOBJECT
DDERR_INVALIDPARAMS
DDERR_INVALIDSURFACETYPE
DDERR_NOCLIPPERATTACHED

Remarks

If you pass Nothing as the val parameter, the clipper is removed from the surface. This method is primarily used by surfaces that are being overlaid on or blitted to the primary surface. However, it can be used on any surface. After a DirectDrawClipper object has been attached and a clip list is associated with it, the DirectDrawClipper object is used for the DirectDrawSurface7.Blt operations involving the parent DirectDrawSurface object. This method can also detach a DirectDrawSurface object's current DirectDrawClipper object.

See Also

DirectDrawSurface7.GetClipper