Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
nsIScriptableRegion Interface Reference

import "nsIScriptableRegion.idl";

Inheritance diagram for nsIScriptableRegion:
Inheritance graph
[legend]
Collaboration diagram for nsIScriptableRegion:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void init ()
void setToRegion (in nsIScriptableRegion aRegion)
 copy operator equivalent that takes another region
void setToRect (in long aX, in long aY, in long aWidth, in long aHeight)
 copy operator equivalent that takes a rect
void intersectRegion (in nsIScriptableRegion aRegion)
 destructively intersect another region with this one
void intersectRect (in long aX, in long aY, in long aWidth, in long aHeight)
 destructively intersect a rect with this region
void unionRegion (in nsIScriptableRegion aRegion)
 destructively union another region with this one
void unionRect (in long aX, in long aY, in long aWidth, in long aHeight)
 destructively union a rect with this region
void subtractRegion (in nsIScriptableRegion aRegion)
 destructively subtract another region with this one
void subtractRect (in long aX, in long aY, in long aWidth, in long aHeight)
 destructively subtract a rect from this region
boolean isEmpty ()
 is this region empty? i.e.
boolean isEqualRegion (in nsIScriptableRegion aRegion)
 == operator equivalent i.e.
void getBoundingBox (out long aX, out long aY, out long aWidth, out long aHeight)
 returns the bounding box of the region i.e.
void offset (in long aXOffset, in long aYOffset)
 offsets the region in x and y
boolean containsRect (in long aX, in long aY, in long aWidth, in long aHeight)
 does the region intersect the rectangle?

Public Attributes

readonly attribute nsIRegion region

Detailed Description

Definition at line 50 of file nsIScriptableRegion.idl.


Member Function Documentation

boolean nsIScriptableRegion::containsRect ( in long  aX,
in long  aY,
in long  aWidth,
in long  aHeight 
)

does the region intersect the rectangle?

Parameters:
rectto check for containment
Returns:
true if the region intersects the rect
void nsIScriptableRegion::getBoundingBox ( out long  aX,
out long  aY,
out long  aWidth,
out long  aHeight 
)

returns the bounding box of the region i.e.

the smallest rectangle that completely contains the region.

Parameters:
aXout parameter for xoffset of bounding rect for region
aYout parameter for yoffset of bounding rect for region
aWidthout parameter for width of bounding rect for region
aHeightout parameter for height of bounding rect for region
Returns:
void
void nsIScriptableRegion::intersectRect ( in long  aX,
in long  aY,
in long  aWidth,
in long  aHeight 
)

destructively intersect a rect with this region

Parameters:
aXxoffset of rect to intersect with region
aYyoffset of rect to intersect with region
aWidthwidth of rect to intersect with region
aHeightheight of rect to intersect with region
Returns:
void

destructively intersect another region with this one

Parameters:
regionto intersect
Returns:
void

is this region empty? i.e.

does it contain any pixels

Parameters:
none
Returns:
returns whether the region is empty

== operator equivalent i.e.

do the regions contain exactly the same pixels

Parameters:
regionto compare
Returns:
whether the regions are identical
void nsIScriptableRegion::offset ( in long  aXOffset,
in long  aYOffset 
)

offsets the region in x and y

Parameters:
xoffsetpixel offset in x
yoffsetpixel offset in y
Returns:
void
void nsIScriptableRegion::setToRect ( in long  aX,
in long  aY,
in long  aWidth,
in long  aHeight 
)

copy operator equivalent that takes a rect

Parameters:
aXxoffset of rect to set region to
aYyoffset of rect to set region to
aWidthwidth of rect to set region to
aHeightheight of rect to set region to
Returns:
void

copy operator equivalent that takes another region

Parameters:
regionto copy
Returns:
void
void nsIScriptableRegion::subtractRect ( in long  aX,
in long  aY,
in long  aWidth,
in long  aHeight 
)

destructively subtract a rect from this region

Parameters:
aXxoffset of rect to subtract with region
aYyoffset of rect to subtract with region
aWidthwidth of rect to subtract with region
aHeightheight of rect to subtract with region
Returns:
void

destructively subtract another region with this one

Parameters:
regionto subtract
Returns:
void
void nsIScriptableRegion::unionRect ( in long  aX,
in long  aY,
in long  aWidth,
in long  aHeight 
)

destructively union a rect with this region

Parameters:
aXxoffset of rect to union with region
aYyoffset of rect to union with region
aWidthwidth of rect to union with region
aHeightheight of rect to union with region
Returns:
void

destructively union another region with this one

Parameters:
regionto union
Returns:
void

Member Data Documentation

Definition at line 200 of file nsIScriptableRegion.idl.


The documentation for this interface was generated from the following file: