BfxColourThresholdPixelOp Class Reference

Pixel operator. More...

#include <bfxpixop.h>

Inheritance diagram for BfxColourThresholdPixelOp:

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 (BfxColourThresholdPixelOp)

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 440 of file bfxpixop.h.


Member Function Documentation

BfxColourThresholdPixelOp::CC_DECLARE_DYNCREATE BfxColourThresholdPixelOp   )  [private]
 

BOOL BfxColourThresholdPixelOp::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 ) && ((Colour-T)^2 < Value)) where Colour = the colour to measure against B = pCurrent - the current built up image T = pOriginal - the image to be traced

Reimplemented from BfxPixelOp.

Definition at line 853 of file bfxpixop.cpp.

00854 {
00855     INT32 BE;
00856     INT32 AE;
00857     DWORD Pixel = y*Width+x;
00858 
00859     AluPix32 TheColour;
00860     *(DWORD *)(void *)(&TheColour)=Colour; // Yuck
00861 
00862     AE = ( IntegerSquare( ((INT32)(TheColour.R)) - ((INT32)(((AluPix32 *) pT)[Pixel].R))) 
00863          + IntegerSquare( ((INT32)(TheColour.G)) - ((INT32)(((AluPix32 *) pT)[Pixel].G)))    
00864          + IntegerSquare( ((INT32)(TheColour.B)) - ((INT32)(((AluPix32 *) pT)[Pixel].B))) ); 
00865 
00866     BE = (IntegerSquare( ((INT32)(((AluPix32 *) pB)[Pixel].R)) - ((INT32)(((AluPix32 *) pT)[Pixel].R)))
00867      + IntegerSquare( ((INT32)(((AluPix32 *) pB)[Pixel].G)) - ((INT32)(((AluPix32 *) pT)[Pixel].G)))
00868      + IntegerSquare( ((INT32)(((AluPix32 *) pB)[Pixel].B)) - ((INT32)(((AluPix32 *) pT)[Pixel].B))) );
00869 
00870     return ((AE<Value) && (BE>=Value));
00871 }


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