Back to index

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

#include <nsIImage.h>

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

List of all members.

Public Member Functions

virtual nsresult Init (PRInt32 aWidth, PRInt32 aHeight, PRInt32 aDepth, nsMaskRequirements aMaskRequirements)=0
 Build and initialize the nsIImage.
virtual PRInt32 GetBytesPix ()=0
 Get the number of bytes per pixel for this image - dwc 2/3/99.
virtual PRBool GetIsRowOrderTopToBottom ()=0
 Get whether rows are organized top to bottom, or bottom to top - syd 3/29/99.
virtual PRInt32 GetWidth ()=0
 Get the width for the pixelmap - dwc 2/1/99.
virtual PRInt32 GetHeight ()=0
 Get the height for the pixelmap - dwc 2/1/99.
virtual PRUint8GetBits ()=0
 Get a pointer to the bits for the pixelmap, only if it is not optimized - dwc 2/1/99.
virtual PRInt32 GetLineStride ()=0
 Get the number of bytes needed to get to the next scanline for the pixelmap - dwc 2/1/99.
virtual PRBool GetHasAlphaMask ()=0
 Get whether this image has an alpha mask.
virtual PRUint8GetAlphaBits ()=0
 Get a pointer to the bits for the alpha mask - dwc 2/1/99.
virtual PRInt32 GetAlphaLineStride ()=0
 Get the number of bytes per scanline for the alpha mask - dwc 2/1/99.
virtual void ImageUpdated (nsIDeviceContext *aContext, PRUint8 aFlags, nsIntRect *aUpdateRect)=0
 Update the nsIImage color table - dwc 2/1/99.
virtual PRBool GetIsImageComplete ()=0
 Get whether this image's region is completely filled with data.
virtual nsresult Optimize (nsIDeviceContext *aContext)=0
 Converted this pixelmap to an optimized pixelmap for the device - dwc 2/1/99.
virtual nsColorMapGetColorMap ()=0
 Get the colormap for the nsIImage - dwc 2/1/99.
NS_IMETHOD Draw (nsIRenderingContext &aContext, nsIDrawingSurface *aSurface, PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight)=0
 BitBlit the nsIImage to a device, the source can be scaled to the dest - dwc 2/1/99.
NS_IMETHOD Draw (nsIRenderingContext &aContext, nsIDrawingSurface *aSurface, PRInt32 aSX, PRInt32 aSY, PRInt32 aSWidth, PRInt32 aSHeight, PRInt32 aDX, PRInt32 aDY, PRInt32 aDWidth, PRInt32 aDHeight)=0
 BitBlit the nsIImage to a device, the source and dest can be scaled - dwc 2/1/99.
NS_IMETHOD DrawTile (nsIRenderingContext &aContext, nsIDrawingSurface *aSurface, PRInt32 aSXOffset, PRInt32 aSYOffset, PRInt32 aPadX, PRInt32 aPadY, const nsRect &aTileRect)=0
NS_IMETHOD DrawToImage (nsIImage *aDstImage, PRInt32 aDX, PRInt32 aDY, PRInt32 aDWidth, PRInt32 aDHeight)=0
 BitBlit the entire (no cropping) nsIImage to another nsImage, the source and dest can be scaled - saari 03/08/01.
virtual PRInt8 GetAlphaDepth ()=0
 Get the alpha depth for the image mask - lordpixel 2001/05/16.
virtual voidGetBitInfo ()=0
 Return information about the bits for this structure - dwc 2/1/99.
NS_IMETHOD LockImagePixels (PRBool aMaskPixels)=0
 LockImagePixels Lock the image pixels so that we can access them directly, with safely.
NS_IMETHOD UnlockImagePixels (PRBool aMaskPixels)=0
 UnlockImagePixels Unlock the image pixels.

Detailed Description

Definition at line 81 of file nsIImage.h.


Member Function Documentation

NS_IMETHOD nsIImage::Draw ( nsIRenderingContext aContext,
nsIDrawingSurface aSurface,
PRInt32  aX,
PRInt32  aY,
PRInt32  aWidth,
PRInt32  aHeight 
) [pure virtual]

BitBlit the nsIImage to a device, the source can be scaled to the dest - dwc 2/1/99.

Parameters:
aSurfacethe surface to blit to
aXThe destination horizontal location
aYThe destination vertical location
aWidthThe destination width of the pixelmap
aHeightThe destination height of the pixelmap
Returns:
if TRUE, no errors

Implemented in nsImageWin, nsImagePh, nsImageQt, nsImageGTK, nsImageMac, nsCairoImage, nsImageOS2, nsImageXlib, and nsImageBeOS.

Here is the caller graph for this function:

NS_IMETHOD nsIImage::Draw ( nsIRenderingContext aContext,
nsIDrawingSurface aSurface,
PRInt32  aSX,
PRInt32  aSY,
PRInt32  aSWidth,
PRInt32  aSHeight,
PRInt32  aDX,
PRInt32  aDY,
PRInt32  aDWidth,
PRInt32  aDHeight 
) [pure virtual]

BitBlit the nsIImage to a device, the source and dest can be scaled - dwc 2/1/99.

Parameters:
aSurfacethe surface to blit to
aSXThe source width of the pixelmap
aSYThe source vertical location
aSWidthThe source width of the pixelmap
aSHeightThe source height of the pixelmap
aDXThe destination horizontal location
aDYThe destination vertical location
aDWidthThe destination width of the pixelmap
aDHeightThe destination height of the pixelmap
Returns:
if TRUE, no errors

Implemented in nsImageWin, nsImageQt, nsImagePh, nsImageGTK, nsImageMac, nsCairoImage, nsImageOS2, nsImageXlib, and nsImageBeOS.

NS_IMETHOD nsIImage::DrawTile ( nsIRenderingContext aContext,
nsIDrawingSurface aSurface,
PRInt32  aSXOffset,
PRInt32  aSYOffset,
PRInt32  aPadX,
PRInt32  aPadY,
const nsRect aTileRect 
) [pure virtual]
NS_IMETHOD nsIImage::DrawToImage ( nsIImage aDstImage,
PRInt32  aDX,
PRInt32  aDY,
PRInt32  aDWidth,
PRInt32  aDHeight 
) [pure virtual]

BitBlit the entire (no cropping) nsIImage to another nsImage, the source and dest can be scaled - saari 03/08/01.

Parameters:
aDstImagethe nsImage to blit to
aDXThe destination horizontal location
aDYThe destination vertical location
aDWidthThe destination width of the pixelmap
aDHeightThe destination height of the pixelmap
Returns:
if TRUE, no errors

Implemented in nsImageWin, nsImageMac, nsImageQt, nsImageOS2, nsImagePh, nsImageGTK, nsCairoImage, nsImageXlib, and nsImageBeOS.

virtual PRUint8* nsIImage::GetAlphaBits ( ) [pure virtual]

Get a pointer to the bits for the alpha mask - dwc 2/1/99.

Returns:
address of the alpha mask pixel array

Implemented in nsImagePh, nsImageWin, nsImageGTK, nsImageXlib, nsImageBeOS, nsImageOS2, nsImageQt, nsImageMac, and nsCairoImage.

Here is the caller graph for this function:

virtual PRInt8 nsIImage::GetAlphaDepth ( ) [pure virtual]

Get the alpha depth for the image mask - lordpixel 2001/05/16.

Returns:
the alpha mask depth for the image, ie, 0, 1 or 8

Implemented in nsImageWin, nsImageOS2, nsImagePh, nsImageGTK, nsImageQt, nsImageXlib, nsImageMac, nsImageBeOS, and nsCairoImage.

Here is the caller graph for this function:

virtual PRInt32 nsIImage::GetAlphaLineStride ( ) [pure virtual]

Get the number of bytes per scanline for the alpha mask - dwc 2/1/99.

Returns:
The number of bytes in each scanline

Implemented in nsImagePh, nsImageWin, nsImageGTK, nsImageXlib, nsImageBeOS, nsImageOS2, nsImageQt, nsImageMac, and nsCairoImage.

Here is the caller graph for this function:

virtual void* nsIImage::GetBitInfo ( ) [pure virtual]

Return information about the bits for this structure - dwc 2/1/99.

Returns:
a bitmap info structure for the Device Dependent Bits

Implemented in nsImageWin, nsImageOS2, nsImageQt, nsImageMac, nsCairoImage, nsImageGTK, nsImagePh, nsImageBeOS, and nsImageXlib.

Here is the caller graph for this function:

virtual PRUint8* nsIImage::GetBits ( ) [pure virtual]

Get a pointer to the bits for the pixelmap, only if it is not optimized - dwc 2/1/99.

Returns:
address of the DIB pixel array

Implemented in nsImageWin, nsImageGTK, nsImageQt, nsImageOS2, nsImageMac, nsCairoImage, nsImagePh, nsImageBeOS, and nsImageXlib.

Here is the caller graph for this function:

virtual PRInt32 nsIImage::GetBytesPix ( ) [pure virtual]

Get the number of bytes per pixel for this image - dwc 2/3/99.

Returns:
- the number of bytes per pixel

Implemented in nsImageWin, nsImageGTK, nsImageQt, nsImageOS2, nsCairoImage, nsImageMac, nsImageBeOS, nsImagePh, and nsImageXlib.

virtual nsColorMap* nsIImage::GetColorMap ( ) [pure virtual]

Get the colormap for the nsIImage - dwc 2/1/99.

Returns:
if non null, the colormap for the pixelmap,otherwise the image is not color mapped

Implemented in nsImageWin, nsImagePh, nsImageQt, nsImageGTK, nsImageMac, nsImageOS2, nsCairoImage, nsImageBeOS, and nsImageXlib.

Here is the caller graph for this function:

virtual PRBool nsIImage::GetHasAlphaMask ( ) [pure virtual]

Get whether this image has an alpha mask.

Preferable to testing if GetAlphaBits() is non-null. - sfraser 10/19/99

Returns:
PR_TRUE if the image has an alpha mask, PR_FALSE otherwise

Implemented in nsImagePh, nsImageGTK, nsImageWin, nsImageXlib, nsImageBeOS, nsImageOS2, nsImageQt, nsImageMac, and nsCairoImage.

virtual PRInt32 nsIImage::GetHeight ( ) [pure virtual]

Get the height for the pixelmap - dwc 2/1/99.

Returns:
The height in pixels for the pixelmap

Implemented in nsImageWin, nsImageGTK, nsImageQt, nsImageOS2, nsCairoImage, nsImageMac, nsImageBeOS, nsImagePh, and nsImageXlib.

Here is the caller graph for this function:

virtual PRBool nsIImage::GetIsImageComplete ( ) [pure virtual]

Get whether this image's region is completely filled with data.

Returns:
PR_TRUE if image is complete, PR_FALSE if image is not yet complete or broken

Implemented in nsImagePh, nsImageWin, nsImageGTK, nsImageXlib, nsImageBeOS, nsImageOS2, nsImageQt, nsImageMac, and nsCairoImage.

virtual PRBool nsIImage::GetIsRowOrderTopToBottom ( ) [pure virtual]

Get whether rows are organized top to bottom, or bottom to top - syd 3/29/99.

Returns:
PR_TRUE if top to bottom, else PR_FALSE

Implemented in nsImageWin, nsImageGTK, nsImageOS2, nsImageQt, nsImagePh, nsImageBeOS, nsImageXlib, nsCairoImage, and nsImageMac.

virtual PRInt32 nsIImage::GetLineStride ( ) [pure virtual]

Get the number of bytes needed to get to the next scanline for the pixelmap - dwc 2/1/99.

Returns:
The number of bytes in each scanline

Implemented in nsImageWin, nsImageGTK, nsImageQt, nsImageOS2, nsImagePh, nsImageMac, nsCairoImage, nsImageBeOS, and nsImageXlib.

Here is the caller graph for this function:

virtual PRInt32 nsIImage::GetWidth ( ) [pure virtual]

Get the width for the pixelmap - dwc 2/1/99.

Returns:
The width in pixels for the pixelmap

Implemented in nsImageWin, nsImageGTK, nsImageQt, nsImageOS2, nsCairoImage, nsImageMac, nsImageBeOS, nsImagePh, and nsImageXlib.

Here is the caller graph for this function:

virtual void nsIImage::ImageUpdated ( nsIDeviceContext aContext,
PRUint8  aFlags,
nsIntRect aUpdateRect 
) [pure virtual]

Update the nsIImage color table - dwc 2/1/99.

Parameters:
aFlagsUsed to pass in parameters for the update
aUpdateRectThe rectangle to update

Implemented in nsImageWin, nsImageGTK, nsImagePh, nsImageXlib, nsImageBeOS, nsImageOS2, nsImageQt, nsImageMac, and nsCairoImage.

virtual nsresult nsIImage::Init ( PRInt32  aWidth,
PRInt32  aHeight,
PRInt32  aDepth,
nsMaskRequirements  aMaskRequirements 
) [pure virtual]

Build and initialize the nsIImage.

Parameters:
aWidthThe width in pixels of the desired pixelmap
aHeightThe height in pixels of the desired pixelmap
aDepthThe number of bits per pixel for the pixelmap
aMaskRequirementsA flag indicating if a alpha mask should be allocated

Implemented in nsImagePh, nsImageWin, nsImageGTK, nsImageXlib, nsImageBeOS, nsImageOS2, nsImageQt, nsCairoImage, and nsImageMac.

NS_IMETHOD nsIImage::LockImagePixels ( PRBool  aMaskPixels) [pure virtual]

LockImagePixels Lock the image pixels so that we can access them directly, with safely.

May be a noop on some platforms.

aMaskPixels = PR_TRUE for the mask, PR_FALSE for the image

Must be balanced by a call to UnlockImagePixels().

- sfraser 10/18/99

Returns:
error result

Implemented in nsImageWin, nsImageOS2, nsImagePh, nsImageGTK, nsImageQt, nsImageMac, nsImageXlib, nsImageBeOS, and nsCairoImage.

Here is the caller graph for this function:

virtual nsresult nsIImage::Optimize ( nsIDeviceContext aContext) [pure virtual]

Converted this pixelmap to an optimized pixelmap for the device - dwc 2/1/99.

Parameters:
aContextThe device to optimize for
Returns:
the result of the operation, if NS_OK, then the pixelmap is optimized

Implemented in nsImagePh, nsImageWin, nsImageGTK, nsImageXlib, nsImageBeOS, nsImageOS2, nsImageQt, nsImageMac, and nsCairoImage.

NS_IMETHOD nsIImage::UnlockImagePixels ( PRBool  aMaskPixels) [pure virtual]

UnlockImagePixels Unlock the image pixels.

May be a noop on some platforms.

Should balance an earlier call to LockImagePixels().

aMaskPixels = PR_TRUE for the mask, PR_FALSE for the image

- sfraser 10/18/99

Returns:
error result

Implemented in nsImageWin, nsImageOS2, nsImagePh, nsImageGTK, nsImageQt, nsImageMac, nsImageXlib, nsImageBeOS, and nsCairoImage.

Here is the caller graph for this function:


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