Class DirectDrawClipper
public class DirectDrawClipper implements IDirectDrawClipper
{
// Methods
public void getClipList(Rect rec, int [] rects, int count,
Rect boundingrect);
public int getClipListSize(Rect rec);
public int getHWnd();
public void initialize(DirectDraw dd, int flags);
public int isClipListChanged();
public void setClipList(Rect rec, int [] rects, int count);
public void setComponent(Component c);
public void setHWnd(int flags, int hdl);
public void setOffset(int x, int y);
public void setSurfaceOffset(Point point);
public void setSurfaceVisRgn(Region visRgn);
}
Applications use the methods of the DirectDrawClipper class to manage clip lists.
public void getClipList(Rect rec, int [] rects, int count,
Rect boundingrect);
Retrieves a copy of the clip list associated with a DirectDrawClipper object. A subset of the clip list can be selected by passing a rectangle that clips the clip list.
Return Value:
No return value.
Parameter | Description |
rec
| A Rect object that is used to clip the clip list.
|
rects
| An int array containing a list of rectangle dimensions.
|
count
| The number of rectangles in the array.
|
boundingrect
| The bounding rectangle.
|
See Also: setClipList
public int getClipListSize(Rect rec);
Retrieves the size of the portion of the clip list contained with the given rectangle.
Return Value:
Returns the clip list size.
Parameter | Description |
rec
| A Rect object that is used to clip the clip list.
|
public int getHWnd();
Retrieves the window handle previously associated with this DirectDrawClipper object by the setHWnd method.
Return Value:
Returns The window handle.
See Also: setHWnd
public void initialize(DirectDraw dd, int flags);
Initializes a DirectDrawClipper object.
Return Value:
No return value.
Parameter | Description |
dd
| The DirectDraw object. If this parameter is set to null, an independent DirectDrawClipper object is created.
|
flags
| Reserved; the value must be 0.
|
See Also: com.ms.directX.DirectDraw
public int isClipListChanged();
Monitors the status of the clip list if a window handle is associated with a DirectDrawClipper object.
Return Value:
Returns true if the clip list has changed.
public void setClipList(Rect rec, int [] rects, int count);
Sets or deletes the clip list used by the blt and updateOverlay methods on surfaces that the parent DirectDrawClipper object is attached to.
Return Value:
No return value.
Parameter | Description |
rec
| A Rect object that is used to clip the clip list.
|
rects
| An int array containing a list of rectangle dimensions.
|
count
| The number of rectangles in the list.
|
Remarks:
The clip list cannot be set if a window handle is already associated with the DirectDrawClipper object. Note that the bltFast method cannot clip.
See Also: getClipList
public void setComponent(Component c);
Associates the surface object with a top-level Java component.
Return Value:
No return value.
public void setHWnd(int flags, int hdl);
Sets the window handle that will obtain the clipping information.
Return Value:
No return value.
Parameter | Description |
flags
| Reserved; the value must be 0.
|
hdl
| The window handle that obtains the clipping information.
|
See Also: getHWnd
public void setOffset(int x, int y);
Calls to native code to translate a surface to new coordinates.
Return Value:
No return value.
Parameter | Description |
x
| The new x coordinate to offset the surface to.
|
y
| The new y coordinate to offset the surface to.
|
public void setSurfaceOffset(Point point);
Translates a surface to new coordinates.
Return Value:
No return value.
Parameter | Description |
point
| The new point to offset the surface to.
|
public void setSurfaceVisRgn(Region visRgn);
Sets a visible region for the surface.
Return Value:
No return value.
Parameter | Description |
visRgn
| The region to set for the surface.
|