nsIScriptableRegion
Methods
init()
setToRegion(aRegion)
copy operator equivalent that takes another region
/
Parameters
Returns
setToRect(aX, aY, aWidth, aHeight)
copy operator equivalent that takes a rect
/
Parameters
aX |
xoffset of rect to set region to
|
aY |
yoffset of rect to set region to
|
aWidth |
width of rect to set region to
|
aHeight |
height of rect to set region to
|
Returns
intersectRegion(aRegion)
destructively intersect another region with this one
/
Parameters
Returns
intersectRect(aX, aY, aWidth, aHeight)
destructively intersect a rect with this region
/
Parameters
aX |
xoffset of rect to intersect with region
|
aY |
yoffset of rect to intersect with region
|
aWidth |
width of rect to intersect with region
|
aHeight |
height of rect to intersect with region
|
Returns
unionRegion(aRegion)
destructively union another region with this one
/
Parameters
Returns
unionRect(aX, aY, aWidth, aHeight)
destructively union a rect with this region
/
Parameters
aX |
xoffset of rect to union with region
|
aY |
yoffset of rect to union with region
|
aWidth |
width of rect to union with region
|
aHeight |
height of rect to union with region
|
Returns
subtractRegion(aRegion)
destructively subtract another region with this one
/
Parameters
Returns
subtractRect(aX, aY, aWidth, aHeight)
destructively subtract a rect from this region
/
Parameters
aX |
xoffset of rect to subtract with region
|
aY |
yoffset of rect to subtract with region
|
aWidth |
width of rect to subtract with region
|
aHeight |
height of rect to subtract with region
|
Returns
isEmpty()
is this region empty? i.e. does it contain any pixels
/
Parameters
Returns
returns whether the region is empty
|
isEqualRegion(aRegion)
== operator equivalent i.e. do the regions contain exactly
the same pixels
/
Parameters
Returns
whether the regions are identical
|
getBoundingBox(aX, aY, aWidth, aHeight)
returns the bounding box of the region i.e. the smallest
rectangle that completely contains the region.
/
Parameters
aX |
out parameter for xoffset of bounding rect for region
|
aY |
out parameter for yoffset of bounding rect for region
|
aWidth |
out parameter for width of bounding rect for region
|
aHeight |
out parameter for height of bounding rect for region
|
Returns
offset(aXOffset, aYOffset)
offsets the region in x and y
/
Parameters
xoffset |
pixel offset in x
|
yoffset |
pixel offset in y
|
Returns
getRects()
Returns
flat array of rects,ie [x1,y1,width1,height1,x2...].
The result will contain bogus data if values don't fit in 31 bit
/
|
containsRect(aX, aY, aWidth, aHeight)
does the region intersect the rectangle?
/
Parameters
rect |
to check for containment
|
Returns
true if the region intersects the rect
|
Attributes
region