[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

[XaraXtreme-commits] Commit Complete



Commit by  : alex
Repository : xara
Revision   : 1086
Date       : Tue May 16 16:43:18 BST 2006

Changed paths:
   M /Trunk/XaraLX/Kernel/Makefile.am
   M /Trunk/XaraLX/Kernel/bfxbase.cpp
   M /Trunk/XaraLX/Kernel/main.cpp
   M /Trunk/XaraLX/Kernel/main1.cpp
   M /Trunk/XaraLX/Kernel/main3.cpp
   M /Trunk/XaraLX/Kernel/sgbitmap.cpp
   M /Trunk/XaraLX/Kernel/tracectl.cpp
   M /Trunk/XaraLX/Kernel/tracedlg.cpp
   M /Trunk/XaraLX/Kernel/tracergn.cpp
   M /Trunk/XaraLX/wxOil/Makefile.am
   M /Trunk/XaraLX/wxOil/bfxalu.cpp
   M /Trunk/XaraLX/wxOil/bfxalu.h
   M /Trunk/XaraLX/wxOil/bfxpixop.cpp

Add bitmap tracer


Diff:
Index: Trunk/XaraLX/Kernel/tracectl.cpp
===================================================================
--- Trunk/XaraLX/Kernel/tracectl.cpp	(revision 1085)
+++ Trunk/XaraLX/Kernel/tracectl.cpp	(revision 1086)
@@ -122,6 +122,7 @@
 #include "pathproc.h"
 #include "progress.h"
 //#include "tracerc.h"
+#include "keypress.h"
 
 // This is not compulsory, but you may as well put it in so that the correct version
 // of your file can be registered in the .exe
@@ -741,7 +742,7 @@
 	// want to stick in the tree, and when we have decided the trace is complete.	
 	while (TRUE)
 	{
-		ERROR1IF(BreakKeyHit(), FALSE, _R(IDS_ABORT));
+		ERROR1IF(KeyPress::IsEscapePressed(), FALSE, _R(IDS_ABORT));
 
 		// Get the next error area out.
 		// Occasionally (when there are no regions left in the error region list), this will result in a 
@@ -1144,10 +1145,10 @@
 
 			if (TRUE || ShapeFreePass || !pErrorRegionList->GetCurrent(&InitialX,&InitialY,&RegionArea)) // if no items on new list
 			{
-				double AError = 0.0;
-				double BError = 0.0;
-				INT32 TotalPixels = 0;
-				INT32 MarkedPixels = 0;
+//				double AError = 0.0;
+//				double BError = 0.0;
+//				INT32 TotalPixels = 0;
+//				INT32 MarkedPixels = 0;
 
 				INT32 theErrorThreshold = (INT32)(0.5+3.0*DoubleSquare(InitialAreaErrorThreshold * 255.0));
 				
@@ -1232,7 +1233,7 @@
 				if (!pColourThresholdPixelOp->IsInRegion(InitialX, InitialY))
 				{
 					FoundRegion=FALSE;
-					ERROR3IF(IsUserName("Alex"),"ScanThreshold lied");
+//					ERROR3IF(IsUserName("Alex"),"ScanThreshold lied");
 				}
 
 				if (!pErrorRegionList->Empty()) return FALSE;
Index: Trunk/XaraLX/Kernel/tracergn.cpp
===================================================================
--- Trunk/XaraLX/Kernel/tracergn.cpp	(revision 1085)
+++ Trunk/XaraLX/Kernel/tracergn.cpp	(revision 1086)
@@ -747,7 +747,7 @@
 
 	pBfxPixelOp = thepBfxPixelOp;
 	
-	ERROR2IF( ((!pBfxPixelOp->IsInRegion(InitialX,InitialY))), FALSE, "Initial point not in region" )
+	ERROR2IF( ((!pBfxPixelOp->IsInRegion(InitialX,InitialY))), FALSE, "Initial point not in region" );
 
 	BOOL Bottom=FALSE;
 	while (!Bottom)
@@ -1263,7 +1263,7 @@
 {
 	INT32 pos;
 	INT32 i;
-	INT32 NumPoints = LastPoint - FirstPoint + 1;
+//	INT32 NumPoints = LastPoint - FirstPoint + 1;
 	
 	// Build a matrix type of thing that contains the tangents scaled by the offsets
 	TraceBoundaryPoint A[FIT_STEPS+1][2];			//	Vector2 (*A)[2] = new Vector2[NumPoints+1][2];
Index: Trunk/XaraLX/Kernel/bfxbase.cpp
===================================================================
--- Trunk/XaraLX/Kernel/bfxbase.cpp	(revision 1085)
+++ Trunk/XaraLX/Kernel/bfxbase.cpp	(revision 1086)
@@ -172,7 +172,7 @@
 
 BitmapEffectBase::~BitmapEffectBase()
 {
-	ERROR3IF((Destination!=NULL),"Bitmap effect destructor called when destination exists")
+	ERROR3IF((Destination!=NULL),"Bitmap effect destructor called when destination exists");
 	// Unforunately we habe to use ERROR3 not ERROR2 as we can't return a flag	
 }
 
@@ -472,6 +472,6 @@
 
 BOOL BitmapEffectBase::Run()
 {
-	ERROR2IF(!IsAbleToRun(),FALSE,"BitmapEffectRun called at inappropriate time")
+	ERROR2IF(!IsAbleToRun(),FALSE,"BitmapEffectRun called at inappropriate time");
 	return TRUE;
 }
Index: Trunk/XaraLX/Kernel/Makefile.am
===================================================================
--- Trunk/XaraLX/Kernel/Makefile.am	(revision 1085)
+++ Trunk/XaraLX/Kernel/Makefile.am	(revision 1086)
@@ -67,6 +67,7 @@
 	optsedit.cpp optsmisc.cpp optspntr.cpp optstune.cpp optsview.cpp optsgrid.cpp \
 	optspage.cpp optsundo.cpp optsscal.cpp optsunit.cpp pagesize.cpp radio.cpp \
 	xpfcaps.cpp xpfilter.cpp xpfrgn.cpp layerprp.cpp prpsgds.cpp prpslyrs.cpp \
-	aprps.cpp prevwdlg.cpp frameops.cpp newcol.cpp
+	aprps.cpp prevwdlg.cpp frameops.cpp newcol.cpp tracedlg.cpp tracectl.cpp \
+	tracergn.cpp bfxbase.cpp
 
 AM_CXXFLAGS = $(XARAFLAGS)
Index: Trunk/XaraLX/Kernel/main1.cpp
===================================================================
--- Trunk/XaraLX/Kernel/main1.cpp	(revision 1085)
+++ Trunk/XaraLX/Kernel/main1.cpp	(revision 1086)
@@ -144,7 +144,7 @@
 		&& InitMemory()					// Init Memory Manager
 		&& CursorStack::Init()			// Must come before tool initialisation.
 PORTNOTE("other","Removed BFX")
-#if !defined(EXCLUDE_FROM_XARALX) && !defined(EXCLUDE_BFX)
+#if !defined(EXCLUDE_BFX)
 		&& BitmapEffectBase::Init()		// must be before anything using this subsystem
 #endif
 		&& Module::InitModules()
Index: Trunk/XaraLX/Kernel/tracedlg.cpp
===================================================================
--- Trunk/XaraLX/Kernel/tracedlg.cpp	(revision 1085)
+++ Trunk/XaraLX/Kernel/tracedlg.cpp	(revision 1086)
@@ -106,7 +106,7 @@
 #include "tracectl.h"
 
 //#include "mario.h"
-#include "reshlpid.h"
+//#include "reshlpid.h"
 //#include "tracerc.h"
 //#include "rik.h"
 //#include "andy.h"
@@ -142,6 +142,7 @@
 #include "wrkrect.h"	
 
 #include "mrhbits.h"
+#include "keypress.h"
 
 // This is not compulsory, but you may as well put it in so that the correct version
 // of your file can be registered in the .exe
@@ -263,7 +264,7 @@
 {
 	pOriginal = NULL;
 	
-	if(!m_p24BitCopyNames.IsEmpty())
+	if(!m_p24BitCopyNames.empty())
 	{
 		Remove24BitTempCopy();
 	}
@@ -292,20 +293,19 @@
 	KernelBitmap * pBmp = (KernelBitmap *)(Bitmaps->GetHead());
 	KernelBitmap * pTemp = NULL;
 
-	POSITION Pos = NULL;
 	BOOL DeleteThisBMP = FALSE;
 
 	// If we`ve got a valid BMP then do some testing!
 	while (pBmp != NULL)
 	{
 		// Get the first Copy Name from our list
-		Pos = m_p24BitCopyNames.GetHeadPosition();
+		std::list< String_256 >::iterator Pos = m_p24BitCopyNames.begin();
 
 		// While the Position and the BMP are both valid do the check!
-		while(Pos != NULL && pBmp != NULL)
+		while(Pos != m_p24BitCopyNames.end() && pBmp != NULL)
 		{
 			// Check to see if the BMP`s name matches the one held in the copy list
-			if (pBmp->GetName().CompareTo(m_p24BitCopyNames.GetAt(Pos)) == 0)
+			if (pBmp->GetName().CompareTo(*Pos) == 0)
 			{
 				// Mark this BMP For deletion!
 				DeleteThisBMP = TRUE;
@@ -315,7 +315,7 @@
 			}
 
 			// Get the next name from the copy name list
-			m_p24BitCopyNames.GetNext(Pos);
+			Pos++;
 		}
 
 		// If this isn`t the one then get the next in the list!
@@ -339,10 +339,7 @@
 	}
 
 	// Finished with everything so make sure the list is totally empty!
-	while(!m_p24BitCopyNames.IsEmpty())
-	{
-		m_p24BitCopyNames.RemoveHead();
-	}
+	m_p24BitCopyNames.clear();
 }
 
 /*******************************************************************************************
@@ -443,25 +440,25 @@
 			Str = ((KernelBitmap*)pBmp)->ActualBitmap->GetName();
 			if (((KernelBitmap*)(pBmp)) == pOriginal)
 			{
-				SetStringGadgetValue(_R(IDC_TRACER_BITMAP),&Str, FALSE, -1);
+				SetStringGadgetValue(_R(IDC_TRACER_BITMAP),Str, FALSE, -1);
 				DoneMain = TRUE;
 				SelIndex=Index;
 			}
-			SetStringGadgetValue(_R(IDC_TRACER_BITMAP),&Str,FALSE, Index++);
+			SetStringGadgetValue(_R(IDC_TRACER_BITMAP),Str,FALSE, Index++);
 			pBmp = Bitmaps->GetNext(pBmp);
 		}
 	}
 	else
 	{
 		Str.Load(_R(IDS_K_BFXDLG_DEFAULT));
-		SetStringGadgetValue(_R(IDC_TRACER_BITMAP),&Str,TRUE, 0);
+		SetStringGadgetValue(_R(IDC_TRACER_BITMAP),Str,TRUE, 0);
 	}
 
 	Str.Load(_R(IDS_K_BFXDLG_DEFAULT));
 	SetComboListLength(_R(IDC_TRACER_BITMAP));
 	if (!DoneMain)
 	{
-		SetStringGadgetValue(_R(IDC_TRACER_BITMAP),&Str, FALSE, -1);
+		SetStringGadgetValue(_R(IDC_TRACER_BITMAP),Str, FALSE, -1);
 		SetSelectedValueIndex(_R(IDC_TRACER_BITMAP), 0);
 	}
 	else
@@ -558,9 +555,9 @@
 		}
 	}
 	Temp.MakeMsg(theID, NumPaths, NumPoints);
-	SetStringGadgetValue(_R(IDC_TRACER_STATUSTEXT), &Temp);
-	EnableGadget(IDOK, Done && (!Tracing));
-	EnableGadget(IDCANCEL, !Tracing);
+	SetStringGadgetValue(_R(IDC_TRACER_STATUSTEXT), Temp);
+	EnableGadget(_R(IDOK), Done && (!Tracing));
+	EnableGadget(_R(IDCANCEL), !Tracing);
 	EnableGadget(_R(IDC_TRACER_TRACEBTN), !Tracing);
 	EnableGadget(_R(IDC_TRACER_HELP), !Tracing);
 	return TRUE;
@@ -712,7 +709,7 @@
 	SetLongGadgetValue(_R(IDC_TRACER_SMOOTHNUM), 100-GetLongGadgetValue(_R(IDC_TRACER_SMOOTHSLIDER), 0, 100, 0, NULL));
 	TraceMethod Method=GetTraceMethod();
 	BOOL Mono=(Method == TRACEMETHOD_MONO);
-	BOOL Limited=(Method == TRACEMETHOD_GREYSCALE) || (Method==TRACEMETHOD_256COL);
+//	BOOL Limited=(Method == TRACEMETHOD_GREYSCALE) || (Method==TRACEMETHOD_256COL);
 	BOOL TrueCol=(Method == TRACEMETHOD_TRUECOL);
 	INT32 Passes = GetLongGadgetValue  (_R(IDC_TRACER_PASSESNUM),	0, 100, 0, NULL);
 	if (Method != TRACEMETHOD_TRUECOL) Passes=1;
@@ -934,7 +931,7 @@
 
 			if (!Abort)
 			{
-				if (Abort = (BreakKeyHit() ==TRUE) /*Assignment*/)
+				if ((Abort = (KeyPress::IsEscapePressed() ==TRUE) /*Assignment*/))
 				{
 					ERROR1RAW(_R(IDE_TRACER_ABORT));
 				}
@@ -1038,16 +1035,16 @@
 					// grey at top and bottom
 					INT32 NewHeight = (INT32)( 0.5 + ((double)(VirtualSize.Width()))/BMAspect);
 					if (NewHeight<1) NewHeight = 1;
-					BitmapSize.loy = (VirtualSize.Height()-NewHeight)/2;
-					BitmapSize.hiy = BitmapSize.loy + NewHeight;
+					BitmapSize.lo.y = (VirtualSize.Height()-NewHeight)/2;
+					BitmapSize.hi.y = BitmapSize.lo.y + NewHeight;
 				}
 				else
 				{
 				 	// grey on left and right
 					INT32 NewWidth = (INT32)( 0.5 + ((double)(VirtualSize.Height()))*BMAspect);
 					if (NewWidth<1) NewWidth = 1;
-					BitmapSize.lox = (VirtualSize.Width()-NewWidth)/2;
-					BitmapSize.hix = BitmapSize.lox + NewWidth;
+					BitmapSize.lo.x = (VirtualSize.Width()-NewWidth)/2;
+					BitmapSize.hi.x = BitmapSize.lo.x + NewWidth;
 				}
 
 				// And set this in our bitmap node
@@ -1142,10 +1139,10 @@
 				String_256 Str2(_R(IDS_TRACER_256COL));
 				String_256 Str3(_R(IDS_TRACER_TRUECOL));
 		  	
-				SetStringGadgetValue(_R(IDC_TRACER_METHOD),&Str0,FALSE, 0);
-			  	SetStringGadgetValue(_R(IDC_TRACER_METHOD),&Str1,FALSE, 1);
-			  	SetStringGadgetValue(_R(IDC_TRACER_METHOD),&Str2,FALSE, 2);
-				SetStringGadgetValue(_R(IDC_TRACER_METHOD),&Str3,FALSE, 3);
+				SetStringGadgetValue(_R(IDC_TRACER_METHOD),Str0,FALSE, 0);
+			  	SetStringGadgetValue(_R(IDC_TRACER_METHOD),Str1,FALSE, 1);
+			  	SetStringGadgetValue(_R(IDC_TRACER_METHOD),Str2,FALSE, 2);
+				SetStringGadgetValue(_R(IDC_TRACER_METHOD),Str3,FALSE, 3);
 			
 //				SetStringGadgetValue(_R(IDC_TRACER_METHOD),&Str3, FALSE, -1);
 				SetComboListLength(_R(IDC_TRACER_METHOD));
@@ -1227,73 +1224,62 @@
 			{
 				TraceMethod Method = GetTraceMethod();
 				// See which button was pressed
-				switch (Msg->GadgetID)
+				if (Msg->GadgetID == _R(IDC_TRACER_TRACEBTN))
 				{
-					case _R(IDC_TRACER_TRACEBTN) :
-					{
-						if (!DoTrace(FALSE)) InformError();
-						break;
-					}
-					case _R(IDC_TRACER_RESET) :
-					{
-						LoadSettings(DefaultSetting[(INT32)Method]);
-						break;
-					}
-					case _R(IDC_TRACER_SAVE) :
-					{
-						DefaultMode=Method;
-						SaveSettings(DefaultSetting[(INT32)Method]);
-						break;
-					}
-					case _R(IDC_TRACER_DEFAULT) :
-					{
-						LoadSettings(FactorySetting[(INT32)Method]);
-						break;
-					}
+					if (!DoTrace(FALSE)) InformError();
 				}
+				else if (Msg->GadgetID == _R(IDC_TRACER_RESET))
+				{
+					LoadSettings(DefaultSetting[(INT32)Method]);
+				}
+				else if (Msg->GadgetID == _R(IDC_TRACER_SAVE))
+				{
+					DefaultMode=Method;
+					SaveSettings(DefaultSetting[(INT32)Method]);
+				}
+				else if (Msg->GadgetID == _R(IDC_TRACER_DEFAULT))
+				{
+					LoadSettings(FactorySetting[(INT32)Method]);
+				}
 				break;
 			}
 
 			case DIM_REDRAW :
+			{
 				// This is where all the redrawing is done
 				// Which control in the window is sending the redraw message (if there are many
 				// grdraw controls you can tell which is which from the Gadget ID
 				KernelBitmap * pDestination;
 				KernelBitmap * pTemp;
 				pTraceControl->GetBitmaps(NULL, &pDestination, &pTemp);
-				switch (Msg->GadgetID)
+
+				// Draw the redraw_me control in here
+				if (Msg->GadgetID == _R(IDC_TRACER_ORIGREDRAW))
 				{
-					// Draw the redraw_me control in here
-					case _R(IDC_TRACER_ORIGREDRAW) :
-					{
-						RenderBitmap((ReDrawInfoType*) Msg->DlgMsgParam, pOriginal);
-						break;
-					}
-					case _R(IDC_TRACER_DESTREDRAW) :
-					{
-						RenderBitmap((ReDrawInfoType*) Msg->DlgMsgParam, pDestination);
-						break;
-					}
+					RenderBitmap((ReDrawInfoType*) Msg->DlgMsgParam, pOriginal);
 				}
+				else if (Msg->GadgetID == _R(IDC_TRACER_DESTREDRAW))
+				{
+					RenderBitmap((ReDrawInfoType*) Msg->DlgMsgParam, pDestination);
+				}
 				break;
+			}
 			
 			case DIM_SELECTION_CHANGED:
-				switch (Msg->GadgetID)
+			{
+				if (Msg->GadgetID == _R(IDC_TRACER_BITMAP))
 				{
-					// Draw the redraw_me control in here
-					case _R(IDC_TRACER_BITMAP) :
-					{
-						ReadOriginalComboBox();
-						break;
-					}
-					case _R(IDC_TRACER_METHOD) :
-					{
-						LoadSettings(DefaultSetting[(INT32)GetTraceMethod()]);
-						break;
-					}
+					ReadOriginalComboBox();
 				}
+				else if (Msg->GadgetID == _R(IDC_TRACER_METHOD))
+				{
+					LoadSettings(DefaultSetting[(INT32)GetTraceMethod()]);
+				}
 				break;											       
+			}
 
+			default:
+				break;
 		}
 
 		// End dialog here
@@ -1308,7 +1294,7 @@
 					TraceOpParam param;
 					param.pTraceControl = pTraceControl;
 		
-					OpDescriptor* pOpDesc=OpDescriptor::FindOpDescriptor("TraceOp");
+					OpDescriptor* pOpDesc=OpDescriptor::FindOpDescriptor(_T("TraceOp"));
 					ERROR3IF_PF(pOpDesc==NULL,("Couldn't find OPTOKEN_OPTRACEOP op descriptor"));
 					pOpDesc->Invoke((OpParam*)&param);
 				}
@@ -1321,6 +1307,8 @@
 			Close(); 		   
 			TRACEUSER( "Alex", _T("Calling End()
"));
 			End(); 	 	// End of dialog 
+
+			return OK;
 	   	}
 		//return (DLG_EAT_IF_HUNGRY(Msg));   // I return EAT_MSG unless the message needs to be sent to all dialogs 
 	} else if (MESSAGE_IS_A(Message, SelChangingMsg))		// Selection changed - use new bitmap
@@ -1328,11 +1316,13 @@
 		SelChangingMsg *Msg = (SelChangingMsg *) Message;
 		switch ( Msg->State )
 		{
-			case SelChangingMsg::SelectionState::SELECTIONCHANGED:
-			case SelChangingMsg::SelectionState::NODECHANGED:
+			case SelChangingMsg::SELECTIONCHANGED:
+			case SelChangingMsg::NODECHANGED:
 //				pOriginal=NULL;
 				FindBitmap();
 				break;
+			default:
+				break;
 		}
 	} else if (MESSAGE_IS_A(Message, BitmapListChangedMsg))		// Selection changed - use new bitmap
 	{
@@ -1378,15 +1368,15 @@
 {  
 	INT32 Mode;
 	INT32 Setting;
-	GetApplication()->DeclareSection( "Tracer", 40);
-	GetApplication()->DeclarePref( "Tracer", "DefaultMode", &DefaultMode, 0, ((INT32)TRACEMETHOD_ILLEGAL)-1);
+	GetApplication()->DeclareSection( _T("Tracer"), 40);
+	GetApplication()->DeclarePref( _T("Tracer"), _T("DefaultMode"), &DefaultMode, 0, ((INT32)TRACEMETHOD_ILLEGAL)-1);
 	String_256 PrefName;
-	String_256 PrefBase("Tracer mode #1%d setting #2%d"); // not resourced as .ini file setting
+	String_256 PrefBase(_T("Tracer mode #1%d setting #2%d")); // not resourced as .ini file setting
 	
 	for (Mode=0; Mode<(INT32)NUM_TRACEMETHOD; Mode++) for (Setting=0; Setting<(INT32)NUM_TRACESETTING; Setting++)
 	{
 		PrefName._MakeMsg(PrefBase, Mode, Setting);
-		GetApplication()->DeclarePref( "Tracer", TEXT(PrefName), &(DefaultSetting[Mode][Setting]), 0, 100);
+		GetApplication()->DeclarePref( _T("Tracer"), PrefName, &(DefaultSetting[Mode][Setting]), 0, 100);
 	}
 
 	return (RegisterOpDescriptor(0,								// Tool ID
@@ -1670,8 +1660,8 @@
 	
 	// Determine the centre of the view
 	WorkCoord WrkCentreOfView; 
-	WrkCentreOfView.x = WrkViewRect.lox	+ (WrkViewRect.Width()/2); 
-	WrkCentreOfView.y = WrkViewRect.loy	+ (WrkViewRect.Height()/2);
+	WrkCentreOfView.x = WrkViewRect.lo.x	+ (WrkViewRect.Width()/2); 
+	WrkCentreOfView.y = WrkViewRect.lo.y	+ (WrkViewRect.Height()/2);
 	
 	// FindEnclosing spread requires an OilCoord
 	OilCoord OilCentreOfView = WrkCentreOfView.ToOil(CurDocView->GetScrollOffsets()); 
@@ -1689,8 +1679,8 @@
 
 	// Find the centre of the DocViewRect
    	DocCoord DocCentreOfView; 
-	DocCentreOfView.x = DocViewRect.lox	+ (DocViewRect.Width()/2); 
-	DocCentreOfView.y = DocViewRect.loy	+ (DocViewRect.Height()/2);
+	DocCentreOfView.x = DocViewRect.lo.x	+ (DocViewRect.Width()/2); 
+	DocCentreOfView.y = DocViewRect.lo.y	+ (DocViewRect.Height()/2);
 
 	// Now convert from DocCoords to spread coords
 	(*Spread)->DocCoordToSpreadCoord(&DocCentreOfView);
@@ -1726,7 +1716,8 @@
 	// Only one live instance of the operation is allowed. It's probably a dialog 
 	if (!MessageHandler::MessageHandlerExists(CC_RUNTIME_CLASS(TraceDlg)))
 	{
-		OpDesc->Invoke(&OpParam((INT32)pBitmap,(INT32)NULL));		 
+		OpParam param((void *)pBitmap,(void *)NULL);
+		OpDesc->Invoke(&param);
 	}
 	else
 	{
Index: Trunk/XaraLX/Kernel/main3.cpp
===================================================================
--- Trunk/XaraLX/Kernel/main3.cpp	(revision 1085)
+++ Trunk/XaraLX/Kernel/main3.cpp	(revision 1086)
@@ -185,7 +185,9 @@
 			OpAlign::Init() &&					// Init the align op
 #ifndef EXCLUDE_FROM_XARALX
 			BmpPrefsDlg::Init() &&				// Init the export bitmap options dialog
+#endif
 			TraceDlg::Init() &&					// Init the trace dialog
+#ifndef EXCLUDE_FROM_XARALX
 			WebAddressDlg::Init() &&
 			PhotoCDDlg::Init() &&				// Init the import PhotoCD options dialog
 #endif
Index: Trunk/XaraLX/Kernel/sgbitmap.cpp
===================================================================
--- Trunk/XaraLX/Kernel/sgbitmap.cpp	(revision 1085)
+++ Trunk/XaraLX/Kernel/sgbitmap.cpp	(revision 1086)
@@ -2514,8 +2514,6 @@
 					}
 				}
 #endif
-PORTNOTE("other", "Disabled tracer")
-#ifndef EXCLUDE_FROM_XARALX
 				else if (Msg->GadgetID == _R(IDC_BMPGAL_TRACE))
 				{	
 					SelectedBitmap = GetSelectedBitmap();
@@ -2527,7 +2525,6 @@
 					}
 				#endif //webster
 				}
-#endif
 				/* else if (Msg->GadgetID == _R(IDC_BMPGAL_EFFECTS))
 				{	
 					SelectedBitmap = GetSelectedBitmap();
Index: Trunk/XaraLX/Kernel/main.cpp
===================================================================
--- Trunk/XaraLX/Kernel/main.cpp	(revision 1085)
+++ Trunk/XaraLX/Kernel/main.cpp	(revision 1086)
@@ -276,7 +276,7 @@
 	Module::DeinitModules();	// by CMainFrame::OnDestroy() !!
 
 #ifndef EXCLUDE_BFX
-#if !defined(EXCLUDE_FROM_RALPH) && !defined(EXCLUDE_FROM_XARALX)
+#if !defined(EXCLUDE_FROM_RALPH)
 	BitmapEffectBase::DeInit();
 #endif
 #endif
Index: Trunk/XaraLX/wxOil/bfxalu.h
===================================================================
--- Trunk/XaraLX/wxOil/bfxalu.h	(revision 1085)
+++ Trunk/XaraLX/wxOil/bfxalu.h	(revision 1086)
@@ -110,12 +110,14 @@
 #ifndef EXCLUDE_FROM_RALPH
 
 #include "gconsts.h" // For GMATRIX
+#include "tracectl.h" // for enum TraceMethod - annoying...
+
 class GDrawContext;
 class BfxALULUT;
 class Path;
 class String_256;
-enum TraceMethod;
 
+
 typedef struct
 {
 	BYTE	R;
@@ -330,6 +332,8 @@
 	virtual void TestGD();
 
 #ifndef WEBSTER
+PORTNOTE("other", "Remove accusoft effects")
+#ifndef EXCLUDE_FROM_XARALX
 	// Accusoft effects
 	virtual BOOL FlipX(KernelBitmap * * ppOutput);
 	virtual BOOL FlipY(KernelBitmap * * ppOutput);
@@ -348,6 +352,7 @@
 	virtual BOOL DiffusionColour(KernelBitmap * * ppOutput);
 	virtual BOOL PopularityColour(KernelBitmap * * ppOutput);
 	virtual BOOL MakeGreyscale(KernelBitmap * * ppOutput);
+#endif //XARALX
 #endif //WEBSTER
 	virtual BOOL MakeGreyscale32to8(KernelBitmap * * ppOutput);
 
@@ -356,11 +361,16 @@
 	static  BOOL IsGreyscaleBitmap(OILBitmap * pOilBmp);
 #ifndef EXCLUDE_FROM_RALPH
 #ifndef WEBSTER
+PORTNOTE("other", "Remove accusoft effects")
+#ifndef EXCLUDE_FROM_XARALX
 	virtual BOOL Octree (KernelBitmap * * ppOutput);
 
 	virtual BOOL SharpenBlur(KernelBitmap * * ppOutput, INT32 Degree, INT32 Times);
+#endif
 	virtual BOOL RemoveDither(KernelBitmap * * ppOutput, INT32 Thresh, INT32 QuantCols, TraceMethod Method);
+#ifndef EXCLUDE_FROM_XARALX
 	virtual BOOL SpecialEffect(KernelBitmap * * ppOutput, double * Matrix, BfxSpecialEffect Type);
+#endif
 #endif //WEBSTER
 
 	protected:
@@ -374,14 +384,18 @@
 							 INT32 * pSize, INT32 * pHighestChain, INT32 * pWidth, DWORD * * ppA);	
 
 #ifndef WEBSTER
+PORTNOTE("other", "Remove accusoft effects")
+#ifndef EXCLUDE_FROM_XARALX
 	virtual BOOL MakeAccusoftHandle(INT32 * pHandle, BOOL DoBodge = FALSE);
 	virtual BOOL MakeKernelBitmap(INT32 Handle, KernelBitmap * * ppOutput, BOOL Make32Bits = FALSE,
 								  String_256 * pName = NULL, UINT32 ResID = 0, BOOL DoBodge = FALSE);
+#endif
 	virtual BOOL AdjustBrightnessContrastColour(LPBYTE Source, LPBYTE Dest, INT32 Size, INT32 Width, INT32 Height,
 							INT32 Brightness, INT32 Contrast, INT32 Colour, BOOL SingleChannel);
-
+#ifndef EXCLUDE_FROM_XARALX
 	BOOL MAH_BodgeCopyBitmap(INT32 Width, INT32 Height, INT32 Depth, LPBYTE pSourceBits, LPBYTE pDestBits);
 	BOOL MKB_BodgeCopyBitmap(INT32 Width, INT32 Height, INT32 Depth, LPBYTE pSourceBits, LPBYTE pDestBits);
+#endif
 #endif //WEBSTER
 
 	void ConvertScanLineToDWORD(KernelBitmap * pBitmap, INT32 Line, DWORD * pBuffer);
@@ -428,11 +442,13 @@
 
 ********************************************************************************************/
 
+class BfxALU;
+
 class BfxALULUT : public CCObject
 {
 	CC_DECLARE_DYNCREATE(BfxALULUT);
 
-	friend BfxALU;
+	friend class BfxALU;
 
 	//BfxALULUT(); constructors and destructors are simple
 	//~BFXALULUT();
Index: Trunk/XaraLX/wxOil/Makefile.am
===================================================================
--- Trunk/XaraLX/wxOil/Makefile.am	(revision 1085)
+++ Trunk/XaraLX/wxOil/Makefile.am	(revision 1086)
@@ -43,7 +43,7 @@
 	drawctl.cpp filedlgs.cpp fileutil.cpp ktimer.cpp camplatform.cpp \
 	outptdib.cpp outptpng.cpp outptgif.cpp gpalopt.cpp bmpfiltr.cpp giffiltr.cpp \
 	fontbase.cpp ftfonts.cpp textfuns.cpp dragbmp.cpp xpoilflt.cpp xmlutils.cpp \
-	camprocess.cpp dropdown.cpp coldrop.cpp fontdrop.cpp \
+	camprocess.cpp dropdown.cpp coldrop.cpp fontdrop.cpp bfxalu.cpp bfxpixop.cpp \
 	binreloc.c \
 	resources.cpp
 
Index: Trunk/XaraLX/wxOil/bfxpixop.cpp
===================================================================
--- Trunk/XaraLX/wxOil/bfxpixop.cpp	(revision 1085)
+++ Trunk/XaraLX/wxOil/bfxpixop.cpp	(revision 1086)
@@ -105,10 +105,10 @@
 #include "bfxpixop.h"
 #include "bfxalu.h"
 #include "bitmap.h"
-#include "wbitmap.h"
+#include "oilbitmap.h"
 
 // The asm file defines FASTxxxxxx if there are fast versions of the routeines available
-#include "bfxasm.h"
+//#include "bfxasm.h"
 
 // This is not compulsory, but you may as well put it in so that the correct version
 // of your file can be registered in the .exe
@@ -231,13 +231,13 @@
 {
 	Base = NULL;
 	ERROR2IF( ((!pKB) || (pKB->ActualBitmap==NULL)) ,FALSE,"BfxALU can't find OIL bitmap");
-	ERROR3IF( (!(pKB->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
+	ERROR3IF( (!(pKB->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
 
-	BITMAPINFOHEADER * pBMI=&(((WinBitmap *)(pKB->ActualBitmap))->BMInfo->bmiHeader);
+	BITMAPINFOHEADER * pBMI=&(((CWxBitmap *)(pKB->ActualBitmap))->BMInfo->bmiHeader);
 
 	ERROR2IF( (BPP && pBMI->biBitCount != BPP), FALSE, "BfxPixelOp called with incorrect BPP");
 
-	Base = (DWORD *)(void *)(((WinBitmap *)(pKB->ActualBitmap))->BMBytes);
+	Base = (DWORD *)(void *)(((CWxBitmap *)(pKB->ActualBitmap))->BMBytes);
 	Width = pBMI->biWidth;
 	INT32 Bits = pBMI->biBitCount;
 	switch (Bits)
@@ -331,13 +331,13 @@
 	if (pProposed)
 	{
 		ERROR2IF( (pProposed->ActualBitmap==NULL) ,FALSE,"BfxPixelOp can't find OIL bitmap");
-		ERROR3IF( (!(pProposed->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxPixelOp Oil layer inconsistency");
+		ERROR3IF( (!(pProposed->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxPixelOp Oil layer inconsistency");
 		
-		BITMAPINFOHEADER * pBMI=&(((WinBitmap *)(pProposed->ActualBitmap))->BMInfo->bmiHeader);
+		BITMAPINFOHEADER * pBMI=&(((CWxBitmap *)(pProposed->ActualBitmap))->BMInfo->bmiHeader);
 		
 		ERROR2IF( ((pBMI->biHeight != Height) || (pBMI->biWidth != Width) || (BPP && pBMI->biBitCount !=BPP)), FALSE,
 			  "Incompatible bitmaps for BfxPixelOp::SetAuxilliaryBitmap");
-		pA = (DWORD *)(void *)(((WinBitmap *)(pProposed->ActualBitmap))->BMBytes);
+		pA = (DWORD *)(void *)(((CWxBitmap *)(pProposed->ActualBitmap))->BMBytes);
 	}
 	else
 	{
@@ -347,13 +347,13 @@
 	if (pOriginal)
 	{
 		ERROR2IF( (pOriginal->ActualBitmap==NULL) ,FALSE,"BfxPixelOp can't find OIL bitmap");
-		ERROR3IF( (!(pOriginal->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxPixelOp Oil layer inconsistency");
+		ERROR3IF( (!(pOriginal->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxPixelOp Oil layer inconsistency");
 		
-		BITMAPINFOHEADER * pBMI=&(((WinBitmap *)(pOriginal->ActualBitmap))->BMInfo->bmiHeader);
+		BITMAPINFOHEADER * pBMI=&(((CWxBitmap *)(pOriginal->ActualBitmap))->BMInfo->bmiHeader);
 		
 		ERROR2IF( ((pBMI->biHeight != Height) || (pBMI->biWidth != Width) || (BPP && pBMI->biBitCount !=BPP)), FALSE,
 			  "Incompatible bitmaps for BfxPixelOp::SetAuxilliaryBitmap");
-		pT = (DWORD *)(void *)(((WinBitmap *)(pOriginal->ActualBitmap))->BMBytes);
+		pT = (DWORD *)(void *)(((CWxBitmap *)(pOriginal->ActualBitmap))->BMBytes);
 	}
 	else
 	{
@@ -363,13 +363,13 @@
 	if (pCurrent)
 	{
 		ERROR2IF( (pCurrent->ActualBitmap==NULL) ,FALSE,"BfxPixelOp can't find OIL bitmap");
-		ERROR3IF( (!(pCurrent->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxPixelOp Oil layer inconsistency");
+		ERROR3IF( (!(pCurrent->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxPixelOp Oil layer inconsistency");
 		
-		BITMAPINFOHEADER * pBMI=&(((WinBitmap *)(pCurrent->ActualBitmap))->BMInfo->bmiHeader);
+		BITMAPINFOHEADER * pBMI=&(((CWxBitmap *)(pCurrent->ActualBitmap))->BMInfo->bmiHeader);
 		
 		ERROR2IF( ((pBMI->biHeight != Height) || (pBMI->biWidth != Width) || (BPP && pBMI->biBitCount !=BPP)), FALSE,
 			  "Incompatible bitmaps for BfxPixelOp::SetAuxilliaryBitmap");
-		pB = (DWORD *)(void *)(((WinBitmap *)(pCurrent->ActualBitmap))->BMBytes);
+		pB = (DWORD *)(void *)(((CWxBitmap *)(pCurrent->ActualBitmap))->BMBytes);
 	}
 	else
 	{
@@ -480,9 +480,9 @@
 {
 	Base = NULL;
 	ERROR2IF( ((!pKB) || (pKB->ActualBitmap==NULL)) ,FALSE,"BfxALU can't find OIL bitmap");
-	ERROR3IF( (!(pKB->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
+	ERROR3IF( (!(pKB->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
 
-	BITMAPINFOHEADER * pBMI=&(((WinBitmap *)(pKB->ActualBitmap))->BMInfo->bmiHeader);
+	BITMAPINFOHEADER * pBMI=&(((CWxBitmap *)(pKB->ActualBitmap))->BMInfo->bmiHeader);
 
 	ERROR2IF((pBMI->biBitCount !=32), FALSE,"Bad BfxALU A reg");
 
@@ -760,9 +760,9 @@
 {
 	Base = NULL;
 	ERROR2IF( ((!pKB) || (pKB->ActualBitmap==NULL)) ,FALSE,"BfxALU can't find OIL bitmap");
-	ERROR3IF( (!(pKB->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
+	ERROR3IF( (!(pKB->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
 
-	BITMAPINFOHEADER * pBMI=&(((WinBitmap *)(pKB->ActualBitmap))->BMInfo->bmiHeader);
+	BITMAPINFOHEADER * pBMI=&(((CWxBitmap *)(pKB->ActualBitmap))->BMInfo->bmiHeader);
 
 	BPP=pBMI->biBitCount;
 	ERROR2IF(BPP>8, FALSE,"Pseudo colour BMP not pseudo colour");
@@ -1023,9 +1023,9 @@
 		ERROR3( "BfxALU can't find OIL bitmap");
 		return;
 	}
-	ERROR3IF( (!(pKB->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
+	ERROR3IF( (!(pKB->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
 
-	BITMAPINFOHEADER * pBMI=&(((WinBitmap *)(pKB->ActualBitmap))->BMInfo->bmiHeader);
+	BITMAPINFOHEADER * pBMI=&(((CWxBitmap *)(pKB->ActualBitmap))->BMInfo->bmiHeader);
 
 	if ( Colour >= pBMI->biClrUsed )
 	{
Index: Trunk/XaraLX/wxOil/bfxalu.cpp
===================================================================
--- Trunk/XaraLX/wxOil/bfxalu.cpp	(revision 1085)
+++ Trunk/XaraLX/wxOil/bfxalu.cpp	(revision 1086)
@@ -103,16 +103,16 @@
 #include "camtypes.h"
 #include "errors.h"
 #include "bfxalu.h"
-#include "gdrawasm.h"
+#include "GDrawIntf.h"
 #include "gdrawcon.h"
 #include "bitmap.h"			  
 #include "bitmpinf.h"
-#include "wbitmap.h"
+#include "oilbitmap.h"
 #include "ccobject.h"
 #include "paths.h"
 #include "fixmem.h"
 //#include "accures.h"
-#include "extfilts.h"
+//#include "extfilts.h"
 //#include "resource.h" // for _R(IDS_OUT_OF_MEMORY)
 #include "tracectl.h"
 #include "app.h"
@@ -123,7 +123,7 @@
 //#include "richard2.h"
 
 // The asm file defines FASTxxxxxx if there are fast versions of the routeines available
-#include "bfxasm.h"
+// #include "bfxasm.h"
 
 // Set this whilst GDraw persists in expecting monochrome bitmaps to be screwy
 //#define GAVIN_MONOCHROME_BITMAPS_BROKEN
@@ -325,7 +325,7 @@
 {
 #ifndef EXCLUDE_FROM_RALPH
 	// has to be a level 3 check - we can't return an error code
-	ERROR3IF( (GC!=NULL), "Someone hasn't called the BfxALU deinit function!")
+	ERROR3IF( (GC!=NULL), "Someone hasn't called the BfxALU deinit function!");
 #endif
 }
 
@@ -461,7 +461,7 @@
 	else
 	{
 		ERROR2IF((pBitmap->ActualBitmap==NULL),FALSE,"BfxALU can't find OIL bitmap");
-		ERROR3IF( (!(pBitmap->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
+		ERROR3IF( (!(pBitmap->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
 
 		BitmapInfo BMInfo;
 		pBitmap->ActualBitmap->GetInfo(&BMInfo);
@@ -494,13 +494,13 @@
 //		return FALSE;	
 //	}
 
-	ERROR2IF((pNewBitmap->ActualBitmap==NULL) || (((WinBitmap *)(pNewBitmap->ActualBitmap))->BMInfo==NULL) || (((WinBitmap *)(pNewBitmap->ActualBitmap))->BMBytes==NULL),
+	ERROR2IF((pNewBitmap->ActualBitmap==NULL) || (((CWxBitmap *)(pNewBitmap->ActualBitmap))->BMInfo==NULL) || (((CWxBitmap *)(pNewBitmap->ActualBitmap))->BMBytes==NULL),
 			  FALSE,"BfxALU can't find OIL bitmap of the new bitmap");
 	
 	if (pBitmap)
 	{
-		BITMAPINFOHEADER * pABMI=&(((WinBitmap *)(pBitmap->ActualBitmap))->BMInfo->bmiHeader);
-		BITMAPINFOHEADER * pBBMI=&(((WinBitmap *)(pNewBitmap->ActualBitmap))->BMInfo->bmiHeader);
+		BITMAPINFOHEADER * pABMI=&(((CWxBitmap *)(pBitmap->ActualBitmap))->BMInfo->bmiHeader);
+		BITMAPINFOHEADER * pBBMI=&(((CWxBitmap *)(pNewBitmap->ActualBitmap))->BMInfo->bmiHeader);
 		// Copy the DPI accross
 		pBBMI->biXPelsPerMeter = pABMI->biXPelsPerMeter;
 		pBBMI->biYPelsPerMeter = pABMI->biYPelsPerMeter;
@@ -586,12 +586,12 @@
 	else
 	{
 		ERROR2IF((pBitmap->ActualBitmap==NULL),FALSE,"BfxALU can't find OIL bitmap");
-		ERROR3IF( (!(pBitmap->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
-//		ERROR2IF((((WinBitmap *)(pBitmap->ActualBitmap))->BMInfo->bmiHeader.biBitCount !=32), FALSE,
+		ERROR3IF( (!(pBitmap->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
+//		ERROR2IF((((CWxBitmap *)(pBitmap->ActualBitmap))->BMInfo->bmiHeader.biBitCount !=32), FALSE,
 //				 "Bad BfxALU accumulator");
-		BITMAPINFOHEADER * pBMI=&(((WinBitmap *)(pBitmap->ActualBitmap))->BMInfo->bmiHeader);
+		BITMAPINFOHEADER * pBMI=&(((CWxBitmap *)(pBitmap->ActualBitmap))->BMInfo->bmiHeader);
 		ERROR2IF( (!GC->SetupBitmap(pBMI->biWidth,pBMI->biHeight,pBMI->biBitCount,
-									((WinBitmap *)(pBitmap->ActualBitmap))->BMBytes)),
+									((CWxBitmap *)(pBitmap->ActualBitmap))->BMBytes)),
 				   FALSE,"GDraw didn't like BfxALU accumulator");
 		GC->SetMatrix(&identity);
 		A=pBitmap;
@@ -636,8 +636,8 @@
 	else
 	{
 		ERROR2IF((pBitmap->ActualBitmap==NULL),FALSE,"BfxALU can't find OIL bitmap");
-		ERROR3IF( (!(pBitmap->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
-		BITMAPINFOHEADER * pBMI=&(((WinBitmap *)(pBitmap->ActualBitmap))->BMInfo->bmiHeader);
+		ERROR3IF( (!(pBitmap->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
+		BITMAPINFOHEADER * pBMI=&(((CWxBitmap *)(pBitmap->ActualBitmap))->BMInfo->bmiHeader);
 		//ERROR2IF((pBMI->biBitCount !=32), FALSE,"Bad BfxALU B reg");
 		BPoints[0].x = XOffset; 						BPoints[0].y = YOffset;
 		BPoints[1].x = XOffset+(INT32)(pBMI->biWidth);	BPoints[1].y = YOffset;
@@ -715,8 +715,8 @@
 	else
 	{
 		ERROR2IF((pBitmap->ActualBitmap==NULL),FALSE,"BfxALU can't find OIL bitmap");
-		ERROR3IF( (!(pBitmap->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
-		BITMAPINFOHEADER * pBMI=&(((WinBitmap *)(pBitmap->ActualBitmap))->BMInfo->bmiHeader);
+		ERROR3IF( (!(pBitmap->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
+		BITMAPINFOHEADER * pBMI=&(((CWxBitmap *)(pBitmap->ActualBitmap))->BMInfo->bmiHeader);
 // Some operations now allow 32 bit 'T' regs though they aren't used for transparency
 //		ERROR2IF((pBMI->biBitCount !=8), FALSE,"Bad BfxALU T reg");
 		TPoints[0].x = XOffset; 						TPoints[0].y = YOffset;
@@ -779,8 +779,8 @@
 {
 	ERROR2IF((GC==NULL),FALSE,"BfxALU::Init not called / failed");
 	ERROR2IF( ((!A) || (A->ActualBitmap==NULL)),FALSE,"BfxALU can't find OIL bitmap");
-	ERROR3IF( (!(A->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
-	BITMAPINFOHEADER * pBMI=&(((WinBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
+	ERROR3IF( (!(A->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
+	BITMAPINFOHEADER * pBMI=&(((CWxBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
 	RECT Rect={/*L*/0,/*T*/pBMI->biHeight,/*R*/pBMI->biWidth,/*B*/0};
 	ERROR2IF((!GC->FillRectangle(&Rect)),FALSE,"BfxALU GDraw_FillRectangle failed");
 
@@ -816,10 +816,10 @@
 {
 	ERROR2IF((GC==NULL),FALSE,"BfxALU::Init not called / failed");
 	ERROR2IF( ((!A) || (A->ActualBitmap==NULL)) ,FALSE,"BfxALU can't find OIL bitmap");
-	ERROR3IF( (!(A->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
-	BITMAPINFOHEADER * pBMI=&(((WinBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
+	ERROR3IF( (!(A->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
+	BITMAPINFOHEADER * pBMI=&(((CWxBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
 	
-	memset(((WinBitmap *)(A->ActualBitmap))->BMBytes, FillValue ,pBMI->biSizeImage);
+	memset(((CWxBitmap *)(A->ActualBitmap))->BMBytes, FillValue ,pBMI->biSizeImage);
 #if 0
 	RECT Rect={/*L*/0,/*T*/pBMI->biHeight,/*R*/pBMI->biWidth,/*B*/0};
 	GC->SetColour((COLORREF) 0x00000000);	
@@ -864,14 +864,14 @@
 	if ((B) && (!T)) // Bitmap B, Flat T
 	{
 		ERROR2IF((B->ActualBitmap==NULL),FALSE,"BfxALU can't find OIL bitmap");
-		ERROR3IF( (!(B->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
-		BITMAPINFOHEADER * pBMI=&(((WinBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader);
+		ERROR3IF( (!(B->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
+		BITMAPINFOHEADER * pBMI=&(((CWxBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader);
 		//ERROR2IF((pBMI->biBitCount !=32), FALSE,"Bad BfxALU B reg");
-		ERROR2IF( (!GC->SetBitmapFill(pBMI,(((WinBitmap *)(B->ActualBitmap))->BMBytes),
+		ERROR2IF( (!GC->SetBitmapFill(pBMI,(((CWxBitmap *)(B->ActualBitmap))->BMBytes),
 									BStyle | (Style<<8),
 									BPoints,
 									0,
-									((WinBitmap *)(B->ActualBitmap))->BMInfo->bmiColors,
+									((CWxBitmap *)(B->ActualBitmap))->BMInfo->bmiColors,
 									(unsigned char *) BpTable,
 									(unsigned char *) BpTable,
 									(unsigned char *) BpTable,
@@ -886,10 +886,10 @@
 		ERROR2IF((!GC->SetTransparency(BColour,(enum TransparencyEnum) Style)),FALSE,"Bad BfxALU BT reg");
 
 		ERROR2IF((T->ActualBitmap==NULL),FALSE,"BfxALU can't find OIL bitmap");
-		ERROR3IF( (!(T->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
-		BITMAPINFOHEADER * pBMI=&(((WinBitmap *)(T->ActualBitmap))->BMInfo->bmiHeader);
+		ERROR3IF( (!(T->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
+		BITMAPINFOHEADER * pBMI=&(((CWxBitmap *)(T->ActualBitmap))->BMInfo->bmiHeader);
 		ERROR2IF((pBMI->biBitCount !=8), FALSE,"Bad BfxALU T reg");
-		ERROR2IF( (!GC->SetTransparentBitmapFill(pBMI,(((WinBitmap *)(T->ActualBitmap))->BMBytes),
+		ERROR2IF( (!GC->SetTransparentBitmapFill(pBMI,(((CWxBitmap *)(T->ActualBitmap))->BMBytes),
 									TStyle | (Style<<8),
 									TPoints,
 									0
@@ -900,14 +900,14 @@
 	if ((B) && (T)) // Bitmap B, Bitmap T
 	{
 		ERROR2IF((B->ActualBitmap==NULL),FALSE,"BfxALU can't find OIL bitmap");
-		ERROR3IF( (!(B->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
-		BITMAPINFOHEADER * pBMI=&(((WinBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader);
+		ERROR3IF( (!(B->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
+		BITMAPINFOHEADER * pBMI=&(((CWxBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader);
 		//ERROR2IF((pBMI->biBitCount !=32), FALSE,"Bad BfxALU B reg");
-		ERROR2IF( (!GC->SetBitmapFill(pBMI,(((WinBitmap *)(B->ActualBitmap))->BMBytes),
+		ERROR2IF( (!GC->SetBitmapFill(pBMI,(((CWxBitmap *)(B->ActualBitmap))->BMBytes),
 									BStyle | (Style<<8),
 									BPoints,
 									0,
-									((WinBitmap *)(B->ActualBitmap))->BMInfo->bmiColors,
+									((CWxBitmap *)(B->ActualBitmap))->BMInfo->bmiColors,
 									(unsigned char *) BpTable,
 									(unsigned char *) BpTable,
 									(unsigned char *) BpTable,
@@ -916,10 +916,10 @@
 				   FALSE,"GDraw didn't like BfxALU B reg");
 
 		ERROR2IF((T->ActualBitmap==NULL),FALSE,"BfxALU can't find OIL bitmap");
-		ERROR3IF( (!(T->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
-		pBMI=&(((WinBitmap *)(T->ActualBitmap))->BMInfo->bmiHeader);
+		ERROR3IF( (!(T->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
+		pBMI=&(((CWxBitmap *)(T->ActualBitmap))->BMInfo->bmiHeader);
 		ERROR2IF((pBMI->biBitCount !=8), FALSE,"Bad BfxALU T reg");
-		ERROR2IF( (!GC->SetTransparentBitmapFill(pBMI,(((WinBitmap *)(T->ActualBitmap))->BMBytes),
+		ERROR2IF( (!GC->SetTransparentBitmapFill(pBMI,(((CWxBitmap *)(T->ActualBitmap))->BMBytes),
 									TStyle | (Style<<8),
 									TPoints,
 									0
@@ -963,14 +963,14 @@
 	else
 	{
 		ERROR2IF((B->ActualBitmap==NULL),FALSE,"BfxALU can't find OIL bitmap");
-		ERROR3IF( (!(B->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
-		BITMAPINFOHEADER * pBMI=&(((WinBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader);
+		ERROR3IF( (!(B->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
+		BITMAPINFOHEADER * pBMI=&(((CWxBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader);
 		//ERROR2IF((pBMI->biBitCount !=32), FALSE,"Bad BfxALU B reg");
-		ERROR2IF( (!GC->SetBitmapFill(pBMI,(((WinBitmap *)(B->ActualBitmap))->BMBytes),
+		ERROR2IF( (!GC->SetBitmapFill(pBMI,(((CWxBitmap *)(B->ActualBitmap))->BMBytes),
 									BStyle | (Style<<8),
 									BPoints,
 									0,
-									((WinBitmap *)(B->ActualBitmap))->BMInfo->bmiColors,
+									((CWxBitmap *)(B->ActualBitmap))->BMInfo->bmiColors,
 									(unsigned char *) BpTable,
 									(unsigned char *) BpTable,
 									(unsigned char *) BpTable,
@@ -1012,14 +1012,14 @@
 	else
 	{
 		ERROR2IF((B->ActualBitmap==NULL),FALSE,"BfxALU can't find OIL bitmap");
-		ERROR3IF( (!(B->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
-		BITMAPINFOHEADER * pBMI=&(((WinBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader);
+		ERROR3IF( (!(B->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
+		BITMAPINFOHEADER * pBMI=&(((CWxBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader);
 		//ERROR2IF((pBMI->biBitCount !=32), FALSE,"Bad BfxALU B reg");
-		ERROR2IF( (!GC->SetBitmapFill(pBMI,(((WinBitmap *)(B->ActualBitmap))->BMBytes),
+		ERROR2IF( (!GC->SetBitmapFill(pBMI,(((CWxBitmap *)(B->ActualBitmap))->BMBytes),
 									BStyle | (Style<<8),
 									BPoints,
 									0,
-									((WinBitmap *)(B->ActualBitmap))->BMInfo->bmiColors,
+									((CWxBitmap *)(B->ActualBitmap))->BMInfo->bmiColors,
 									(unsigned char *) BpTable,
 									(unsigned char *) BpTable,
 									(unsigned char *) BpTable,
@@ -1062,15 +1062,15 @@
 	else
 	{
 		ERROR2IF((B->ActualBitmap==NULL),FALSE,"BfxALU can't find OIL bitmap");
-		ERROR3IF( (!(B->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
-		BITMAPINFOHEADER * pBMI=&(((WinBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader);
+		ERROR3IF( (!(B->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
+		BITMAPINFOHEADER * pBMI=&(((CWxBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader);
 		//ERROR2IF((pBMI->biBitCount !=32), FALSE,"Bad BfxALU B reg");
 		ERROR2IF( (!GC->SetTransparencyLookupTable((CONST BYTE *) (LUT->Data))),FALSE,"Bad LUT");
-		ERROR2IF( (!GC->SetBitmapFill(pBMI,(((WinBitmap *)(B->ActualBitmap))->BMBytes),
+		ERROR2IF( (!GC->SetBitmapFill(pBMI,(((CWxBitmap *)(B->ActualBitmap))->BMBytes),
 									BStyle | (Style<<8),
 									BPoints,
 									0,
-									((WinBitmap *)(B->ActualBitmap))->BMInfo->bmiColors,
+									((CWxBitmap *)(B->ActualBitmap))->BMInfo->bmiColors,
 									(unsigned char *) BpTable,
 									(unsigned char *) BpTable,
 									(unsigned char *) BpTable,
@@ -1318,15 +1318,15 @@
 {
 	ERROR2IF((GC==NULL),FALSE,"BfxALU::Init not called / failed");
 	ERROR2IF( ((!A) || (A->ActualBitmap==NULL)) ,FALSE,"BfxALU can't find OIL bitmap");
-	ERROR3IF( (!(A->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
+	ERROR3IF( (!(A->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
 	ERROR2IF( ((!B) || (B->ActualBitmap==NULL)) ,FALSE,"BfxALU can't find OIL bitmap");
-	ERROR3IF( (!(B->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
+	ERROR3IF( (!(B->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
 	ERROR2IF( ((!T) || (T->ActualBitmap==NULL)) ,FALSE,"BfxALU can't find OIL bitmap");
-	ERROR3IF( (!(T->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
+	ERROR3IF( (!(T->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
 
-	BITMAPINFOHEADER * pABMI=&(((WinBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
-	BITMAPINFOHEADER * pBBMI=&(((WinBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader);
-	BITMAPINFOHEADER * pTBMI=&(((WinBitmap *)(T->ActualBitmap))->BMInfo->bmiHeader);
+	BITMAPINFOHEADER * pABMI=&(((CWxBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
+	BITMAPINFOHEADER * pBBMI=&(((CWxBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader);
+	BITMAPINFOHEADER * pTBMI=&(((CWxBitmap *)(T->ActualBitmap))->BMInfo->bmiHeader);
 
 	ERROR2IF((pABMI->biBitCount !=32), FALSE,"Bad BfxALU A reg");
 	ERROR2IF((pBBMI->biBitCount !=32), FALSE,"Bad BfxALU B reg");
@@ -1335,10 +1335,10 @@
 	ERROR2IF( ((pABMI->biSizeImage != pBBMI->biSizeImage) || (pABMI->biSizeImage != pTBMI->biSizeImage)), FALSE,
 			  "Incompatible bitmaps for MarkThresholdError");
 	
-	AluPix32 * pA = (AluPix32 *)(void *)(((WinBitmap *)(A->ActualBitmap))->BMBytes);
-	AluPix32 * pB = (AluPix32 *)(void *)(((WinBitmap *)(B->ActualBitmap))->BMBytes);
-	AluPix32 * pT = (AluPix32 *)(void *)(((WinBitmap *)(T->ActualBitmap))->BMBytes);
-	DWORD * pO = (DWORD *)(void *)(((WinBitmap *)(A->ActualBitmap))->BMBytes);
+//	AluPix32 * pA = (AluPix32 *)(void *)(((CWxBitmap *)(A->ActualBitmap))->BMBytes);
+	AluPix32 * pB = (AluPix32 *)(void *)(((CWxBitmap *)(B->ActualBitmap))->BMBytes);
+	AluPix32 * pT = (AluPix32 *)(void *)(((CWxBitmap *)(T->ActualBitmap))->BMBytes);
+	DWORD * pO = (DWORD *)(void *)(((CWxBitmap *)(A->ActualBitmap))->BMBytes);
 	
 	ERROR3IF((sizeof(DWORD) != sizeof(AluPix32)), "OK who's broken AluPix32 not to be 32 bits");
 
@@ -1393,15 +1393,15 @@
 {
 	ERROR2IF((GC==NULL),FALSE,"BfxALU::Init not called / failed");
 	ERROR2IF( ((!A) || (A->ActualBitmap==NULL)) ,FALSE,"BfxALU can't find OIL bitmap");
-	ERROR3IF( (!(A->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
+	ERROR3IF( (!(A->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
 	ERROR2IF( ((!B) || (B->ActualBitmap==NULL)) ,FALSE,"BfxALU can't find OIL bitmap");
-	ERROR3IF( (!(B->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
+	ERROR3IF( (!(B->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
 	ERROR2IF( ((!T) || (T->ActualBitmap==NULL)) ,FALSE,"BfxALU can't find OIL bitmap");
-	ERROR3IF( (!(T->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
+	ERROR3IF( (!(T->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
 
-	BITMAPINFOHEADER * pABMI=&(((WinBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
-	BITMAPINFOHEADER * pBBMI=&(((WinBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
-	BITMAPINFOHEADER * pTBMI=&(((WinBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
+	BITMAPINFOHEADER * pABMI=&(((CWxBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
+	BITMAPINFOHEADER * pBBMI=&(((CWxBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
+	BITMAPINFOHEADER * pTBMI=&(((CWxBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
 
 	ERROR2IF((pABMI->biBitCount !=32), FALSE,"Bad BfxALU A reg");
 	ERROR2IF((pBBMI->biBitCount !=32), FALSE,"Bad BfxALU B reg");
@@ -1410,10 +1410,10 @@
 	ERROR2IF( ((pABMI->biSizeImage != pBBMI->biSizeImage) || (pABMI->biSizeImage != pTBMI->biSizeImage)), FALSE,
 			  "Incompatible bitmaps for MarkThresholdError");
 	
-	AluPix32 * pA = (AluPix32 *)(void *)(((WinBitmap *)(A->ActualBitmap))->BMBytes);
-	AluPix32 * pB = (AluPix32 *)(void *)(((WinBitmap *)(B->ActualBitmap))->BMBytes);
-	AluPix32 * pT = (AluPix32 *)(void *)(((WinBitmap *)(T->ActualBitmap))->BMBytes);
-	DWORD * pO = (DWORD *)(void *)(((WinBitmap *)(A->ActualBitmap))->BMBytes);
+//	AluPix32 * pA = (AluPix32 *)(void *)(((CWxBitmap *)(A->ActualBitmap))->BMBytes);
+	AluPix32 * pB = (AluPix32 *)(void *)(((CWxBitmap *)(B->ActualBitmap))->BMBytes);
+	AluPix32 * pT = (AluPix32 *)(void *)(((CWxBitmap *)(T->ActualBitmap))->BMBytes);
+	DWORD * pO = (DWORD *)(void *)(((CWxBitmap *)(A->ActualBitmap))->BMBytes);
 
 	ERROR3IF((sizeof(DWORD) != sizeof(AluPix32)), "OK who's broken AluPix32 not to be 32 bits");
 
@@ -1495,15 +1495,15 @@
 {
 	ERROR2IF((GC==NULL),FALSE,"BfxALU::Init not called / failed");
 	ERROR2IF( ((!A) || (A->ActualBitmap==NULL)) ,FALSE,"BfxALU can't find OIL bitmap");
-	ERROR3IF( (!(A->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
+	ERROR3IF( (!(A->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
 	ERROR2IF( ((!B) || (B->ActualBitmap==NULL)) ,FALSE,"BfxALU can't find OIL bitmap");
-	ERROR3IF( (!(B->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
+	ERROR3IF( (!(B->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
 	ERROR2IF( ((!T) || (T->ActualBitmap==NULL)) ,FALSE,"BfxALU can't find OIL bitmap");
-	ERROR3IF( (!(T->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
+	ERROR3IF( (!(T->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
 
-	BITMAPINFOHEADER * pABMI=&(((WinBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
-	BITMAPINFOHEADER * pBBMI=&(((WinBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
-	BITMAPINFOHEADER * pTBMI=&(((WinBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
+	BITMAPINFOHEADER * pABMI=&(((CWxBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
+	BITMAPINFOHEADER * pBBMI=&(((CWxBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
+	BITMAPINFOHEADER * pTBMI=&(((CWxBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
 
 	ERROR2IF((pABMI->biBitCount !=32), FALSE,"Bad BfxALU A reg");
 	ERROR2IF((pBBMI->biBitCount !=32), FALSE,"Bad BfxALU B reg");
@@ -1512,10 +1512,10 @@
 	ERROR2IF( ((pABMI->biSizeImage != pBBMI->biSizeImage) || (pABMI->biSizeImage != pTBMI->biSizeImage)), FALSE,
 			  "Incompatible bitmaps for MarkThresholdError");
 	
-	AluPix32 * pA = (AluPix32 *)(void *)(((WinBitmap *)(A->ActualBitmap))->BMBytes);
-	AluPix32 * pB = (AluPix32 *)(void *)(((WinBitmap *)(B->ActualBitmap))->BMBytes);
-	AluPix32 * pT = (AluPix32 *)(void *)(((WinBitmap *)(T->ActualBitmap))->BMBytes);
-	DWORD * pO = (DWORD *)(void *)(((WinBitmap *)(A->ActualBitmap))->BMBytes);
+	AluPix32 * pA = (AluPix32 *)(void *)(((CWxBitmap *)(A->ActualBitmap))->BMBytes);
+	AluPix32 * pB = (AluPix32 *)(void *)(((CWxBitmap *)(B->ActualBitmap))->BMBytes);
+	AluPix32 * pT = (AluPix32 *)(void *)(((CWxBitmap *)(T->ActualBitmap))->BMBytes);
+	DWORD * pO = (DWORD *)(void *)(((CWxBitmap *)(A->ActualBitmap))->BMBytes);
 
 	ERROR3IF((sizeof(DWORD) != sizeof(AluPix32)), "OK who's broken AluPix32 not to be 32 bits");
 
@@ -1586,20 +1586,20 @@
 {
 	ERROR2IF((GC==NULL),FALSE,"BfxALU::Init not called / failed");
 	ERROR2IF( ((!A) || (A->ActualBitmap==NULL)) ,FALSE,"BfxALU can't find OIL bitmap");
-	ERROR3IF( (!(A->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
+	ERROR3IF( (!(A->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
 	ERROR2IF( ((!B) || (B->ActualBitmap==NULL)) ,FALSE,"BfxALU can't find OIL bitmap");
-	ERROR3IF( (!(B->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
+	ERROR3IF( (!(B->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
 
-	BITMAPINFOHEADER * pABMI=&(((WinBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
-	BITMAPINFOHEADER * pBBMI=&(((WinBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
+	BITMAPINFOHEADER * pABMI=&(((CWxBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
+	BITMAPINFOHEADER * pBBMI=&(((CWxBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
 
 	ERROR2IF((pABMI->biBitCount !=32), FALSE,"Bad BfxALU A reg");
 	ERROR2IF((pBBMI->biBitCount !=32), FALSE,"Bad BfxALU B reg");
 
 	ERROR2IF( (pABMI->biSizeImage != pBBMI->biSizeImage), FALSE, "Incompatible bitmaps for MarkBitByWord");
 	
-	DWORD * pA = (DWORD *)(void *)(((WinBitmap *)(A->ActualBitmap))->BMBytes);
-	DWORD * pB = (DWORD *)(void *)(((WinBitmap *)(B->ActualBitmap))->BMBytes);
+	DWORD * pA = (DWORD *)(void *)(((CWxBitmap *)(A->ActualBitmap))->BMBytes);
+	DWORD * pB = (DWORD *)(void *)(((CWxBitmap *)(B->ActualBitmap))->BMBytes);
 
 	ERROR3IF((sizeof(DWORD) != sizeof(AluPix32)), "OK who's broken AluPix32 not to be 32 bits");
 
@@ -1634,20 +1634,20 @@
 {
 	ERROR2IF((GC==NULL),FALSE,"BfxALU::Init not called / failed");
 	ERROR2IF( ((!A) || (A->ActualBitmap==NULL)) ,FALSE,"BfxALU can't find OIL bitmap");
-	ERROR3IF( (!(A->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
+	ERROR3IF( (!(A->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
 	ERROR2IF( ((!B) || (B->ActualBitmap==NULL)) ,FALSE,"BfxALU can't find OIL bitmap");
-	ERROR3IF( (!(B->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
+	ERROR3IF( (!(B->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
 
-	BITMAPINFOHEADER * pABMI=&(((WinBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
-	BITMAPINFOHEADER * pBBMI=&(((WinBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
+	BITMAPINFOHEADER * pABMI=&(((CWxBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
+	BITMAPINFOHEADER * pBBMI=&(((CWxBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
 
 	ERROR2IF((pABMI->biBitCount !=32), FALSE,"Bad BfxALU A reg");
 	ERROR2IF((pBBMI->biBitCount !=32), FALSE,"Bad BfxALU B reg");
 
 	ERROR2IF( (pABMI->biSizeImage != pBBMI->biSizeImage), FALSE, "Incompatible bitmaps for MarkBitByWord");
 	
-	DWORD * pA = (DWORD *)(void *)(((WinBitmap *)(A->ActualBitmap))->BMBytes);
-	DWORD * pB = (DWORD *)(void *)(((WinBitmap *)(B->ActualBitmap))->BMBytes);
+	DWORD * pA = (DWORD *)(void *)(((CWxBitmap *)(A->ActualBitmap))->BMBytes);
+	DWORD * pB = (DWORD *)(void *)(((CWxBitmap *)(B->ActualBitmap))->BMBytes);
 
 	ERROR3IF((sizeof(DWORD) != sizeof(AluPix32)), "OK who's broken AluPix32 not to be 32 bits");
 
@@ -1682,20 +1682,20 @@
 {
 	ERROR2IF((GC==NULL),FALSE,"BfxALU::Init not called / failed");
 	ERROR2IF( ((!A) || (A->ActualBitmap==NULL)) ,FALSE,"BfxALU can't find OIL bitmap");
-	ERROR3IF( (!(A->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
+	ERROR3IF( (!(A->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
 	ERROR2IF( ((!B) || (B->ActualBitmap==NULL)) ,FALSE,"BfxALU can't find OIL bitmap");
-	ERROR3IF( (!(B->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
+	ERROR3IF( (!(B->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
 
-	BITMAPINFOHEADER * pABMI=&(((WinBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
-	BITMAPINFOHEADER * pBBMI=&(((WinBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
+	BITMAPINFOHEADER * pABMI=&(((CWxBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
+	BITMAPINFOHEADER * pBBMI=&(((CWxBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
 
 	ERROR2IF((pABMI->biBitCount !=32), FALSE,"Bad BfxALU A reg");
 	ERROR2IF((pBBMI->biBitCount !=32), FALSE,"Bad BfxALU B reg");
 
 	ERROR2IF( (pABMI->biSizeImage != pBBMI->biSizeImage), FALSE, "Incompatible bitmaps for MarkWordByBit");
 	
-	DWORD * pB = (DWORD *)(void *)(((WinBitmap *)(B->ActualBitmap))->BMBytes);
-	DWORD * pA = (DWORD *)(void *)(((WinBitmap *)(A->ActualBitmap))->BMBytes);
+	DWORD * pB = (DWORD *)(void *)(((CWxBitmap *)(B->ActualBitmap))->BMBytes);
+	DWORD * pA = (DWORD *)(void *)(((CWxBitmap *)(A->ActualBitmap))->BMBytes);
 
 	ERROR3IF((sizeof(DWORD) != sizeof(AluPix32)), "OK who's broken AluPix32 not to be 32 bits");
 
@@ -1766,13 +1766,13 @@
 	ERROR2IF((GC==NULL),FALSE,"BfxALU::Init not called / failed");
 	ERROR2IF( ((!A) || (A->ActualBitmap==NULL)) ,FALSE,"BfxALU can't find OIL bitmap");
 	ERROR2IF(!FoundRegion,FALSE,"Found Region flag is compulsorary");
-	ERROR3IF( (!(A->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
+	ERROR3IF( (!(A->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
 
-	BITMAPINFOHEADER * pABMI=&(((WinBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
+	BITMAPINFOHEADER * pABMI=&(((CWxBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
 
 	ERROR2IF((pABMI->biBitCount !=32), FALSE,"Bad BfxALU A reg");
 	
-	DWORD * pA = (DWORD *)(void *)(((WinBitmap *)(A->ActualBitmap))->BMBytes);
+	DWORD * pA = (DWORD *)(void *)(((CWxBitmap *)(A->ActualBitmap))->BMBytes);
 
 	INT32 Size = (pABMI->biSizeImage)>>2;
 	INT32 Width = pABMI->biWidth;
@@ -2025,7 +2025,7 @@
 	// Empty the region list
 	if (!pERL->Empty()) return FALSE;
 
-	INT32 ListSize=pERL->GetSize();
+//	INT32 ListSize=pERL->GetSize();
 
 	// Most of our error checking done in MarkRegions
 	if (!MarkRegions(MarkValue, ClearValue, &FoundRegion, NULL, NULL, NULL,
@@ -2113,13 +2113,13 @@
 {
 	ERROR2IF((GC==NULL),FALSE,"BfxALU::Init not called / failed");
 	ERROR2IF( ((!A) || (A->ActualBitmap==NULL)) ,FALSE,"BfxALU can't find OIL bitmap");
-	ERROR3IF( (!(A->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
+	ERROR3IF( (!(A->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
 
-	BITMAPINFOHEADER * pABMI=&(((WinBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
+	BITMAPINFOHEADER * pABMI=&(((CWxBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
 
 	ERROR2IF((pABMI->biBitCount !=32), FALSE,"Bad BfxALU A reg");
 
-	DWORD * pA = (DWORD *)(void *)(((WinBitmap *)(A->ActualBitmap))->BMBytes);
+	DWORD * pA = (DWORD *)(void *)(((CWxBitmap *)(A->ActualBitmap))->BMBytes);
 
 	INT32 Width = pABMI->biWidth;
 	INT32 Size = (pABMI->biSizeImage)>>2;
@@ -2192,12 +2192,12 @@
 {
 	ERROR2IF((GC==NULL),FALSE,"BfxALU::Init not called / failed");
 	ERROR2IF( ((!B) || (B->ActualBitmap==NULL)) ,FALSE,"BfxALU can't find OIL bitmap");
-	ERROR3IF( (!(B->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
+	ERROR3IF( (!(B->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
 	ERROR2IF( ((!T) || (T->ActualBitmap==NULL)) ,FALSE,"BfxALU can't find OIL bitmap");
-	ERROR3IF( (!(T->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
+	ERROR3IF( (!(T->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
 
-	BITMAPINFOHEADER * pBBMI=&(((WinBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader);
-	BITMAPINFOHEADER * pTBMI=&(((WinBitmap *)(T->ActualBitmap))->BMInfo->bmiHeader);
+	BITMAPINFOHEADER * pBBMI=&(((CWxBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader);
+	BITMAPINFOHEADER * pTBMI=&(((CWxBitmap *)(T->ActualBitmap))->BMInfo->bmiHeader);
 
 	ERROR2IF((pBBMI->biBitCount != pTBMI->biBitCount), FALSE,"Bad BfxALU B reg");
 	ERROR2IF( (pTBMI->biSizeImage != pBBMI->biSizeImage), FALSE,
@@ -2208,8 +2208,8 @@
 		case 32:
 		{
 
-			AluPix32 * pB = (AluPix32 *)(void *)(((WinBitmap *)(B->ActualBitmap))->BMBytes);
-			AluPix32 * pT = (AluPix32 *)(void *)(((WinBitmap *)(T->ActualBitmap))->BMBytes);
+			AluPix32 * pB = (AluPix32 *)(void *)(((CWxBitmap *)(B->ActualBitmap))->BMBytes);
+			AluPix32 * pT = (AluPix32 *)(void *)(((CWxBitmap *)(T->ActualBitmap))->BMBytes);
 	
 			ERROR3IF((sizeof(DWORD) != sizeof(AluPix32)), "OK who's broken AluPix32 not to be 32 bits");
 
@@ -2265,8 +2265,8 @@
 		case 8:
 		{
 
-			BYTE * pB = (BYTE *)(void *)(((WinBitmap *)(B->ActualBitmap))->BMBytes);
-			BYTE * pT = (BYTE *)(void *)(((WinBitmap *)(T->ActualBitmap))->BMBytes);
+			BYTE * pB = (BYTE *)(void *)(((CWxBitmap *)(B->ActualBitmap))->BMBytes);
+			BYTE * pT = (BYTE *)(void *)(((CWxBitmap *)(T->ActualBitmap))->BMBytes);
 	
 			ERROR3IF((sizeof(DWORD) != sizeof(AluPix32)), "OK who's broken AluPix32 not to be 32 bits");
 
@@ -2335,8 +2335,8 @@
 		case 1:
 		{
 
-			BYTE * pB = (BYTE *)(void *)(((WinBitmap *)(B->ActualBitmap))->BMBytes);
-			BYTE * pT = (BYTE *)(void *)(((WinBitmap *)(T->ActualBitmap))->BMBytes);
+			BYTE * pB = (BYTE *)(void *)(((CWxBitmap *)(B->ActualBitmap))->BMBytes);
+			BYTE * pT = (BYTE *)(void *)(((CWxBitmap *)(T->ActualBitmap))->BMBytes);
 	
 			ERROR3IF((sizeof(DWORD) != sizeof(AluPix32)), "OK who's broken AluPix32 not to be 32 bits");
 
@@ -2443,8 +2443,8 @@
 {
 	ERROR2IF((GC==NULL),FALSE,"BfxALU::Init not called / failed");
 	ERROR2IF( ((!A) || (A->ActualBitmap==NULL)),FALSE,"BfxALU can't find OIL bitmap");
-	ERROR3IF( (!(A->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
-	BITMAPINFOHEADER * pBMI=&(((WinBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
+	ERROR3IF( (!(A->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
+	BITMAPINFOHEADER * pBMI=&(((CWxBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
 
 	DWORD Style=0;
 	GraduationTable Table;
@@ -2547,8 +2547,8 @@
 {
 	ERROR2IF((GC==NULL),FALSE,"BfxALU::Init not called / failed");
 	ERROR2IF( ((!A) || (A->ActualBitmap==NULL)),FALSE,"BfxALU can't find OIL bitmap");
-	ERROR3IF( (!(A->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
-	BITMAPINFOHEADER * pBMI=&(((WinBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
+	ERROR3IF( (!(A->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
+	BITMAPINFOHEADER * pBMI=&(((CWxBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
 
 	GMATRIX pathmatrix;
 	pathmatrix.AX=pathmatrix.BY=1<<(FX+8);pathmatrix.CX=pathmatrix.CY=pathmatrix.AY=pathmatrix.BX=0;
@@ -2563,6 +2563,26 @@
 	pStats->N = Stats.N;
 	double N = (double) Stats.N;
 	if (N==0) N=1;
+#if 1
+	pStats->R = ((Stats.R )*1.0)/(N*255.0);
+	pStats->R2= ((Stats.R2)*1.0)/(N*255.0*255.0);
+	pStats->RX= ((Stats.RX)*1.0)/(N*255.0);
+	pStats->RY= ((Stats.RY)*1.0)/(N*255.0);
+	pStats->G = ((Stats.G )*1.0)/(N*255.0);
+	pStats->G2= ((Stats.G2)*1.0)/(N*255.0*255.0);
+	pStats->GX= ((Stats.GX)*1.0)/(N*255.0);
+	pStats->GY= ((Stats.GY)*1.0)/(N*255.0);
+	pStats->B = ((Stats.B )*1.0)/(N*255.0);
+	pStats->B2= ((Stats.B2)*1.0)/(N*255.0*255.0);
+	pStats->BX= ((Stats.BX)*1.0)/(N*255.0);
+	pStats->BY= ((Stats.BY)*1.0)/(N*255.0);
+	pStats->X = ((Stats.X )*1.0)/(N*255.0);
+	pStats->Y = ((Stats.Y )*1.0)/(N*255.0);
+	pStats->X2= ((Stats.X2)*1.0)/(N*255.0);
+	pStats->Y2= ((Stats.Y2)*1.0)/(N*255.0);
+	pStats->XY= ((Stats.XY)*1.0)/(N*255.0);
+//	pStats->Pixel = (DWORD)(Stats.C);
+#else
 	pStats->R = ((Stats.R ).MakeDouble())/(N*255.0);
 	pStats->R2= ((Stats.R2).MakeDouble())/(N*255.0*255.0);
 	pStats->RX= ((Stats.RX).MakeDouble())/(N*255.0);
@@ -2580,7 +2600,7 @@
 	pStats->X2= ((Stats.X2).MakeDouble())/(N*255.0);
 	pStats->Y2= ((Stats.Y2).MakeDouble())/(N*255.0);
 	pStats->XY= ((Stats.XY).MakeDouble())/(N*255.0);
-//	pStats->Pixel = (DWORD)(Stats.C);
+#endif
 
 	INT32 Width = pBMI->biWidth;
 		
@@ -2590,7 +2610,7 @@
 
 	if (Stats.C>0)
 	{
-		UINT32 Offset = ((UINT32)(Stats.C))-((UINT32)((((WinBitmap *)(A->ActualBitmap))->BMBytes)));
+		UINT32 Offset = ((UINT_PTR)(Stats.C))-((UINT_PTR)((((CWxBitmap *)(A->ActualBitmap))->BMBytes)));
 		if (Offset<(UINT32)pBMI->biSizeImage)
 		{
 			pStats->LowX = (Offset>>2) % Width;
@@ -2630,9 +2650,9 @@
 {
 	ERROR2IF((GC==NULL),FALSE,"BfxALU::Init not called / failed");
 	ERROR2IF( ((!pBitmap) || (pBitmap->ActualBitmap==NULL)) ,FALSE,"BfxALU can't find OIL bitmap");
-	ERROR3IF( (!(pBitmap->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
+	ERROR3IF( (!(pBitmap->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
 
-	BITMAPINFOHEADER * pABMI=&(((WinBitmap *)(pBitmap->ActualBitmap))->BMInfo->bmiHeader);
+	BITMAPINFOHEADER * pABMI=&(((CWxBitmap *)(pBitmap->ActualBitmap))->BMInfo->bmiHeader);
 
 	if (pXSize) *pXSize=(INT32)(pABMI->biWidth);
 	if (pYSize) *pYSize=(INT32)(pABMI->biHeight);
@@ -2664,19 +2684,19 @@
 {
 	ERROR2IF((GC==NULL),FALSE,"BfxALU::Init not called / failed");
 	ERROR2IF( ((!A) || (A->ActualBitmap==NULL)) ,FALSE,"BfxALU can't find OIL bitmap");
-	ERROR3IF( (!(A->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
+	ERROR3IF( (!(A->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
 	ERROR2IF( ((!B) || (B->ActualBitmap==NULL)) ,FALSE,"BfxALU can't find OIL bitmap");
-	ERROR3IF( (!(B->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
+	ERROR3IF( (!(B->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
 
-	BITMAPINFOHEADER * pABMI=&(((WinBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
-	BITMAPINFOHEADER * pBBMI=&(((WinBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
+	BITMAPINFOHEADER * pABMI=&(((CWxBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
+	BITMAPINFOHEADER * pBBMI=&(((CWxBitmap *)(A->ActualBitmap))->BMInfo->bmiHeader);
 
 	ERROR2IF((pABMI->biBitCount != pBBMI->biBitCount), FALSE,"Bad BfxALU A/B reg");
 	ERROR2IF( (pABMI->biSizeImage != pBBMI->biSizeImage), FALSE,
 			  "Incompatible bitmaps for ByteCopyBA()");
 	
-	void * pA = (void *)(((WinBitmap *)(A->ActualBitmap))->BMBytes);
-	void * pB = (void *)(((WinBitmap *)(B->ActualBitmap))->BMBytes);
+	void * pA = (void *)(((CWxBitmap *)(A->ActualBitmap))->BMBytes);
+	void * pB = (void *)(((CWxBitmap *)(B->ActualBitmap))->BMBytes);
 
 	memcpy(pA, pB, pABMI->biSizeImage);
 
@@ -2914,6 +2934,8 @@
 
 /* INLINE */
 
+PORTNOTE("other", "Disabled Accusoft filters")
+#ifndef EXCLUDE_FROM_XARALX
 #ifndef WEBSTER
 
 /********************************************************************************************
@@ -2942,9 +2964,9 @@
 
 	ERROR2IF((GC==NULL),FALSE,"BfxALU::Init not called / failed");
 	ERROR2IF( ((!B) || (B->ActualBitmap==NULL)) ,FALSE,"BfxALU can't find OIL bitmap");
-	ERROR3IF( (!(B->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(WinBitmap)) )),"BfxALU Oil layer inconsistency");
+	ERROR3IF( (!(B->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxALU Oil layer inconsistency");
 
-	BITMAPINFOHEADER * pBBMI=&(((WinBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader);
+	BITMAPINFOHEADER * pBBMI=&(((CWxBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader);
 
 	DWORD PaletteUsed = pBBMI->biClrUsed;
 	
@@ -3048,7 +3070,7 @@
 	// Copy the main bitmap data across
 	if (DoBodge)
 	{
-		LPBYTE pSourceBits = ((WinBitmap *)(B->ActualBitmap))->BMBytes;
+		LPBYTE pSourceBits = ((CWxBitmap *)(B->ActualBitmap))->BMBytes;
 		if (!MAH_BodgeCopyBitmap(pBBMI->biWidth, pBBMI->biHeight, pBBMI->biBitCount, pSourceBits, pBits))
 		{
 			GlobalUnlock(HMem);
@@ -3061,11 +3083,11 @@
 	{
 		if (pBBMI->biBitCount != 32)
 		{
-			memcpy(pBits /*dest*/, ((WinBitmap *)(B->ActualBitmap))->BMBytes, pBBMI->biSizeImage);
+			memcpy(pBits /*dest*/, ((CWxBitmap *)(B->ActualBitmap))->BMBytes, pBBMI->biSizeImage);
 		}
 		else
 		{
-			GC->ConvertBitmap(pBBMI, ((WinBitmap *)(B->ActualBitmap))->BMBytes, pCBMI, pBits, 8);
+			GC->ConvertBitmap(pBBMI, ((CWxBitmap *)(B->ActualBitmap))->BMBytes, pCBMI, pBits, 8);
 		}
 	}
 
@@ -3431,7 +3453,7 @@
 		return FALSE; // Error already set
 	}
 
-	BITMAPINFOHEADER * pABMI=&(((WinBitmap *)(pKB->ActualBitmap))->BMInfo->bmiHeader); // Dest
+	BITMAPINFOHEADER * pABMI=&(((CWxBitmap *)(pKB->ActualBitmap))->BMInfo->bmiHeader); // Dest
 
 	if (
 		// if our created bitmap  is not equal to the size of the accusoft one ....
@@ -3469,7 +3491,7 @@
 	}
 
 	// This is fabby Alex code. Just check out those void * rather than LPBYTE and DWORD instead of RGBQUAD
-	void * pA = (void *)(((WinBitmap *)(pKB->ActualBitmap))->BMBytes); //Dest
+	void * pA = (void *)(((CWxBitmap *)(pKB->ActualBitmap))->BMBytes); //Dest
 	void * pB = (void *)(((char *)(void *)(pBBMI)) + sizeof (BITMAPINFOHEADER) + (pBBMI->biClrUsed * sizeof (DWORD)) ); //Source
 
 	// Now fix problems with our DIB format palettes (like we don't support optimised palettes for 24 bit stuff)
@@ -3488,7 +3510,7 @@
 			// Copy the palette across
 			if (pBBMI->biClrUsed > 0)
 			{
-				LPRGBQUAD pAPAL = &(((WinBitmap *)(pKB->ActualBitmap))->BMInfo->bmiColors[0]); // Dest
+				LPRGBQUAD pAPAL = &(((CWxBitmap *)(pKB->ActualBitmap))->BMInfo->bmiColors[0]); // Dest
 				LPRGBQUAD pBPal = (LPRGBQUAD)(pBBMI + sizeof(BITMAPINFOHEADER)); // Source
 				memcpy(pAPAL /*dest*/, pBPal,  (pBBMI->biClrUsed * sizeof (RGBQUAD)) );
 			}
@@ -3771,8 +3793,8 @@
 	*ppOutput = NewBitmap(B,0,0,0,NULL, _R(IDS_BFX_BRIGHTCONT));
 	if (!ppOutput) return FALSE;
 	
-	BITMAPINFOHEADER * pBBMI=&(((WinBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader);
-	BITMAPINFOHEADER * pABMI=&(((WinBitmap *)((*ppOutput)->ActualBitmap))->BMInfo->bmiHeader);
+	BITMAPINFOHEADER * pBBMI=&(((CWxBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader);
+	BITMAPINFOHEADER * pABMI=&(((CWxBitmap *)((*ppOutput)->ActualBitmap))->BMInfo->bmiHeader);
 
 	DWORD PaletteUsed = pBBMI->biClrUsed;
 	
@@ -3787,8 +3809,8 @@
 	DWORD Size;
 	LPBYTE Source;
 	LPBYTE Dest;
-	LPBYTE pSBits = (((WinBitmap *)(B->ActualBitmap))->BMBytes);
-	LPBYTE pDBits = (((WinBitmap *)((*ppOutput)->ActualBitmap))->BMBytes);
+	LPBYTE pSBits = (((CWxBitmap *)(B->ActualBitmap))->BMBytes);
+	LPBYTE pDBits = (((CWxBitmap *)((*ppOutput)->ActualBitmap))->BMBytes);
 	
 	// We modify the image itself in the case of greyscale images
 	BOOL SingleChannel=IsGreyscaleBitmap(B);
@@ -3857,7 +3879,7 @@
 	ERROR2IF((!ppOutput),FALSE, "BfxALU output parameter must be non-null");
 	INT32 AccusoftHandle = -1;
 	if (!MakeAccusoftHandle(&AccusoftHandle)) return FALSE;
-	if ( (((WinBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader).biBitCount <8 )
+	if ( (((CWxBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader).biBitCount <8 )
 	{
 		INT32 result = AccusoftFilters::pfnIMG_promote_8(AccusoftHandle);
 		if (result < 0)
@@ -3901,7 +3923,7 @@
 	ERROR2IF((!ppOutput),FALSE, "BfxALU output parameter must be non-null");
 	INT32 AccusoftHandle = -1;
 	if (!MakeAccusoftHandle(&AccusoftHandle)) return FALSE;
-	if ( (((WinBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader).biBitCount <8 )
+	if ( (((CWxBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader).biBitCount <8 )
 	{
 		INT32 result = AccusoftFilters::pfnIMG_promote_8(AccusoftHandle);
 		if (result < 0)
@@ -3953,7 +3975,7 @@
 	ERROR2IF((!ppOutput),FALSE, "BfxALU output parameter must be non-null");
 	INT32 AccusoftHandle = -1;
 	if (!MakeAccusoftHandle(&AccusoftHandle)) return FALSE;
-	if ( (((WinBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader).biBitCount <8 )
+	if ( (((CWxBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader).biBitCount <8 )
 	{
 		INT32 result = AccusoftFilters::pfnIMG_promote_8(AccusoftHandle);
 		if (result < 0)
@@ -3999,7 +4021,7 @@
 	ERROR2IF((!ppOutput),FALSE, "BfxALU output parameter must be non-null");
 	INT32 AccusoftHandle = -1;
 	if (!MakeAccusoftHandle(&AccusoftHandle)) return FALSE;
-	if ( (((WinBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader).biBitCount <8 )
+	if ( (((CWxBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader).biBitCount <8 )
 	{
 		INT32 result = AccusoftFilters::pfnIMG_promote_8(AccusoftHandle);
 		if (result < 0)
@@ -4039,7 +4061,7 @@
 	ERROR2IF((!ppOutput),FALSE, "BfxALU output parameter must be non-null");
 	INT32 AccusoftHandle = -1;
 	if (!MakeAccusoftHandle(&AccusoftHandle)) return FALSE;
-	if ( (((WinBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader).biBitCount <8 )
+	if ( (((CWxBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader).biBitCount <8 )
 	{
 		INT32 result = AccusoftFilters::pfnIMG_promote_8(AccusoftHandle);
 		if (result < 0)
@@ -4082,7 +4104,7 @@
 	ERROR2IF((!ppOutput),FALSE, "BfxALU output parameter must be non-null");
 	INT32 AccusoftHandle = -1;
 	if (!MakeAccusoftHandle(&AccusoftHandle)) return FALSE;
-	if ( (((WinBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader).biBitCount <8 )
+	if ( (((CWxBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader).biBitCount <8 )
 	{
 		INT32 result = AccusoftFilters::pfnIMG_promote_8(AccusoftHandle);
 		if (result < 0)
@@ -4122,7 +4144,7 @@
 	ERROR2IF((!ppOutput),FALSE, "BfxALU output parameter must be non-null");
 	INT32 AccusoftHandle = -1;
 	if (!MakeAccusoftHandle(&AccusoftHandle)) return FALSE;
-	if ( (((WinBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader).biBitCount <8 )
+	if ( (((CWxBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader).biBitCount <8 )
 	{
 		INT32 result = AccusoftFilters::pfnIMG_promote_8(AccusoftHandle);
 		if (result < 0)
@@ -4140,6 +4162,7 @@
 		return MakeKernelBitmap(AccusoftHandle, ppOutput, FALSE, &(B->ActualBitmap->GetName()), _R(IDS_BFX_GREYSCALE));
 }
 #endif //WEBSTER
+#endif //XARALX
 
 /********************************************************************************************
 							  	
@@ -4167,8 +4190,8 @@
 	*ppOutput = NewBitmap(B,0,0,8, NULL, _R(IDS_BFX_GREYSCALE));
 	if (!ppOutput) return FALSE;
 	
-	BITMAPINFOHEADER * pBBMI=&(((WinBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader);
-	BITMAPINFOHEADER * pABMI=&(((WinBitmap *)((*ppOutput)->ActualBitmap))->BMInfo->bmiHeader);
+	BITMAPINFOHEADER * pBBMI=&(((CWxBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader);
+	BITMAPINFOHEADER * pABMI=&(((CWxBitmap *)((*ppOutput)->ActualBitmap))->BMInfo->bmiHeader);
 
 	ERROR2IF ((pBBMI->biSizeImage == 0) || (pBBMI->biCompression != BI_RGB) || (pBBMI->biHeight<0)
 			   || (pBBMI->biBitCount !=32) , FALSE,
@@ -4178,8 +4201,8 @@
 	ERROR2IF ((pBBMI->biWidth != pABMI->biWidth)||(pBBMI->biHeight != pABMI->biHeight)||(pABMI->biClrUsed!=0x100),
 		FALSE, "BfxALU MakeGreyscale32to8 size upset");
 	
-	RGBQUAD * pSBits = (RGBQUAD *)(void *)(((WinBitmap *)(B->ActualBitmap))->BMBytes);
-	LPBYTE pDBits = (((WinBitmap *)((*ppOutput)->ActualBitmap))->BMBytes);
+	RGBQUAD * pSBits = (RGBQUAD *)(void *)(((CWxBitmap *)(B->ActualBitmap))->BMBytes);
+	LPBYTE pDBits = (((CWxBitmap *)((*ppOutput)->ActualBitmap))->BMBytes);
 
 	RGBQUAD * Pal = ((RGBQUAD *)(void *)(pABMI + 1/*ptr arith*/));
 	for (INT32 x=0;x<0x100;x++)
@@ -4200,7 +4223,7 @@
 		}
 		for (;v&3;v++) pDBits[v]=0;
 	}
-	ERROR3IF((w!=(pBBMI->biSizeImage>>2) || v!=pABMI->biSizeImage), "Alex messed up MakeGreyscale32to8 bitmap sizes")
+	ERROR3IF((w!=(pBBMI->biSizeImage>>2) || v!=pABMI->biSizeImage), "Alex messed up MakeGreyscale32to8 bitmap sizes");
 	return TRUE;
 }
 
@@ -4254,10 +4277,10 @@
 
 BOOL BfxALU::IsGreyscaleBitmap(OILBitmap * pOilBmp)
 {
-	if ( (!pOilBmp) || (!pOilBmp->IsKindOf(CC_RUNTIME_CLASS(WinBitmap))) )
+	if ( (!pOilBmp) || (!pOilBmp->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap))) )
 		return FALSE;
 
-	BITMAPINFOHEADER * pBMI=&(((WinBitmap *)pOilBmp)->BMInfo->bmiHeader);
+	BITMAPINFOHEADER * pBMI=&(((CWxBitmap *)pOilBmp)->BMInfo->bmiHeader);
 	if ((pBMI->biBitCount!=8) || (pBMI->biClrUsed!=0x100)) return FALSE;
 	DWORD * pPal = (DWORD *)(void *)(pBMI +1 /*ptr arith*/);
 	for (DWORD x=0; x<0x100; x++) if ((pPal[x]&0x00ffffff) != (x|(x<<8)|(x<<16))) return FALSE;
@@ -4266,6 +4289,7 @@
 
 #ifndef WEBSTER
 #ifndef EXCLUDE_FROM_RALPH
+#ifndef EXCLUDE_FROM_XARALX
 
 /********************************************************************************************
 
@@ -4289,7 +4313,7 @@
 	ERROR2IF((!ppOutput),FALSE, "BfxALU output parameter must be non-null");
 	INT32 AccusoftHandle = -1;
 	if (!MakeAccusoftHandle(&AccusoftHandle)) return FALSE;
-	if ( (((WinBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader).biBitCount <8 )
+	if ( (((CWxBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader).biBitCount <8 )
 	{
 		INT32 result = AccusoftFilters::pfnIMG_promote_8(AccusoftHandle);
 		if (result < 0)
@@ -4333,7 +4357,7 @@
 	ERROR2IF((!ppOutput),FALSE, "BfxALU output parameter must be non-null");
 	INT32 AccusoftHandle = -1;
 	if (!MakeAccusoftHandle(&AccusoftHandle)) return FALSE;
-	if ( (((WinBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader).biBitCount <=8 )
+	if ( (((CWxBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader).biBitCount <=8 )
 	{
 		INT32 result = AccusoftFilters::pfnIMG_promote_24(AccusoftHandle);
 		if (result < 0)
@@ -4355,6 +4379,8 @@
 		return MakeKernelBitmap(AccusoftHandle, ppOutput, FALSE, &(B->ActualBitmap->GetName()), (Degree>0)?_R(IDS_BFX_SHARPEN):_R(IDS_BFX_BLUR));
 }
 
+#endif
+
 /********************************************************************************************
 
 >	BOOL BfxALU::RemoveDither(KernelBitmap * * ppOutput, INT32 Thresh, INT32 QuantCols, TraceMethod Method)
@@ -4389,10 +4415,10 @@
 #define QUANT_ROUND (1<<(QUANT_SHIFT-1))
 
 // here's what we want to do
-//#define QMEMBER(x,y,z) [((x)+QUANT_SIZE*((y)+QUANT_SIZE*(z)))]
-// and here's how to do it faster
-#define QMULT(w) (((w)<<(8-QUANT_SHIFT))+(w))
-#define QMEMBER(x,y,z) [(__mtemp=y+QMULT(z),x+QMULT(__mtemp))]
+#define QMEMBER(x,y,z) [((x)+QUANT_SIZE*((y)+QUANT_SIZE*(z)))]
+// and here's how to do it faster - but gcc doesn't like it
+//#define QMULT(w) (((w)<<(8-QUANT_SHIFT))+(w))
+//#define QMEMBER(x,y,z) [(__mtemp=y+QMULT(z),x+QMULT(__mtemp))]
 
 #define QUANT_NUMBER (QUANT_SIZE*QUANT_SIZE*QUANT_SIZE)
 
@@ -4408,7 +4434,7 @@
 	INT32 Depth=0;
 	INT32 Height=0;
 	INT32 l;
-	INT32 __mtemp;
+//	INT32 __mtemp;
 	if (!GetSize(B, &Width, &Height, &Depth)) return FALSE;
 
 	DWORD * InputLine[5];
@@ -4495,7 +4521,7 @@
 
 	if (OutputBPP==1 && Depth==1)
 	{
-		DWORD * SPalette= (DWORD*)(void*)(((WinBitmap *)(B->ActualBitmap))->BMInfo->bmiColors);
+		DWORD * SPalette= (DWORD*)(void*)(((CWxBitmap *)(B->ActualBitmap))->BMInfo->bmiColors);
 		if ((SPalette[0] & 0x00ffffff)==0 && (SPalette[1] & 0x00ffffff)==0x00ffffff)
 		{
 			// Forsooth! It is a true mono bitmap.
@@ -4507,9 +4533,9 @@
 			//		as they don't have any (not by our definition anywoise)
 			// (OK, enough of that).
 
-			memcpy(/*dest*/(((WinBitmap *)(pKB->ActualBitmap))->BMBytes), /*src*/(((WinBitmap *)(B->ActualBitmap))->BMBytes),
-				   (((WinBitmap *)(pKB->ActualBitmap))->BMInfo->bmiHeader.biSizeImage));
-			RGBQUAD * Palette= (((WinBitmap *)(pKB->ActualBitmap))->BMInfo->bmiColors);
+			memcpy(/*dest*/(((CWxBitmap *)(pKB->ActualBitmap))->BMBytes), /*src*/(((CWxBitmap *)(B->ActualBitmap))->BMBytes),
+				   (((CWxBitmap *)(pKB->ActualBitmap))->BMInfo->bmiHeader.biSizeImage));
+			RGBQUAD * Palette= (((CWxBitmap *)(pKB->ActualBitmap))->BMInfo->bmiColors);
 			Palette[0].rgbRed=Palette[0].rgbBlue=Palette[0].rgbGreen=0;
 			Palette[1].rgbRed=Palette[1].rgbBlue=Palette[1].rgbGreen=255;
 			*ppOutput=pKB;
@@ -4549,7 +4575,8 @@
 
 	INT32 Distrib[256];
 	INT32 Points=0;
-	for (INT32 n=0; n<256; n++) Distrib[n]=0;
+	INT32 n;
+	for (n=0; n<256; n++) Distrib[n]=0;
 
 	if (Method==TRACEMETHOD_GREYSCALE)
 	{
@@ -4657,7 +4684,7 @@
 			}
 			// Now write it back
 
-			void * VImage = (((WinBitmap *)(pKB->ActualBitmap))->BMBytes);
+			void * VImage = (((CWxBitmap *)(pKB->ActualBitmap))->BMBytes);
 			switch (Method)
 			{
 				case TRACEMETHOD_GREYSCALE:
@@ -4790,7 +4817,7 @@
 		{
 			case TRACEMETHOD_MONO:
 				if (!Pass) {
-					RGBQUAD * Palette= (((WinBitmap *)(pKB->ActualBitmap))->BMInfo->bmiColors);
+					RGBQUAD * Palette= (((CWxBitmap *)(pKB->ActualBitmap))->BMInfo->bmiColors);
 					INT32 Sum=0;
 					for (INT32 n=0; n<256; n++)
 					{
@@ -4808,10 +4835,11 @@
 					// we can represent a full contrast range. This probably isn't necessary as we're not
 					// dithering it but heh, we might as well keep white as white etc.
 
-					RGBQUAD * Palette= (((WinBitmap *)(pKB->ActualBitmap))->BMInfo->bmiColors);
+					RGBQUAD * Palette= (((CWxBitmap *)(pKB->ActualBitmap))->BMInfo->bmiColors);
 					INT32 totalpixels=Width * Height;
 					INT32 pixmax=totalpixels * INT32(0xff);
-					for (INT32 r=0; r<QUANT_SIZE; r+=QUANT_SIZE-1)
+					INT32 r;
+					for (r=0; r<QUANT_SIZE; r+=QUANT_SIZE-1)
 						for (INT32 g=0; g<QUANT_SIZE; g+=QUANT_SIZE-1) 
 							for (INT32 b=0; b<QUANT_SIZE; b+=QUANT_SIZE-1) 					
 							{
@@ -4874,7 +4902,7 @@
 				break;
 			case TRACEMETHOD_GREYSCALE:
 				{
-					RGBQUAD * Palette= (((WinBitmap *)(pKB->ActualBitmap))->BMInfo->bmiColors);
+					RGBQUAD * Palette= (((CWxBitmap *)(pKB->ActualBitmap))->BMInfo->bmiColors);
 					for (INT32 c=0; c<256; c++)
 						Palette[c].rgbRed=Palette[c].rgbBlue=Palette[c].rgbGreen=(BYTE)(DWORD)c;
 				}
@@ -4992,6 +5020,7 @@
 	return;
 }
 
+#ifndef EXCLUDE_FROM_XARALX
 /********************************************************************************************
 
 >	BOOL BfxALU::SpecialEffect(KernelBitmap * * ppOutput, double * Matrix, BfxSpecialEffect Type)
@@ -5019,7 +5048,7 @@
 	INT32 AccusoftHandle = -1;
 	if (!MakeAccusoftHandle(&AccusoftHandle)) return FALSE;
 
-	if ( (((WinBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader).biBitCount <=8 )
+	if ( (((CWxBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader).biBitCount <=8 )
 	{
 		INT32 result = AccusoftFilters::pfnIMG_promote_24(AccusoftHandle);
 		if (result < 0)
@@ -5115,7 +5144,7 @@
 	{
 		// Accusoft require a 24bpp bitmap for linear interpolation
 		// If less than or equal 8bpp 
-//		if ( (((WinBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader).biBitCount <=8 ) SCARY!!!!!
+//		if ( (((CWxBitmap *)(B->ActualBitmap))->BMInfo->bmiHeader).biBitCount <=8 ) SCARY!!!!!
 		INT32 NewWidth = Width;
 #ifdef BODGE_ACCUSOFT_RESIZE
 		// If doing the bodge to get around the Accusoft 24bpp linear interpolation problem, then
@@ -5150,6 +5179,7 @@
 	
 	return MakeKernelBitmap(AccusoftHandle, ppOutput, FALSE, &(B->ActualBitmap->GetName()), _R(IDS_BFX_RESIZE), DoBodge);
 }
+#endif
 
 /********************************************************************************************
 
@@ -5226,8 +5256,8 @@
 				Source+=Size;
 				Dest+=Size;
 			}
-			Source = (LPBYTE)(void *)((((DWORD)(void *)Source) +3)&(~3));
-			Dest = (LPBYTE)(void *)((((DWORD)(void *)Dest) +3)&(~3));
+			Source = (LPBYTE)(void *)((((UINT_PTR)(void *)Source) +3)&(~3));
+			Dest = (LPBYTE)(void *)((((UINT_PTR)(void *)Dest) +3)&(~3));
 		}
 	}
 	else
@@ -5240,8 +5270,8 @@
 				Source+=Size;
 				Dest+=Size;
 			}
-			Source = (LPBYTE)(void *)((((DWORD)(void *)Source) +3)&(~3));
-			Dest = (LPBYTE)(void *)((((DWORD)(void *)Dest) +3)&(~3));
+			Source = (LPBYTE)(void *)((((UINT_PTR)(void *)Source) +3)&(~3));
+			Dest = (LPBYTE)(void *)((((UINT_PTR)(void *)Dest) +3)&(~3));
 		}
 	}
 
@@ -5273,9 +5303,9 @@
 
 void BfxALU::ConvertScanLineToDWORD(KernelBitmap * pBitmap, INT32 Line, DWORD * pBuffer)
 {
-	BITMAPINFOHEADER * pBMI=&(((WinBitmap *)(pBitmap->ActualBitmap))->BMInfo->bmiHeader);
-	RGBQUAD * pPal=(((WinBitmap *)(pBitmap->ActualBitmap))->BMInfo->bmiColors);
-	void * VImage = (((WinBitmap *)(pBitmap->ActualBitmap))->BMBytes);
+	BITMAPINFOHEADER * pBMI=&(((CWxBitmap *)(pBitmap->ActualBitmap))->BMInfo->bmiHeader);
+	RGBQUAD * pPal=(((CWxBitmap *)(pBitmap->ActualBitmap))->BMInfo->bmiColors);
+	void * VImage = (((CWxBitmap *)(pBitmap->ActualBitmap))->BMBytes);
 	INT32 Width=pBMI->biWidth;
 	switch (pBMI->biBitCount)
 	{
@@ -5293,7 +5323,7 @@
 			for (INT32 w=0; w<Width; w++)
 			{	
 				pBuffer[w]=(((INT32)(Source[b])))|(((INT32)(Source[b+1]))<<8)|(((INT32)(Source[b+2]))<<16);
-				b+=3; /// Grrr MS bug prevents us from doing this efficiently
+				b+=3; // Grrr MS bug prevents us from doing this efficiently
 			}
 			return;
 		}


Xara