Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions
nsIRegion Class Reference

#include <nsIRegion.h>

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

List of all members.

Public Member Functions

virtual nsresult Init (void)=0
virtual void SetTo (const nsIRegion &aRegion)=0
 copy operator equivalent that takes another region
virtual void SetTo (PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight)=0
 copy operator equivalent that takes a rect
virtual void Intersect (const nsIRegion &aRegion)=0
 destructively intersect another region with this one
virtual void Intersect (PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight)=0
 destructively intersect a rect with this region
virtual void Union (const nsIRegion &aRegion)=0
 destructively union another region with this one
virtual void Union (PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight)=0
 destructively union a rect with this region
virtual void Subtract (const nsIRegion &aRegion)=0
 destructively subtract another region with this one
virtual void Subtract (PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight)=0
 destructively subtract a rect from this region
virtual PRBool IsEmpty (void)=0
 is this region empty? i.e.
virtual PRBool IsEqual (const nsIRegion &aRegion)=0
 == operator equivalent i.e.
virtual void GetBoundingBox (PRInt32 *aX, PRInt32 *aY, PRInt32 *aWidth, PRInt32 *aHeight)=0
 returns the bounding box of the region i.e.
virtual void Offset (PRInt32 aXOffset, PRInt32 aYOffset)=0
 offsets the region in x and y
virtual PRBool ContainsRect (PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight)=0
 does the region intersect the rectangle?
NS_IMETHOD GetRects (nsRegionRectSet **aRects)=0
 get the set of rects which make up this region.
NS_IMETHOD FreeRects (nsRegionRectSet *aRects)=0
 Free a rect set returned by GetRects.
NS_IMETHOD GetNativeRegion (void *&aRegion) const =0
 Get the native region that this nsIRegion represents.
NS_IMETHOD GetRegionComplexity (nsRegionComplexity &aComplexity) const =0
 Get the complexity of the region as defined by the nsRegionComplexity enum.
NS_IMETHOD GetNumRects (PRUint32 *aRects) const =0
 get the number of rects which make up this region.

Detailed Description

Definition at line 77 of file nsIRegion.h.


Member Function Documentation

virtual PRBool nsIRegion::ContainsRect ( PRInt32  aX,
PRInt32  aY,
PRInt32  aWidth,
PRInt32  aHeight 
) [pure virtual]

does the region intersect the rectangle?

Parameters:
rectto check for containment
Returns:
true if the region intersects the rect

Implemented in nsRegionPh, nsRegionGTK, nsRegionQt, nsRegionXlib, nsRegionBeOS, nsRegionMac, nsCairoRegion, nsRegionWin, and nsRegionImpl.

NS_IMETHOD nsIRegion::FreeRects ( nsRegionRectSet aRects) [pure virtual]

Free a rect set returned by GetRects.

Parameters:
aRectsrects to free
Returns:
error status

Implemented in nsRegionPh, nsRegionGTK, nsRegionQt, nsRegionXlib, nsRegionBeOS, nsRegionMac, nsCairoRegion, nsRegionWin, and nsRegionImpl.

Here is the caller graph for this function:

virtual void nsIRegion::GetBoundingBox ( PRInt32 aX,
PRInt32 aY,
PRInt32 aWidth,
PRInt32 aHeight 
) [pure virtual]

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

Implemented in nsRegionPh, nsRegionGTK, nsRegionQt, nsRegionXlib, nsRegionBeOS, nsRegionMac, nsCairoRegion, nsRegionWin, and nsRegionImpl.

Here is the caller graph for this function:

NS_IMETHOD nsIRegion::GetNativeRegion ( void *&  aRegion) const [pure virtual]

Get the native region that this nsIRegion represents.

Parameters:
aRegionout parameter for native region handle
Returns:
error status

Implemented in nsRegionPh, nsRegionGTK, nsRegionQt, nsRegionXlib, nsRegionBeOS, nsRegionMac, nsCairoRegion, nsRegionWin, nsRegionImpl, and nsRegionOS2.

Here is the caller graph for this function:

NS_IMETHOD nsIRegion::GetNumRects ( PRUint32 aRects) const [pure virtual]

get the number of rects which make up this region.

Parameters:
aRectsout parameter containing the number of rects comprising the region
Returns:
error status

Implemented in nsRegionPh, nsRegionGTK, nsRegionQt, nsRegionBeOS, nsRegionMac, nsRegionXlib, nsCairoRegion, nsRegionWin, and nsRegionImpl.

NS_IMETHOD nsIRegion::GetRects ( nsRegionRectSet **  aRects) [pure virtual]

get the set of rects which make up this region.

the aRects parameter must be freed by calling FreeRects before the region is deleted. aRects may be passed in again when requesting the rect list as a recycling method.

Parameters:
aRectsout parameter containing set of rects comprising the region
Returns:
error status

Implemented in nsRegionPh, nsRegionGTK, nsRegionQt, nsRegionXlib, nsRegionBeOS, nsRegionMac, nsCairoRegion, nsRegionWin, and nsRegionImpl.

Here is the caller graph for this function:

NS_IMETHOD nsIRegion::GetRegionComplexity ( nsRegionComplexity aComplexity) const [pure virtual]

Get the complexity of the region as defined by the nsRegionComplexity enum.

Parameters:
aComplexityout parameter for region complexity
Returns:
error status

Implemented in nsRegionPh, nsRegionGTK, nsRegionQt, nsRegionMac, nsRegionXlib, nsRegionBeOS, nsCairoRegion, nsRegionWin, and nsRegionImpl.

virtual nsresult nsIRegion::Init ( void  ) [pure virtual]

Implemented in nsRegionPh, nsRegionQt, nsRegionGTK, nsRegionXlib, nsCairoRegion, nsRegionMac, nsRegionBeOS, nsRegionImpl, and nsRegionWin.

Here is the caller graph for this function:

virtual void nsIRegion::Intersect ( const nsIRegion aRegion) [pure virtual]

destructively intersect another region with this one

Parameters:
regionto intersect
Returns:
void

Implemented in nsRegionPh, nsRegionGTK, nsRegionQt, nsRegionXlib, nsRegionBeOS, nsRegionMac, nsCairoRegion, nsRegionWin, and nsRegionImpl.

virtual void nsIRegion::Intersect ( PRInt32  aX,
PRInt32  aY,
PRInt32  aWidth,
PRInt32  aHeight 
) [pure virtual]

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

Implemented in nsRegionPh, nsRegionGTK, nsRegionQt, nsRegionXlib, nsRegionBeOS, nsRegionMac, nsCairoRegion, nsRegionWin, and nsRegionImpl.

virtual PRBool nsIRegion::IsEmpty ( void  ) [pure virtual]

is this region empty? i.e.

does it contain any pixels

Parameters:
none
Returns:
returns whether the region is empty

Implemented in nsRegionPh, nsRegionGTK, nsRegionQt, nsRegionXlib, nsRegionBeOS, nsRegionMac, nsCairoRegion, nsRegionWin, and nsRegionImpl.

virtual PRBool nsIRegion::IsEqual ( const nsIRegion aRegion) [pure virtual]

== operator equivalent i.e.

do the regions contain exactly the same pixels

Parameters:
regionto compare
Returns:
whether the regions are identical

Implemented in nsRegionPh, nsRegionGTK, nsRegionQt, nsRegionXlib, nsRegionBeOS, nsRegionMac, nsCairoRegion, nsRegionWin, and nsRegionImpl.

virtual void nsIRegion::Offset ( PRInt32  aXOffset,
PRInt32  aYOffset 
) [pure virtual]

offsets the region in x and y

Parameters:
xoffsetpixel offset in x
yoffsetpixel offset in y
Returns:
void

Implemented in nsRegionPh, nsRegionGTK, nsRegionQt, nsRegionXlib, nsRegionBeOS, nsRegionMac, nsCairoRegion, nsRegionWin, and nsRegionImpl.

Here is the caller graph for this function:

virtual void nsIRegion::SetTo ( const nsIRegion aRegion) [pure virtual]

copy operator equivalent that takes another region

Parameters:
regionto copy
Returns:
void

Implemented in nsRegionPh, nsRegionGTK, nsRegionQt, nsRegionXlib, nsRegionMac, nsRegionBeOS, nsCairoRegion, nsRegionWin, and nsRegionImpl.

Here is the caller graph for this function:

virtual void nsIRegion::SetTo ( PRInt32  aX,
PRInt32  aY,
PRInt32  aWidth,
PRInt32  aHeight 
) [pure virtual]

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

Implemented in nsRegionPh, nsRegionGTK, nsRegionQt, nsRegionXlib, nsRegionMac, nsRegionBeOS, nsCairoRegion, nsRegionWin, and nsRegionImpl.

virtual void nsIRegion::Subtract ( const nsIRegion aRegion) [pure virtual]

destructively subtract another region with this one

Parameters:
regionto subtract
Returns:
void

Implemented in nsRegionPh, nsRegionGTK, nsRegionQt, nsRegionXlib, nsRegionBeOS, nsRegionMac, nsCairoRegion, nsRegionWin, and nsRegionImpl.

virtual void nsIRegion::Subtract ( PRInt32  aX,
PRInt32  aY,
PRInt32  aWidth,
PRInt32  aHeight 
) [pure virtual]

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

Implemented in nsRegionPh, nsRegionGTK, nsRegionQt, nsRegionXlib, nsRegionBeOS, nsRegionMac, nsCairoRegion, nsRegionWin, and nsRegionImpl.

virtual void nsIRegion::Union ( const nsIRegion aRegion) [pure virtual]

destructively union another region with this one

Parameters:
regionto union
Returns:
void

Implemented in nsRegionPh, nsRegionGTK, nsRegionQt, nsRegionXlib, nsRegionBeOS, nsRegionMac, nsCairoRegion, nsRegionWin, and nsRegionImpl.

virtual void nsIRegion::Union ( PRInt32  aX,
PRInt32  aY,
PRInt32  aWidth,
PRInt32  aHeight 
) [pure virtual]

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

Implemented in nsRegionPh, nsRegionGTK, nsRegionQt, nsRegionXlib, nsRegionBeOS, nsRegionMac, nsCairoRegion, nsRegionWin, and nsRegionImpl.


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