Back to index

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

#include <nsIBlender.h>

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

List of all members.

Public Member Functions

NS_IMETHOD Init (nsIDeviceContext *aContext)=0
 Initialize the Blender dc 11/4/98.
NS_IMETHOD Blend (PRInt32 aSX, PRInt32 aSY, PRInt32 aWidth, PRInt32 aHeight, nsIDrawingSurface *aSrc, nsIDrawingSurface *aDest, PRInt32 aDX, PRInt32 aDY, float aSrcOpacity, nsIDrawingSurface *aSecondSrc=nsnull, nscolor aSrcBackColor=NS_RGB(0, 0, 0), nscolor aSecondSrcBackColor=NS_RGB(0, 0, 0))=0
 NOTE: if we can make this static, that would be great.
NS_IMETHOD Blend (PRInt32 aSX, PRInt32 aSY, PRInt32 aWidth, PRInt32 aHeight, nsIRenderingContext *aSrc, nsIRenderingContext *aDest, PRInt32 aDX, PRInt32 aDY, float aSrcOpacity, nsIRenderingContext *aSecondSrc=nsnull, nscolor aSrcBackColor=NS_RGB(0, 0, 0), nscolor aSecondSrcBackColor=NS_RGB(0, 0, 0))=0
NS_IMETHOD GetAlphas (const nsRect &aRect, nsIDrawingSurface *aBlack, nsIDrawingSurface *aWhite, PRUint8 **aAlphas)=0
 GetAlphas computes an array of alpha values for a rectangle of pixels, using the drawn-onto-black and the drawn-onto-white images.

Detailed Description

Definition at line 53 of file nsIBlender.h.


Member Function Documentation

NS_IMETHOD nsIBlender::Blend ( PRInt32  aSX,
PRInt32  aSY,
PRInt32  aWidth,
PRInt32  aHeight,
nsIDrawingSurface aSrc,
nsIDrawingSurface aDest,
PRInt32  aDX,
PRInt32  aDY,
float  aSrcOpacity,
nsIDrawingSurface aSecondSrc = nsnull,
nscolor  aSrcBackColor = NS_RGB(0, 0, 0),
nscolor  aSecondSrcBackColor = NS_RGB(0, 0, 0) 
) [pure virtual]

NOTE: if we can make this static, that would be great.

I don't think we can. Blend source and destination nsDrawingSurfaces. Both drawing surfaces will have bitmaps associated with them.

Parameters:
aSXx offset into source drawing surface of blend area
aSYy offset into source drawing surface of blend area
aWidthwidth of blend area
aHeightwidth of blend area
aSrcsource for the blending
aDestdestination for blending
aDXx offset into destination drawing surface of blend area
aDYy offset into destination drawing surface of blend area
aSrcOpacity0.0f -> 1.0f opacity value of source area. 1.0f indicates complete opacity.
aSecondSrcan optional second source drawing surface which is used in conjunction with the background color parameters to determine which pixels to blend
aSrcBackColorcolor of pixels in aSrc that should be considered "background" color
aSecondSrcBackColorcolor of pixels in aSrc that should be considered "background" color

Implemented in NS_GFX, and nsCairoBlender.

NS_IMETHOD nsIBlender::Blend ( PRInt32  aSX,
PRInt32  aSY,
PRInt32  aWidth,
PRInt32  aHeight,
nsIRenderingContext aSrc,
nsIRenderingContext aDest,
PRInt32  aDX,
PRInt32  aDY,
float  aSrcOpacity,
nsIRenderingContext aSecondSrc = nsnull,
nscolor  aSrcBackColor = NS_RGB(0, 0, 0),
nscolor  aSecondSrcBackColor = NS_RGB(0, 0, 0) 
) [pure virtual]

Implemented in NS_GFX, and nsCairoBlender.

NS_IMETHOD nsIBlender::GetAlphas ( const nsRect aRect,
nsIDrawingSurface aBlack,
nsIDrawingSurface aWhite,
PRUint8 **  aAlphas 
) [pure virtual]

GetAlphas computes an array of alpha values for a rectangle of pixels, using the drawn-onto-black and the drawn-onto-white images.

The pixels are returned in a new'ed array of aRect.width*aRect.height elements, in row-major order. This array must be freed by the caller.

Implemented in NS_GFX, and nsCairoBlender.

NS_IMETHOD nsIBlender::Init ( nsIDeviceContext aContext) [pure virtual]

Initialize the Blender dc 11/4/98.

Parameters:
aContextis where the blender can get info about the device its blending on
Returns:
The result of the initialization, NS_OK if no errors

Implemented in NS_GFX, NS_GFX, and nsCairoBlender.


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