1998-05-22 14:15:57 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Netscape Public License
|
|
|
|
* Version 1.0 (the "NPL"); you may not use this file except in
|
|
|
|
* compliance with the NPL. You may obtain a copy of the NPL at
|
|
|
|
* http://www.mozilla.org/NPL/
|
|
|
|
*
|
|
|
|
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* NPL.
|
|
|
|
*
|
|
|
|
* The Initial Developer of this code under the NPL is Netscape
|
|
|
|
* Communications Corporation. Portions created by Netscape are
|
|
|
|
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
|
|
|
* Reserved.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef nsIBlender_h___
|
|
|
|
#define nsIBlender_h___
|
|
|
|
|
|
|
|
#include "nscore.h"
|
|
|
|
#include "nsISupports.h"
|
|
|
|
#include "nsIRenderingContext.h"
|
|
|
|
|
1998-06-11 17:33:26 +00:00
|
|
|
// IID for the nsIBlender interface
|
1998-05-22 14:15:57 +00:00
|
|
|
#define NS_IBLENDER_IID \
|
|
|
|
{ 0xbdb4b5b0, 0xf0db, 0x11d1, \
|
|
|
|
{ 0xa8, 0x2a, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
|
|
|
|
// Blender interface
|
|
|
|
class nsIBlender : public nsISupports
|
|
|
|
{
|
|
|
|
public:
|
1998-11-04 16:02:50 +00:00
|
|
|
|
1998-05-22 14:15:57 +00:00
|
|
|
/**
|
|
|
|
* Initialize the Blender
|
1998-11-04 16:02:50 +00:00
|
|
|
* @update dc 11/4/98
|
|
|
|
* @param aDeviceContext is where the blender can get info about the device its blending on
|
1998-05-22 14:15:57 +00:00
|
|
|
* @result The result of the initialization, NS_OK if no errors
|
|
|
|
*/
|
1998-11-04 19:03:37 +00:00
|
|
|
NS_IMETHOD Init(nsIDeviceContext *aDeviceContext) = 0;
|
1998-06-22 14:41:23 +00:00
|
|
|
|
1998-05-22 14:15:57 +00:00
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
* @param aSX x offset into source drawing surface of blend area
|
|
|
|
* @param aSY y offset into source drawing surface of blend area
|
|
|
|
* @param aWidth width of blend area
|
|
|
|
* @param aHeight width of blend area
|
1998-11-04 16:02:50 +00:00
|
|
|
* @param aSrc source for the blending
|
1998-05-22 14:15:57 +00:00
|
|
|
* @param aDest destination for blending
|
|
|
|
* @param aDX x offset into destination drawing surface of blend area
|
|
|
|
* @param aDY y offset into destination drawing surface of blend area
|
|
|
|
* @param aSrcOpacity 0.0f -> 1.0f opacity value of source area. 1.0f indicates
|
|
|
|
* complete opacity.
|
|
|
|
*/
|
1998-11-04 19:03:37 +00:00
|
|
|
NS_IMETHOD Blend(PRInt32 aSX, PRInt32 aSY, PRInt32 aWidth, PRInt32 aHeight,nsDrawingSurface aSrc,
|
|
|
|
nsDrawingSurface aDest, PRInt32 aDX, PRInt32 aDY, float aSrcOpacity,PRBool aSaveBlendArea) = 0;
|
1998-06-25 15:07:31 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Restore the the blended area of the image if one was save on a previous blend.
|
|
|
|
*/
|
1998-11-04 19:03:37 +00:00
|
|
|
NS_IMETHOD RestoreImage(nsDrawingSurface aDst) = 0;
|
1998-05-22 14:15:57 +00:00
|
|
|
};
|
|
|
|
|
1998-10-26 05:39:12 +00:00
|
|
|
#endif
|