Package com.ms.com.directX Previous
Previous
Microsoft Packages
Microsoft Packages
Index
Index
Next
Next

Class ddClipper

Applications use the methods of the ddClipper class to manage clip lists.

public class ddClipper implements IddClipper
{
  public void InternalSetObject(IUnknown lpddc);
  public IUnknown InternalGetObject();
  public int GetClipListSize(Rect rec);
  public void GetClipList(Rect rec, Rgndata CList, int[] Sz);
  public int GetHWnd();
  public void Initialize(dDraw dd, int flags);
  public int IsClipListChanged();
  public void SetClipList(Rgndata ClipList, int flags);
  public void SetHWnd(int flags, int hdl);
}

The methods can be organized into the following groups:
Allocating memory Initialize
Clip lists IsClipListChanged
SetClipList
SetHWnd
Handles GetClipList
GetClipListSize
GetHWnd

GetClipList

public void GetClipList(Rect rec, Rgndata CList, int[] Sz);

Retrieves a copy of the clip list associated with a ddClipper object. A subset of the clip list can be selected by passing a rectangle that clips the clip list.

Return Value:

No return value.

ParameterDescription
rec A Rect object that is used to clip the clip list.
CList A Rgndata object that receives the resulting copy of the clip list.
Sz Array variable that receives the size of the resulting clip list.

See Also: SetClipList


GetClipListSize

public int GetClipListSize(Rect rec);

Returns the size of the portion of the clip list contained with the given rectangle.

Return Value:

Returns the clip list size.

ParameterDescription
rec A Rect object that is used to clip the clip list.


GetHWnd

public int GetHWnd();

Retrieves the window handle previously associated with this ddClipper object by the SetHWnd method.

Return Value:

Returns the window handle.

See Also: SetHWnd


Initialize

public void Initialize(dDraw dd, int flags);

Initializes a ddClipper object.

Return Value:

No return value.

ParameterDescription
dd The dDraw object. If this parameter is set to null, an independent ddClipper object is created.
flags Reserved; must be 0.

See Also: CreateClipper


IsClipListChanged

public int IsClipListChanged();

Monitors the status of the clip list if a window handle is associated with a ddClipper.

Return Value:

Returns TRUE if the clip list has changed.


SetClipList

public void SetClipList(Rgndata ClipList, int flags);

Sets or deletes the clip list used by the Blt, BltBatch, and UpdateOverlay methods on surfaces to which the parent ddClipper is attached.

Return Value:

No return value.

ParameterDescription
CList A Rgndata object or null. If there is an existing clip list associated with the ddClipper object and this value is null, the clip list is deleted.
flags Reserved; must be 0.

Remarks:

The clip list cannot be set if a window handle is already associated with the ddClipper object. Note that the BltFast method cannot clip.

See Also: GetClipList


SetHWnd

public void SetHWnd(int flags, int hdl);

Sets the window handle that will obtain the clipping information.

Return Value:

No return value.

ParameterDescription
flags Reserved; must be 0.
hdl The window handle that obtains the clipping information.

See Also: GetHWnd



Top© 1996 Microsoft Corporation. All rights reserved.