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

[XaraXtreme-commits] Commit Complete



Commit by  : gavin
Repository : xara
Revision   : 882
Date       : Tue Apr 25 16:43:10 BST 2006

Changed paths:
   M /Trunk/XaraLX/GDraw/gdraw.h
   M /Trunk/XaraLX/Kernel/GDrawIntf.cpp
   M /Trunk/XaraLX/Kernel/GDrawIntf.h
   M /Trunk/XaraLX/Kernel/XaDraw.cpp
   M /Trunk/XaraLX/Kernel/XaDraw.h
   M /Trunk/XaraLX/Kernel/XaDrwOld.cpp
   M /Trunk/XaraLX/Kernel/XaDrwOld.h
   M /Trunk/XaraLX/Kernel/xagdraw.h
   M /Trunk/XaraLX/libs/x86/libCDraw.a
   M /Trunk/XaraLX/wxOil/gdrawcon.h
   M /Trunk/XaraLX/wxOil/grndrgn.cpp
   M /Trunk/XaraLX/wxOil/offscrn.cpp

Updated CDraw. This requires changes to various CDraw interface files.

Note that it will be essential to use the new version of CDraw for XaraLX to compile.


Diff:
Index: Trunk/XaraLX/Kernel/XaDrwOld.h
===================================================================
--- Trunk/XaraLX/Kernel/XaDrwOld.h	(revision 881)
+++ Trunk/XaraLX/Kernel/XaDrwOld.h	(revision 882)
@@ -113,7 +113,7 @@
 //
 // GDraw_      -> XaDrawOld_
 // GColour_    -> XaColourOld_
-// GSprite_    -> XaSpriteOld_
+// GBitmap_    -> XaBitmapOld_
 // G3D_        -> Xa3DOld_
 
 // GDraw V2 function prototypes.
@@ -272,10 +272,16 @@
 	BYTE	ValueA, BYTE	ValueB, BYTE	ValueC, BYTE	ValueD,
 	pcPOINT PointA, pcPOINT PointB, pcPOINT PointC, pcPOINT PointD
 );
-INT32 XaBitmapOld_SetBias(double fBias);
-INT32 XaBitmapOld_SetGain(double fGain);
+INT32 XaBitmapOld_SetBias(double);
+INT32 XaBitmapOld_SetGain(double);
+INT32 XaBitmapOld_SetBrightness(double);
+INT32 XaBitmapOld_SetContrast(double);
+INT32 XaBitmapOld_SetGamma(double);
+INT32 XaBitmapOld_SetPostGamma(double);
+INT32 XaBitmapOld_SetSaturation(double);
 INT32 XaBitmapOld_SetContone( UINT32 uContoneStyle, COLORREF rgbStart=0x000000, COLORREF rgbEnd=0xFFFFFF );
-INT32 XaBitmapOld_SetTransparencyRamp( BYTE uStart=0x00, BYTE uEnd=0xFF );
+INT32 XaBitmapOld_SetInputRange( BYTE uStart=0x00, BYTE uEnd=0xFF );
+INT32 XaBitmapOld_SetOutputRange( BYTE uStart=0x00, BYTE uEnd=0xFF );
 INT32 XaColourOld_SetTilePattern(
 	pcBITMAPINFOHEADER BitmapInfo,
 	pcBYTE Bitmap,
Index: Trunk/XaraLX/Kernel/GDrawIntf.h
===================================================================
--- Trunk/XaraLX/Kernel/GDrawIntf.h	(revision 881)
+++ Trunk/XaraLX/Kernel/GDrawIntf.h	(revision 882)
@@ -199,8 +199,11 @@
 	virtual BOOL SetMatrix( GMATRIX* );
 	virtual void SetAntialiasFlag( BOOL );
 	virtual void SetAntialiasQualityFlag( BOOL );
-	virtual void SetBitmapSmoothingFlag( BOOL );
+	virtual void SetTileSmoothingFlag( BOOL );
 	virtual void SetTileFilteringFlag( BOOL );
+	virtual void SetMaxFilterSize( UINT32 );
+	virtual BOOL Sharpen( INT32 );
+	virtual BOOL Blur( INT32 );
 	virtual void SetHintingFlag( BOOL );
 	virtual void SetFlatness( DWORD );
 	virtual void TransformPath( LPPOINT, LPPOINT, DWORD, GMATRIX* );
@@ -249,10 +252,16 @@
 		CONST POINT *PointC,
 		CONST POINT *PointD
 	);
-	virtual BOOL SetBias(double fBias) ;
-	virtual BOOL SetGain(double fGain) ;
+	virtual BOOL SetBias(UINT32,double) ;
+	virtual BOOL SetGain(UINT32,double) ;
+	virtual BOOL SetBrightness(double) ;
+	virtual BOOL SetContrast(double) ;
+	virtual BOOL SetGamma(double) ;
+	virtual BOOL SetPostGamma(double) ;
+	virtual BOOL SetSaturation(double) ;
 	virtual BOOL SetContone( UINT32, COLORREF, COLORREF );
-	virtual BOOL SetTransparencyRamp( BYTE, BYTE );
+	virtual BOOL SetInputRange( UINT32, BYTE, BYTE );
+	virtual BOOL SetOutputRange( UINT32, BYTE, BYTE );
 	virtual BOOL SetBitmapFill( LPBITMAPINFOHEADER, LPBYTE, DWORD, LPPOINT, COLORREF, LPRGBQUAD,
 									LPBYTE, LPBYTE, LPBYTE, LPBYTE, DWORD );
 
Index: Trunk/XaraLX/Kernel/XaDraw.cpp
===================================================================
--- Trunk/XaraLX/Kernel/XaDraw.cpp	(revision 881)
+++ Trunk/XaraLX/Kernel/XaDraw.cpp	(revision 882)
@@ -493,20 +493,29 @@
 	return nRetVal;
 }
 
-INT32 XaColourDbg_Sharpen( pGCONTEXT pContext,INT32 Sharpen )
+INT32 XaBitmapDbg_SetMaxFilterSize( pGCONTEXT pContext,UINT32 uSize )
 {
-	XA_DRAW_ENTER(TEXT("XaColour_Sharpen"), pContext);
+	XA_DRAW_ENTER(TEXT("XaBitmap_SetMaxFilterSize"), pContext);
 	INT32 nRetVal =
-		g_XaFnsOriginal.pfnXaColour_Sharpen(pContext, Sharpen);
+		g_XaFnsOriginal.pfnXaBitmap_SetMaxFilterSize(pContext, Size);
+	XA_DRAW_LEAVE(pContext, ?);
+	return nRetVal;
+}
+
+INT32 XaBitmapDbg_Sharpen( pGCONTEXT pContext,INT32 Sharpen )
+{
+	XA_DRAW_ENTER(TEXT("XaBitmap_Sharpen"), pContext);
+	INT32 nRetVal =
+		g_XaFnsOriginal.pfnXaBitmap_Sharpen(pContext, Sharpen);
 	XA_DRAW_LEAVE(pContext, 26);
 	return nRetVal;
 }
 
-INT32 XaColourDbg_Blur   ( pGCONTEXT pContext,INT32 Blur    )
+INT32 XaBitmapDbg_Blur   ( pGCONTEXT pContext,INT32 Blur    )
 {
-	XA_DRAW_ENTER(TEXT("XaColour_Blur"), pContext);
+	XA_DRAW_ENTER(TEXT("XaBitmap_Blur"), pContext);
 	INT32 nRetVal =
-		g_XaFnsOriginal.pfnXaColour_Blur(pContext, Blur);
+		g_XaFnsOriginal.pfnXaBitmap_Blur(pContext, Blur);
 	XA_DRAW_LEAVE(pContext, 27);
 	return nRetVal;
 }
@@ -870,7 +879,7 @@
 	return nRetVal;
 }
 
-INT32 XaBitmap_SetBias( double fBias )
+INT32 XaBitmap_SetBias( pGCONTEXT pContext,UINT32 uChannel,double fBias )
 {
 	XA_DRAW_ENTER(TEXT("XaBitmap_SetBias"),pContext);
 	INT32 nRetVal = g_XaFnsOriginal.pfnXaBitmap_SetBias(pContext,fBias);
@@ -878,7 +887,7 @@
 	return nRetVal;
 }
 
-INT32 XaBitmap_SetGain( double fGain )
+INT32 XaBitmap_SetGain( pGCONTEXT pContext,UINT32 uChannel,double fGain )
 {
 	XA_DRAW_ENTER(TEXT("XaBitmap_SetGain"),pContext);
 	INT32 nRetVal = g_XaFnsOriginal.pfnXaBitmap_SetGain(pContext,fGain);
@@ -886,6 +895,14 @@
 	return nRetVal;
 }
 
+INT32 XaBitmap_SetBrightness( pGCONTEXT pContext,double fBrightness )
+{
+	XA_DRAW_ENTER(TEXT("XaBitmap_SetBrightness"),pContext);
+	INT32 nRetVal = g_XaFnsOriginal.pfnXaBitmap_SetBrightness(pContext,fBrightness);
+	XA_DRAW_LEAVE(pConvert,?);
+	return nRetVal;
+}
+
 INT32 XaBitmap_SetContone( pGCONTEXT pContext, UINT32 uContoneStyle, COLORREF rgbStart,COLORREF rgbEnd )
 {
 	XA_DRAW_ENTER(TEXT("XaBitmap_SetContone"),pContext);
@@ -894,14 +911,22 @@
 	return nRetVal;
 }
 
-INT32 XaBitmap_SetTransparencyRamp( pGCONTEXT pContext, BYTE uStart, BYTE uEnd )
+INT32 XaBitmap_SetInputRange( pGCONTEXT pContext, UINT32 uChannel,BYTE uStart, BYTE uEnd )
 {
-	XA_DRAW_ENTER(TEXT("XaBitmap_SetTransparencyRamp"),pContext);
-	INT32 nRetVal = g_XaFnsOriginal.pfnXaBitmap_SetTransparencyRamp(pContext,uStart,uEnd);
+	XA_DRAW_ENTER(TEXT("XaBitmap_SetInputRange"),pContext);
+	INT32 nRetVal = g_XaFnsOriginal.pfnXaBitmap_SetInputRange(pContext,uStart,uEnd);
 	XA_DRAW_LEAVE(pConvert,?);
 	return nRetVal;
 }
 
+INT32 XaBitmap_SetOutputRange( pGCONTEXT pContext, UINT32 uChannel,BYTE uStart, BYTE uEnd )
+{
+	XA_DRAW_ENTER(TEXT("XaBitmap_SetOutputRange"),pContext);
+	INT32 nRetVal = g_XaFnsOriginal.pfnXaBitmap_SetOutputRange(pContext,uStart,uEnd);
+	XA_DRAW_LEAVE(pConvert,?);
+	return nRetVal;
+}
+
 INT32 XaColourDbg_SetTilePattern(
 	pGCONTEXT pContext,
 	pcBITMAPINFOHEADER BitmapInfo,
@@ -1677,7 +1702,7 @@
 	return nRetVal;
 }
 
-INT32 XaSpriteDbg_PlotTile(
+INT32 XaBitmapDbg_PlotTile(
 	pGCONTEXT pContext,
 	pcBITMAPINFOHEADER BitmapInfo,
 	pcBYTE Bitmap,
@@ -1692,9 +1717,9 @@
 	pcBYTE TransparencyTranslationTable /* =0 */
 )
 {
-	XA_DRAW_ENTER(TEXT("XaSprite_PlotTile"), pContext);
+	XA_DRAW_ENTER(TEXT("XaBitmap_PlotTile"), pContext);
 	INT32 nRetVal =
-		g_XaFnsOriginal.pfnXaSprite_PlotTile(	pContext,
+		g_XaFnsOriginal.pfnXaBitmap_PlotTile(	pContext,
 												BitmapInfo, Bitmap, Style,
 												PointA, PointB, PointC,
 												TranslationTable,
@@ -1706,7 +1731,7 @@
 	return nRetVal;
 }
 
-INT32 XaSpriteDbg_PlotTile4(
+INT32 XaBitmapDbg_PlotTile4(
 	pGCONTEXT pContext,
 	pcBITMAPINFOHEADER BitmapInfo,
 	pcBYTE Bitmap,
@@ -1722,9 +1747,9 @@
 	pcBYTE TransparencyTranslationTable = 0
 )
 {
-	XA_DRAW_ENTER(TEXT("XaSprite_PlotTile4"), pContext);
+	XA_DRAW_ENTER(TEXT("XaBitmap_PlotTile4"), pContext);
 	INT32 nRetVal =
-		g_XaFnsOriginal.pfnXaSprite_PlotTile4(	pContext,
+		g_XaFnsOriginal.pfnXaBitmap_PlotTile4(	pContext,
 												BitmapInfo, Bitmap, Style,
 												PointA, PointB, PointC, PointD,
 												TranslationTable,
@@ -2017,8 +2042,8 @@
 	"GColour_SetDitherStyle",
 	"GColour_SetTileSmoothingFlag",
 	"GColour_SetTileFilteringFlag",
-	"GColour_Sharpen",
-	"GColour_Blur   ",
+	"GBitmap_Sharpen",
+	"GBitmap_Blur   ",
 	"GColour_SetHalftoneOrigin",
 	"GColour_SetColour",
 	"GColour_SetSolidColour",
@@ -2048,7 +2073,8 @@
 	"GBitmap_SetBias",
 	"GBitmap_SetGain",
 	"GBitmap_SetContone",
-	"GBitmap_SetTransparencyRamp",
+	"GBitmap_SetInputRange",
+	"GBitmap_SetOutputRange",
 	"GColour_SetTilePattern",
 	"GColour_SetTilePattern4",
 	"GColour_SetTransparentTilePattern",
@@ -2106,8 +2132,8 @@
 	"GDraw_SetBevelLightness",
 	"GDraw_SetBevelDarkness ",
 	"GDraw_TranslateBevelValue",
-	"GSprite_PlotTile",
-	"GSprite_PlotTile4",
+	"GBitmap_PlotTile",
+	"GBitmap_PlotTile4",
 	"G3D_SetTruePerspectiveFlag",
 	"G3D_DefineView",
 	"G3D_DefineTexture",
@@ -2184,7 +2210,8 @@
 	XaBitmapDbg_SetBias,
 	XaBitmapDbg_SetGain,
 	XaBitmapDbg_SetContone,
-	XaBitmapDbg_SetTransparencyRamp,
+	XaBitmapDbg_SetInputRange,
+	XaBitmapDbg_SetOutputRange,
 	XaColourDbg_SetTilePattern,
 	XaColourDbg_SetTilePattern4,
 	XaColourDbg_SetTransparentTilePattern,
Index: Trunk/XaraLX/Kernel/xagdraw.h
===================================================================
--- Trunk/XaraLX/Kernel/xagdraw.h	(revision 881)
+++ Trunk/XaraLX/Kernel/xagdraw.h	(revision 882)
@@ -158,8 +158,9 @@
 									(GColour_SetTileSmoothingFlag)
 #define XaColour_SetTileFilteringFlag \
 									(GColour_SetTileFilteringFlag)
-#define XaColour_Sharpen			(GColour_Sharpen)
-#define XaColour_Blur				(GColour_Blur)
+#define XaBitmap_SetMaxFilterSize	(GBitmap_SetMaxFilterSize)
+#define XaBitmap_Sharpen			(GBitmap_Sharpen)
+#define XaBitmap_Blur				(GBitmap_Blur)
 #define XaColour_SetHalftoneOrigin	(GColour_SetHalftoneOrigin)
 #define XaColour_SetColour			(GColour_SetColour)
 #define XaColour_SetSolidColour		(GColour_SetSolidColour)
@@ -199,9 +200,14 @@
 									(GColour_SetTransparent4WayGraduation4)
 #define XaBitmap_SetBias			(GBitmap_SetBias)
 #define XaBitmap_SetGain			(GBitmap_SetGain)
+#define XaBitmap_SetBrightness		(GBitmap_SetBrightness)
+#define XaBitmap_SetContrast		(GBitmap_SetContrast)
+#define XaBitmap_SetGamma			(GBitmap_SetGamma)
+#define XaBitmap_SetPostGamma		(GBitmap_SetPostGamma)
+#define XaBitmap_SetSaturation		(GBitmap_SetSaturation)
 #define XaBitmap_SetContone			(GBitmap_SetContone)
-#define XaBitmap_SetTransparencyRamp \
-									(GBitmap_SetTransparencyRamp)
+#define XaBitmap_SetInputRange		(GBitmap_SetInputRange)
+#define XaBitmap_SetOutputRange		(GBitmap_SetOutputRange)
 #define XaColour_SetTilePattern		(GColour_SetTilePattern)
 #define XaColour_SetTilePattern4	(GColour_SetTilePattern4)
 #define XaColour_SetTransparentTilePattern \
@@ -282,8 +288,8 @@
 #define XaDraw_TranslateBevelValue	(GDraw_TranslateBevelValue)
 
 
-#define XaSprite_PlotTile			(GSprite_PlotTile)
-#define XaSprite_PlotTile4			(GSprite_PlotTile4)
+#define XaBitmap_PlotTile			(GBitmap_PlotTile)
+#define XaBitmap_PlotTile4			(GBitmap_PlotTile4)
 
 #define Xa3D_SetTruePerspectiveFlag	(G3D_SetTruePerspectiveFlag)
 #define Xa3D_DefineView				(G3D_DefineView)
Index: Trunk/XaraLX/Kernel/GDrawIntf.cpp
===================================================================
--- Trunk/XaraLX/Kernel/GDrawIntf.cpp	(revision 881)
+++ Trunk/XaraLX/Kernel/GDrawIntf.cpp	(revision 882)
@@ -1153,7 +1153,7 @@
 				with perspectivised!
 
 ********************************************************************************************/
-void GDrawAsm::SetBitmapSmoothingFlag( BOOL Flag )
+void GDrawAsm::SetTileSmoothingFlag( BOOL Flag )
 {
 	CriticalSection Ralph;
 	CamProfile cp(CAMPROFILE_GDRAW);
@@ -1179,6 +1179,37 @@
 	if (MakeCurrent()) XaColour_SetTileFilteringFlag(m_pContext, FALSE != Flag );
 }
 
+/********************************************************************************************/
+
+void GDrawAsm::SetMaxFilterSize( UINT32 uSize )
+{
+	CriticalSection Ralph;
+	CamProfile cp(CAMPROFILE_GDRAW);
+
+	if ( MakeCurrent() )
+		XaBitmap_SetMaxFilterSize(m_pContext,uSize);
+}
+
+/********************************************************************************************/
+
+BOOL GDrawAsm::Blur( INT32 nBlur )
+{
+	CriticalSection Ralph;
+	CamProfile cp(CAMPROFILE_GDRAW);
+
+	return MakeCurrent() && (XaBitmap_Blur(m_pContext,nBlur) ? FALSE : TRUE);
+}
+
+/********************************************************************************************/
+
+BOOL GDrawAsm::Sharpen( INT32 nSharpen )
+{
+	CriticalSection Ralph;
+	CamProfile cp(CAMPROFILE_GDRAW);
+
+	return MakeCurrent() && (XaBitmap_Sharpen(m_pContext,nSharpen) ? FALSE : TRUE);
+}
+
 /********************************************************************************************
 
 >	void GDrawAsm::SetHintingFlag( BOOL Flag )
@@ -1777,26 +1808,76 @@
 
 /********************************************************************************************/
 
-BOOL GDrawAsm::SetBias( double fBias )
+BOOL GDrawAsm::SetBias( UINT32 uChannel,double fBias )
 {
 	CriticalSection Ralph;
 	CamProfile cp(CAMPROFILE_GDRAW);
 
-	return MakeCurrent() && (XaBitmap_SetBias(m_pContext,fBias) ? FALSE : TRUE);
+	return MakeCurrent() && (XaBitmap_SetBias(m_pContext,uChannel,fBias) ? FALSE : TRUE);
 }
 
 /********************************************************************************************/
 
-BOOL GDrawAsm::SetGain( double fGain )
+BOOL GDrawAsm::SetGain( UINT32 uChannel,double fGain )
 {
 	CriticalSection Ralph;
 	CamProfile cp(CAMPROFILE_GDRAW);
 
-	return MakeCurrent() && (XaBitmap_SetGain(m_pContext,fGain) ? FALSE : TRUE);
+	return MakeCurrent() && (XaBitmap_SetGain(m_pContext,uChannel,fGain) ? FALSE : TRUE);
 }
 
 /********************************************************************************************/
 
+BOOL GDrawAsm::SetBrightness( double fBrightness )
+{
+	CriticalSection Ralph;
+	CamProfile cp(CAMPROFILE_GDRAW);
+
+	return MakeCurrent() && (XaBitmap_SetBrightness(m_pContext,fBrightness) ? FALSE : TRUE);
+}
+
+/********************************************************************************************/
+
+BOOL GDrawAsm::SetContrast( double fContrast )
+{
+	CriticalSection Ralph;
+	CamProfile cp(CAMPROFILE_GDRAW);
+
+	return MakeCurrent() && (XaBitmap_SetContrast(m_pContext,fContrast) ? FALSE : TRUE);
+}
+
+/********************************************************************************************/
+
+BOOL GDrawAsm::SetGamma( double fGamma )
+{
+	CriticalSection Ralph;
+	CamProfile cp(CAMPROFILE_GDRAW);
+
+	return MakeCurrent() && (XaBitmap_SetGamma(m_pContext,fGamma) ? FALSE : TRUE);
+}
+
+/********************************************************************************************/
+
+BOOL GDrawAsm::SetPostGamma( double fPostGamma )
+{
+	CriticalSection Ralph;
+	CamProfile cp(CAMPROFILE_GDRAW);
+
+	return MakeCurrent() && (XaBitmap_SetPostGamma(m_pContext,fPostGamma) ? FALSE : TRUE);
+}
+
+/********************************************************************************************/
+
+BOOL GDrawAsm::SetSaturation( double fSaturation )
+{
+	CriticalSection Ralph;
+	CamProfile cp(CAMPROFILE_GDRAW);
+
+	return MakeCurrent() && (XaBitmap_SetSaturation(m_pContext,fSaturation) ? FALSE : TRUE);
+}
+
+/********************************************************************************************/
+
 BOOL GDrawAsm::SetContone( UINT32 uContoneStyle, COLORREF rgbStart, COLORREF rgbEnd )
 {
 	CriticalSection Ralph;
@@ -1807,14 +1888,23 @@
 
 /*******************************************************************************************/
 
-BOOL GDrawAsm::SetTransparencyRamp( BYTE uStart, BYTE uEnd )
+BOOL GDrawAsm::SetInputRange( UINT32 uChannel, BYTE uStart, BYTE uEnd )
 {
 	CriticalSection Ralph;
 	CamProfile cp(CAMPROFILE_GDRAW);
 
-	return MakeCurrent() && (XaBitmap_SetTransparencyRamp(m_pContext,uStart,uEnd) ? FALSE : TRUE);
+	return MakeCurrent() && (XaBitmap_SetInputRange(m_pContext,uChannel,uStart,uEnd) ? FALSE : TRUE);
 }
+/*******************************************************************************************/
 
+BOOL GDrawAsm::SetOutputRange( UINT32 uChannel, BYTE uStart, BYTE uEnd )
+{
+	CriticalSection Ralph;
+	CamProfile cp(CAMPROFILE_GDRAW);
+
+	return MakeCurrent() && (XaBitmap_SetOutputRange(m_pContext,uChannel,uStart,uEnd) ? FALSE : TRUE);
+}
+
 /*******************************************************************************************/
 
 BOOL GDrawAsm::SetBitmapFill( LPBITMAPINFOHEADER bmInfo, LPBYTE lpBytes, DWORD Style, LPPOINT Points,
@@ -2354,7 +2444,7 @@
 	CriticalSection Ralph;
 	CamProfile cp(CAMPROFILE_GDRAW);
 
-	return (MakeCurrent() && (XaSprite_PlotTile(m_pContext, bmInfo, lpBytes, Style, Points, Points+1, Points+2,
+	return (MakeCurrent() && (XaBitmap_PlotTile(m_pContext, bmInfo, lpBytes, Style, Points, Points+1, Points+2,
 									(CONST BGRT*)ColourTable, Red, Green, Blue, Trans)
 				? FALSE : TRUE));
 }
@@ -2366,7 +2456,7 @@
 	CriticalSection Ralph;
 	CamProfile cp(CAMPROFILE_GDRAW);
 
-	return (MakeCurrent() && (XaSprite_PlotTile4(m_pContext, bmInfo, lpBytes, Style, Points, Points+1, Points+2, Points+3,
+	return (MakeCurrent() && (XaBitmap_PlotTile4(m_pContext, bmInfo, lpBytes, Style, Points, Points+1, Points+2, Points+3,
 									(CONST BGRT*)ColourTable, Red, Green, Blue, Trans)
 				? FALSE : TRUE));
 }
Index: Trunk/XaraLX/Kernel/XaDrwOld.cpp
===================================================================
--- Trunk/XaraLX/Kernel/XaDrwOld.cpp	(revision 881)
+++ Trunk/XaraLX/Kernel/XaDrwOld.cpp	(revision 882)
@@ -840,14 +840,22 @@
 	return nRetVal;
 }
 
-INT32 XaBitmapOld_SetTransparencyRamp( BYTE uStart, BYTE uEnd )
+INT32 XaBitmapOld_SetInputRange( BYTE uStart, BYTE uEnd )
 {
-	XA_DRAW_ENTER(TEXT("XaBitmapOld_SetTransaprencyRamp"),s_pContext);
-	INT32 nRetVal = XaBitmap_SetTransparencyRamp(s_pContext,uStart,uEnd);
+	XA_DRAW_ENTER(TEXT("XaBitmapOld_SetInputRange"),s_pContext);
+	INT32 nRetVal = XaBitmap_SetInputRange(s_pContext,uStart,uEnd);
 	XA_DRAW_LEAVE(s_pConvert);
 	return nRetVal;
 }
 
+INT32 XaBitmapOld_SetOutputRange( BYTE uStart, BYTE uEnd )
+{
+	XA_DRAW_ENTER(TEXT("XaBitmapOld_SetOutputRange"),s_pContext);
+	INT32 nRetVal = XaBitmap_SetOutputRange(s_pContext,uStart,uEnd);
+	XA_DRAW_LEAVE(s_pConvert);
+	return nRetVal;
+}
+
 INT32 XaColourOld_SetTilePattern(
 	pcBITMAPINFOHEADER BitmapInfo,
 	pcBYTE Bitmap,
@@ -1559,7 +1567,7 @@
 	return nRetVal;
 }
 
-INT32 XaSpriteOld_PlotTile(
+INT32 XaBitmapOld_PlotTile(
 	pcBITMAPINFOHEADER BitmapInfo,
 	pcBYTE Bitmap,
 	DWORD Style,
@@ -1573,9 +1581,9 @@
 	pcBYTE TransparencyTranslationTable /* =0 */
 )
 {
-	XA_DRAW_ENTER(TEXT("XaSpriteOld_PlotTile"), s_pContext);
+	XA_DRAW_ENTER(TEXT("XaBitmapOld_PlotTile"), s_pContext);
 	INT32 nRetVal =
-		XaSprite_PlotTile(	s_pContext,
+		XaBitmap_PlotTile(	s_pContext,
 												BitmapInfo, Bitmap, Style,
 												PointA, PointB, PointC,
 												TranslationTable,
@@ -1587,7 +1595,7 @@
 	return nRetVal;
 }
 
-INT32 XaSpriteOld_PlotTile4(
+INT32 XaBitmapOld_PlotTile4(
 	pcBITMAPINFOHEADER BitmapInfo,
 	pcBYTE Bitmap,
 	DWORD Style,
@@ -1602,9 +1610,9 @@
 	pcBYTE TransparencyTranslationTable /* =0 */
 )
 {
-	XA_DRAW_ENTER(TEXT("XaSpriteOld_PlotTile4"), s_pContext);
+	XA_DRAW_ENTER(TEXT("XaBitmapOld_PlotTile4"), s_pContext);
 	INT32 nRetVal =
-		XaSprite_PlotTile4(	s_pContext,
+		XaBitmap_PlotTile4(	s_pContext,
 												BitmapInfo, Bitmap, Style,
 												PointA, PointB, PointC, PointD,
 												TranslationTable,
Index: Trunk/XaraLX/Kernel/XaDraw.h
===================================================================
--- Trunk/XaraLX/Kernel/XaDraw.h	(revision 881)
+++ Trunk/XaraLX/Kernel/XaDraw.h	(revision 882)
@@ -114,7 +114,7 @@
 //
 // GDraw_      -> XaDraw_
 // GColour_    -> XaColour_
-// GSprite_    -> XaSprite_
+// GBitmap_    -> XaBitmap_
 // G3D_        -> Xa3D_
 
 // Include the Oil specific version of GDraw
@@ -294,10 +294,16 @@
 		BYTE	ValueA, BYTE	ValueB, BYTE	ValueC, BYTE	ValueD,
 		pcPOINT PointA, pcPOINT PointB, pcPOINT PointC, pcPOINT PointD
 	) ;
-	INT32 (*pfnXaBitmap_SetBias)(pGCONTEXT pContext,double fBias) ;
-	INT32 (*pfnXaBitmap_SetGain)(pGCONTEXT pContext,double fGain) ;
+	INT32 (*pfnXaBitmap_SetBias)(pGCONTEXT pContext,UINT32 uChannel,double fBias) ;
+	INT32 (*pfnXaBitmap_SetGain)(pGCONTEXT pContext,UINT32 uChannel,double fGain) ;
+	INT32 (*pfnXaBitmap_SetBrightness)(pGCONTEXT pContext,double fBrightness) ;
+	INT32 (*pfnXaBitmap_SetContrast)(pGCONTEXT pContext,double fContrast) ;
+	INT32 (*pfnXaBitmap_SetGamma)(pGCONTEXT pContext,double fGamma) ;
+	INT32 (*pfnXaBitmap_SetPostGamma)(pGCONTEXT pContext,double fPostGamma) ;
+	INT32 (*pfnXaBitmap_SetSaturation)(pGCONTEXT pContext,double fSaturation) ;
 	INT32 (*pfnXaBitmap_SetContone)( pGCONTEXT pContext,UINT32 uContoneStyle,COLORREF rgbStart,COLORREF rgbEnd ) ;
-	INT32 (*pfnXaBitmap_SetTransparencyRamp)( pGCONTEXT pContext,BYTE uStart,BYTE uEnd ) ;
+	INT32 (*pfnXaBitmap_SetInputRange)( pGCONTEXT pContext,UINT32 uChannel,BYTE uStart,BYTE uEnd ) ;
+	INT32 (*pfnXaBitmap_SetOutputRange)( pGCONTEXT pContext,UINT32 uChannel,BYTE uStart,BYTE uEnd ) ;
 	INT32 (*pfnXaColour_SetTilePattern)(
 		pGCONTEXT pContext,
 		pcBITMAPINFOHEADER BitmapInfo,
@@ -563,7 +569,7 @@
 
 
 
-	INT32 (*pfnXaSprite_PlotTile)(
+	INT32 (*pfnXaBitmap_PlotTile)(
 		pGCONTEXT pContext,
 		pcBITMAPINFOHEADER BitmapInfo,
 		pcBYTE Bitmap,
@@ -577,7 +583,7 @@
 		pcBYTE  BlueTranslationTable,
 		pcBYTE TransparencyTranslationTable
 	) ;
-	INT32 (*pfnXaSprite_PlotTile4)(
+	INT32 (*pfnXaBitmap_PlotTile4)(
 		pGCONTEXT pContext,
 		pcBITMAPINFOHEADER BitmapInfo,
 		pcBYTE Bitmap,
@@ -729,8 +735,8 @@
 									(g_XaFns.pfnXaColour_SetTileSmoothingFlag)
 #define XaColour_SetTileFilteringFlag \
 									(g_XaFns.pfnXaColour_SetTileFilteringFlag)
-#define XaColour_Sharpen			(g_XaFns.pfnXaColour_Sharpen)
-#define XaColour_Blur				(g_XaFns.pfnXaColour_Blur)
+#define XaBitmap_Sharpen			(g_XaFns.pfnXaBitmap_Sharpen)
+#define XaBitmap_Blur				(g_XaFns.pfnXaBitmap_Blur)
 #define XaColour_SetHalftoneOrigin	(g_XaFns.pfnXaColour_SetHalftoneOrigin)
 #define XaColour_SetColour			(g_XaFns.pfnXaColour_SetColour)
 #define XaColour_SetSolidColour		(g_XaFns.pfnXaColour_SetSolidColour)
@@ -770,9 +776,14 @@
 									(g_XaFns.pfnXaColour_SetTransparent4WayGraduation4)
 #define XaBitmap_SetBias			(g_XaFns.pfnXaBitmap_SetBias)
 #define XaBitmap_SetGain			(g_XaFns.pfnXaBitmap_SetGain)
+#define XaBitmap_SetBrightness		(g_XaFns.pfnXaBitmap_SetBrightness)
+#define XaBitmap_SetContrast		(g_XaFns.pfnXaBitmap_SetContrast)
+#define XaBitmap_SetGamma			(g_XaFns.pfnXaBitmap_SetGamma)
+#define XaBitmap_SetPostGamma		(g_XaFns.pfnXaBitmap_SetPostGamma)
+#define XaBitmap_SetSaturation		(g_XaFns.pfnXaBitmap_SetSaturation)
 #define XaBitmap_SetContone			(g_XaFns.pfnXaBitmap_SetContone)
-#define XaBitmap_SetTransparencyRamp \
-									(g_XaFns.pfnXaBitmap_SetTransparencyRamp)
+#define XaBitmap_SetInputRange		(g_XaFns.pfnXaBitmap_SetInputRange)
+#define XaBitmap_SetOutputRange		(g_XaFns.pfnXaBitmap_SetOutputRange)
 #define XaColour_SetTilePattern		(g_XaFns.pfnXaColour_SetTilePattern)
 #define XaColour_SetTilePattern4	(g_XaFns.pfnXaColour_SetTilePattern4)
 #define XaColour_SetTransparentTilePattern \
@@ -853,8 +864,8 @@
 #define XaDraw_TranslateBevelValue	(g_XaFns.pfnXaDraw_TranslateBevelValue)
 
 
-#define XaSprite_PlotTile			(g_XaFns.pfnXaSprite_PlotTile)
-#define XaSprite_PlotTile4			(g_XaFns.pfnXaSprite_PlotTile4)
+#define XaBitmap_PlotTile			(g_XaFns.pfnXaBitmap_PlotTile)
+#define XaBitmap_PlotTile4			(g_XaFns.pfnXaBitmap_PlotTile4)
 
 #define Xa3D_SetTruePerspectiveFlag	(g_XaFns.pfnXa3D_SetTruePerspectiveFlag)
 #define Xa3D_DefineView				(g_XaFns.pfnXa3D_DefineView)
Index: Trunk/XaraLX/libs/x86/libCDraw.a
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: Trunk/XaraLX/wxOil/offscrn.cpp
===================================================================
--- Trunk/XaraLX/wxOil/offscrn.cpp	(revision 881)
+++ Trunk/XaraLX/wxOil/offscrn.cpp	(revision 882)
@@ -647,7 +647,7 @@
 
 		if(DoWantBMPSmoothing)
 		{
-			(pNewGRR->GetDrawContext())->SetBitmapSmoothingFlag(TRUE);
+			(pNewGRR->GetDrawContext())->SetTileSmoothingFlag(TRUE);
 		}
 
 		return pNewGRR;
Index: Trunk/XaraLX/wxOil/gdrawcon.h
===================================================================
--- Trunk/XaraLX/wxOil/gdrawcon.h	(revision 881)
+++ Trunk/XaraLX/wxOil/gdrawcon.h	(revision 882)
@@ -154,8 +154,11 @@
 	virtual BOOL SetMatrix( GMATRIX* ) = 0;
 	virtual void SetAntialiasFlag( BOOL ) = 0;
 	virtual void SetAntialiasQualityFlag( BOOL ) = 0;
-	virtual void SetBitmapSmoothingFlag( BOOL ) = 0;
+	virtual void SetTileSmoothingFlag( BOOL ) = 0;
 	virtual void SetTileFilteringFlag( BOOL ) = 0;
+	virtual void SetMaxFilterSize( UINT32 ) = 0;
+	virtual BOOL Sharpen( INT32 ) = 0;
+	virtual BOOL Blur( INT32 ) = 0;
 	virtual void SetHintingFlag( BOOL ) = 0;
 	virtual void SetFlatness( DWORD ) = 0;
 
@@ -226,10 +229,16 @@
 		CONST POINT *PointD
 	)  = 0;
 
-	virtual BOOL SetBias(double fBias) = 0;
-	virtual BOOL SetGain(double fGain) = 0;
+	virtual BOOL SetBias(UINT32,double) = 0;
+	virtual BOOL SetGain(UINT32,double) = 0;
+	virtual BOOL SetBrightness(double) = 0;
+	virtual BOOL SetContrast(double) = 0;
+	virtual BOOL SetGamma(double) = 0;
+	virtual BOOL SetPostGamma(double) = 0;
+	virtual BOOL SetSaturation(double) = 0;
 	virtual BOOL SetContone( UINT32, COLORREF=0x000000, COLORREF=0xFFFFFF ) = 0;
-	virtual BOOL SetTransparencyRamp( BYTE=0x00,BYTE=0xFF ) = 0;
+	virtual BOOL SetInputRange( UINT32,BYTE=0x00,BYTE=0xFF ) = 0;
+	virtual BOOL SetOutputRange( UINT32,BYTE=0x00,BYTE=0xFF ) = 0;
 
 	virtual BOOL SetBitmapFill( LPBITMAPINFOHEADER, LPBYTE, DWORD, LPPOINT, COLORREF, LPRGBQUAD,
 									LPBYTE, LPBYTE, LPBYTE, LPBYTE, DWORD = 0) = 0;
Index: Trunk/XaraLX/wxOil/grndrgn.cpp
===================================================================
--- Trunk/XaraLX/wxOil/grndrgn.cpp	(revision 881)
+++ Trunk/XaraLX/wxOil/grndrgn.cpp	(revision 882)
@@ -3431,7 +3431,7 @@
 		if (!SetTileFilteringFlag) SetTileFilteringFlag = pCapture->info.caFlags.TileFiltering;
 	}
 
-	GetDrawContext()->SetBitmapSmoothingFlag(SetExtraSmoothFlag);
+	GetDrawContext()->SetTileSmoothingFlag(SetExtraSmoothFlag);
 	GetDrawContext()->SetTileFilteringFlag(SetTileFilteringFlag);
 
 	return TRUE;
@@ -3725,8 +3725,8 @@
 		else
 			GetDrawContext()->SetContone(0);
 
-		GetDrawContext()->SetBias(Fill->GetProfile().GetBias()) ;
-		GetDrawContext()->SetGain(Fill->GetProfile().GetGain()) ;
+		GetDrawContext()->SetBias(3,Fill->GetProfile().GetBias()) ;
+		GetDrawContext()->SetGain(3,Fill->GetProfile().GetGain()) ;
 
 		//---------------------------------------------------------------------------------------
 		// Smoothing decisions
@@ -4307,9 +4307,9 @@
 	if ( bpp==32 && Fill->GetBitmap()->IsTransparent() )
 		TranspStyle |= 0x8000;
 
-	GetDrawContext()->SetBias(Fill->GetProfile().GetBias()) ;
-	GetDrawContext()->SetGain(Fill->GetProfile().GetGain()) ;
-	GetDrawContext()->SetTransparencyRamp(StartTransp,EndTransp) ;
+	GetDrawContext()->SetBias(3,Fill->GetProfile().GetBias()) ;
+	GetDrawContext()->SetGain(3,Fill->GetProfile().GetGain()) ;
+	GetDrawContext()->SetOutputRange(3,StartTransp,EndTransp) ;
 
 	//---------------------------------------------------------------------------------------
 	// Smoothing decisions
Index: Trunk/XaraLX/GDraw/gdraw.h
===================================================================
--- Trunk/XaraLX/GDraw/gdraw.h	(revision 881)
+++ Trunk/XaraLX/GDraw/gdraw.h	(revision 882)
@@ -196,8 +196,9 @@
 	extern INT32 GColour_SetDitherStyle( pGCONTEXT pContext,DitherStyle Style=DITHER_GREY_ORDERED ) ;
 	extern INT32 GColour_SetTileSmoothingFlag( pGCONTEXT pContext,bool Flag ) ;
 	extern INT32 GColour_SetTileFilteringFlag( pGCONTEXT pContext,bool Flag ) ;
-	extern INT32 GColour_Sharpen( pGCONTEXT pContext,INT32 Sharpen ) ;
-	extern INT32 GColour_Blur   ( pGCONTEXT pContext,INT32 Blur    ) ;
+	extern INT32 GBitmap_SetMaxFilterSize( pGCONTEXT pContext, UINT32 Size ) ;
+	extern INT32 GBitmap_Sharpen( pGCONTEXT pContext,INT32 Sharpen ) ;
+	extern INT32 GBitmap_Blur   ( pGCONTEXT pContext,INT32 Blur    ) ;
 	extern INT32 GColour_SetHalftoneOrigin( pGCONTEXT pContext, INT32 x,INT32 y ) ;
 //	extern INT32 GColour_SetSupersampleRate( pGCONTEXT pContext,UINT32 Rate ) ;
 	extern INT32 GColour_SetColour( pGCONTEXT pContext,COLORREF Colour ) ;
@@ -332,15 +333,21 @@
 		BYTE	ValueA, BYTE	ValueB, BYTE	ValueC, BYTE	ValueD,
 		pcPOINT PointA, pcPOINT PointB, pcPOINT PointC, pcPOINT PointD
 	) ;
-	extern INT32 GBitmap_SetBias(pGCONTEXT pContext,double fBias) ;
-	extern INT32 GBitmap_SetGain(pGCONTEXT pContext,double fGain) ;
+	extern INT32 GBitmap_SetBrightness	(pGCONTEXT pContext,double fBrightness	) ;
+	extern INT32 GBitmap_SetContrast	(pGCONTEXT pContext,double fContrast	) ;
+	extern INT32 GBitmap_SetGamma		(pGCONTEXT pContext,double fGamma		) ;
+	extern INT32 GBitmap_SetPostGamma	(pGCONTEXT pContext,double fPostGamma	) ;
+	extern INT32 GBitmap_SetSaturation	(pGCONTEXT pContext,double fSaturation	) ;
 	extern INT32 GBitmap_SetContone( 
 		pGCONTEXT pContext, 
 		UINT32 uContoneStyle, 
 		COLORREF rgbStart = 0x000000,
 		COLORREF rgbEnd   = 0xFFFFFF 
 	) ;
-	extern INT32 GBitmap_SetTransparencyRamp( pGCONTEXT pContext,BYTE uStart=0x00,BYTE uEnd=0xFF) ;
+	extern INT32 GBitmap_SetBias		(pGCONTEXT pContext,UINT32 uChannel,double fBias) ;
+	extern INT32 GBitmap_SetGain		(pGCONTEXT pContext,UINT32 uChannel,double fGain) ;
+	extern INT32 GBitmap_SetInputRange  (pGCONTEXT pContext,UINT32 uChannel,BYTE uStart=0x00,BYTE uEnd=0xFF) ;
+	extern INT32 GBitmap_SetOutputRange (pGCONTEXT pContext,UINT32 uChannel,BYTE uStart=0x00,BYTE uEnd=0xFF) ;
 	extern INT32 GColour_SetTilePattern(
 		pGCONTEXT pContext,
 		pcBITMAPINFOHEADER BitmapInfo,
@@ -606,7 +613,7 @@
 
 
 
-	extern INT32 GSprite_PlotTile(
+	extern INT32 GBitmap_PlotTile(
 		pGCONTEXT pContext,
 		pcBITMAPINFOHEADER BitmapInfo,
 		pcBYTE Bitmap,
@@ -620,7 +627,7 @@
 		pcBYTE  BlueTranslationTable = 0,
 		pcBYTE TransparencyTranslationTable = 0
 	) ;
-	extern INT32 GSprite_PlotTile4(
+	extern INT32 GBitmap_PlotTile4(
 		pGCONTEXT pContext,
 		pcBITMAPINFOHEADER BitmapInfo,
 		pcBYTE Bitmap,


Xara