nsIScriptableRegion
| IID: | 82d8f400-5bde-11d3-b033-b27a62766bbc |
| Inherits From: | nsISupports |
This interface is implemented by the following components:
Properties
readonly nsIRegion region
Methods
PRBool containsRect ( PRInt32 aX , PRInt32 aY , PRInt32 width , PRInt32 height )
void getBoundingBox ( out PRInt32 aX , out PRInt32 aY , out PRInt32 width , out PRInt32 height )
void init ( )
void intersectRect ( PRInt32 aX , PRInt32 aY , PRInt32 width , PRInt32 height )
void intersectRegion ( nsIScriptableRegion region )
PRBool isEmpty ( )
PRBool isEqualRegion ( nsIScriptableRegion region )
void offset ( PRInt32 XOffset , PRInt32 YOffset )
void setToRect ( PRInt32 aX , PRInt32 aY , PRInt32 width , PRInt32 height )
void setToRegion ( nsIScriptableRegion region )
void subtractRect ( PRInt32 aX , PRInt32 aY , PRInt32 width , PRInt32 height )
void subtractRegion ( nsIScriptableRegion region )
void unionRect ( PRInt32 aX , PRInt32 aY , PRInt32 width , PRInt32 height )
void unionRegion ( nsIScriptableRegion region )
PRBool containsRect ( PRInt32 aX , PRInt32 aY , PRInt32 width , PRInt32 height )
Does the region intersect the rectangle?
- Arguments:
- aX
- aY
- width
- height
- Returns:
- true if the region intersects the rect
void getBoundingBox ( out PRInt32 aX , out PRInt32 aY , out PRInt32 width , out PRInt32 height )
Returns the bounding box of the region i.e. the smallest rectangle that completely contains the region.
- Arguments:
- aX: out parameter for xoffset of bounding rect for region
- aY: out parameter for yoffset of bounding rect for region
- width: out parameter for width of bounding rect for region
- height: out parameter for height of bounding rect for region
- Returns:
- void
void intersectRect ( PRInt32 aX , PRInt32 aY , PRInt32 width , PRInt32 height )
Destructively intersect a rect with this region
- Arguments:
- aX: xoffset of rect to intersect with region
- aY: yoffset of rect to intersect with region
- width: width of rect to intersect with region
- height: height of rect to intersect with region
- Returns:
- void
void intersectRegion ( nsIScriptableRegion region )
Destructively intersect another region with this one
- Arguments:
- region: to intersect
- Returns:
- void
Is this region empty? i.e. does it contain any pixels
- Returns:
- returns whether the region is empty
PRBool isEqualRegion ( nsIScriptableRegion region )
== operator equivalent i.e. do the regions contain exactly the same pixels
- Arguments:
- region: to compare
- Returns:
- whether the regions are identical
void offset ( PRInt32 XOffset , PRInt32 YOffset )
Offsets the region in x and y
- Arguments:
- XOffset
- YOffset
- Returns:
- void
void setToRect ( PRInt32 aX , PRInt32 aY , PRInt32 width , PRInt32 height )
Copy operator equivalent that takes a rect
- Arguments:
- aX: xoffset of rect to set region to
- aY: yoffset of rect to set region to
- width: width of rect to set region to
- height: height of rect to set region to
- Returns:
- void
void setToRegion ( nsIScriptableRegion region )
Copy operator equivalent that takes another region
- Arguments:
- region: to copy
- Returns:
- void
void subtractRect ( PRInt32 aX , PRInt32 aY , PRInt32 width , PRInt32 height )
Destructively subtract a rect from this region
- Arguments:
- aX: xoffset of rect to subtract with region
- aY: yoffset of rect to subtract with region
- width: width of rect to subtract with region
- height: height of rect to subtract with region
- Returns:
- void
void subtractRegion ( nsIScriptableRegion region )
Destructively subtract another region with this one
- Arguments:
- region: to subtract
- Returns:
- void
void unionRect ( PRInt32 aX , PRInt32 aY , PRInt32 width , PRInt32 height )
Destructively union a rect with this region
- Arguments:
- aX: xoffset of rect to union with region
- aY: yoffset of rect to union with region
- width: width of rect to union with region
- height: height of rect to union with region
- Returns:
- void
void unionRegion ( nsIScriptableRegion region )
Destructively union another region with this one
- Arguments:
- region: to union
- Returns:
- void
References
This interface is passed as an argument to the following methods:
nsIDragService.invokeDragSession, nsIDragService.invokeDragSessionWithImage, nsIScriptableRegion.intersectRegion, nsIScriptableRegion.isEqualRegion, nsIScriptableRegion.setToRegion, nsIScriptableRegion.subtractRegion, nsIScriptableRegion.unionRegion
Reference documentation is generated from Mozilla's source.
