BfxPositivePixelOp Class Reference

Pixel operator. More...

#include <bfxpixop.h>

Inheritance diagram for BfxPositivePixelOp:

BfxPixelOp32 BfxPixelOp CCObject SimpleCCObject List of all members.

Protected Member Functions

virtual BOOL IsPixelReallyInRegion (INT32 x, INT32 y)
 To be overriden by derived classes.

Private Member Functions

 CC_DECLARE_DYNCREATE (BfxPositivePixelOp)

Detailed Description

Pixel operator.

Author:
Alex_Bligh (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/10/1994
PixelOp that determines whether a pixel is better by more than a given amount in one bitmap than in another

Definition at line 394 of file bfxpixop.h.


Member Function Documentation

BfxPositivePixelOp::CC_DECLARE_DYNCREATE BfxPositivePixelOp   )  [private]
 

BOOL BfxPositivePixelOp::IsPixelReallyInRegion INT32  x,
INT32  y
[protected, virtual]
 

To be overriden by derived classes.

Author:
Alex_Bligh (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/03/95
Parameters:
x,y = coordinates of pixel [INPUTS]
None [OUTPUTS]
Returns:
Whether pixel is in the region or not.

Errors: None Scope: Public

See also:
BfxPixelOp::IsInRegion()
The region calculation is done as ( ((B-T)^2 >= Value ) && ((A-T)^2 < Value)) where A = pProposed - the proposed image (i.e. new thing with grad fill on) B = pCurrent - the current built up image T = pOriginal - the image to be traced

Reimplemented from BfxPixelOp.

Definition at line 814 of file bfxpixop.cpp.

00815 {
00816     INT32 BE;
00817     INT32 AE;
00818     DWORD Pixel = y*Width+x;
00819 
00820     AE = ( IntegerSquare( ((INT32)(((AluPix32 *) pA)[Pixel].R)) - ((INT32)(((AluPix32 *) pT)[Pixel].R)))
00821      + IntegerSquare( ((INT32)(((AluPix32 *) pA)[Pixel].G)) - ((INT32)(((AluPix32 *) pT)[Pixel].G)))
00822      + IntegerSquare( ((INT32)(((AluPix32 *) pA)[Pixel].B)) - ((INT32)(((AluPix32 *) pT)[Pixel].B))) );
00823 
00824     BE = (IntegerSquare( ((INT32)(((AluPix32 *) pB)[Pixel].R)) - ((INT32)(((AluPix32 *) pT)[Pixel].R)))
00825      + IntegerSquare( ((INT32)(((AluPix32 *) pB)[Pixel].G)) - ((INT32)(((AluPix32 *) pT)[Pixel].G)))
00826      + IntegerSquare( ((INT32)(((AluPix32 *) pB)[Pixel].B)) - ((INT32)(((AluPix32 *) pT)[Pixel].B))) );
00827 
00828     return ((AE<Value) && (BE>=Value));
00829 }


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:51:13 2007 for Camelot by  doxygen 1.4.4