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

[XaraXtreme-commits] Commit Complete



Commit by  : alex
Repository : xara
Revision   : 1313
Date       : Tue Jun 13 17:55:25 BST 2006

Changed paths:
   M /Trunk/XaraLX/Kernel/Makefile.am
   D /Trunk/XaraLX/Kernel/SWFText.cpp
   M /Trunk/XaraLX/Kernel/ai_bmp.cpp
   M /Trunk/XaraLX/Kernel/ai_grad.cpp
   M /Trunk/XaraLX/Kernel/ccfile.cpp
   M /Trunk/XaraLX/Kernel/filters.cpp
   M /Trunk/XaraLX/Kernel/swfexpdc.cpp
   M /Trunk/XaraLX/Kernel/swffiltr.cpp
   M /Trunk/XaraLX/Kernel/swfrndr.cpp
   A /Trunk/XaraLX/Kernel/swftext.cpp (from /Trunk/XaraLX/Kernel/SWFText.cpp:1311)

Flash filter now compiles


Diff:
Index: Trunk/XaraLX/Kernel/filters.cpp
===================================================================
--- Trunk/XaraLX/Kernel/filters.cpp	(revision 1312)
+++ Trunk/XaraLX/Kernel/filters.cpp	(revision 1313)
@@ -104,9 +104,9 @@
 //#include "coreleps.h"
 #include "aw_eps.h"
 #include "cameleps.h"
-//#include "ai_eps.h"
-//#include "ai5_eps.h"
-//#include "ai8_eps.h"
+#include "ai_eps.h"
+#include "ai5_eps.h"
+#include "ai8_eps.h"
 //#include "drawfltr.h"
 //#include "textfltr.h"
 //#include "oilfltrs.h" - in camtypes.h [AUTOMATICALLY REMOVED]
@@ -131,7 +131,7 @@
 //#include "cdrfiltr.h"
 //#include "docview.h" - in camtypes.h [AUTOMATICALLY REMOVED]
 //#include "ben.h"
-//#include "freeeps.h"
+#include "freeeps.h"
 //#include "rik.h"
 //#include "app.h" - in camtypes.h [AUTOMATICALLY REMOVED]
 #include "fontman.h"
@@ -802,23 +802,19 @@
 
 #ifndef STANDALONE
 
-PORTNOTE("filter","Removed FlashFilter usage")
-#ifndef EXCLUDE_FROM_XARALX
 	ADD_FILTER(FlashFilter)
-#endif
 
 	// Other filters in alphabetical order.
 PORTNOTE("filter","Removed filters usage")
 #ifndef EXCLUDE_FROM_XARALX
 	ADD_FILTER(AcornDrawFilter)
-
+#endif
 	// Adobe AI / EPS filters.
 	ADD_FILTER(AIEPSFilter)
 	ADD_FILTER(AI5EPSFilter)
 	ADD_FILTER(AI8EPSFilter)
 
 	ADD_FILTER(PhotoShopEPSFilter)
-#endif
 
 	ADD_FILTER(ArtWorksEPSFilter)
 PORTNOTE("filter","Removed filters usage")
@@ -850,9 +846,11 @@
 	ADD_FILTER(Corel4EPSFilter)
 
 	ADD_FILTER(CorelPaletteFilter)
-
+#endif
 	ADD_FILTER(FreeHandEPSFilter)
 
+PORTNOTE("filter","Removed filters usage")
+#ifndef EXCLUDE_FROM_XARALX
 	// HTML based filters.
 PORTNOTE("filter","Removed HTMLFilter usage")
 	ADD_FILTER(HTMLFilter)	// the HTML filter
Index: Trunk/XaraLX/Kernel/swfexpdc.cpp
===================================================================
--- Trunk/XaraLX/Kernel/swfexpdc.cpp	(revision 1312)
+++ Trunk/XaraLX/Kernel/swfexpdc.cpp	(revision 1313)
@@ -98,9 +98,9 @@
 #include <math.h>
 #include <string.h>
 
-#include "camelot.h"
 #include "camtypes.h"
 
+#include "camelot.h"
 #include "colormgr.h"
 //#include "colmodel.h" - in camtypes.h [AUTOMATICALLY REMOVED]
 //#include "fillattr.h" - in camtypes.h [AUTOMATICALLY REMOVED]
@@ -115,7 +115,7 @@
 //#include "ccfile.h" - in camtypes.h [AUTOMATICALLY REMOVED]
 //#include "docrect.h" - in camtypes.h [AUTOMATICALLY REMOVED]
 //#include "doccolor.h" - in camtypes.h [AUTOMATICALLY REMOVED]
-#include "zstream.h"
+//#include "zstream.h"
 
 #include "fontman.h"
 //#include "app.h"			// For FONTMANAGER - in camtypes.h [AUTOMATICALLY REMOVED]
@@ -230,8 +230,8 @@
 {
 	// Calculate the size of the image. To save complications, I've moved the image to
 	// 0,0, rather than from whatever bounds Camelot uses.
-	mLowCorner.x = ImageBounds.lox / FLASH_SCALE;
-	mLowCorner.y = ImageBounds.hiy / FLASH_SCALE;
+	mLowCorner.x = ImageBounds.lo.x / FLASH_SCALE;
+	mLowCorner.y = ImageBounds.hi.y / FLASH_SCALE;
 
 	Transform ( &ImageBounds );
 
@@ -288,17 +288,17 @@
 BOOL FlashExportDC::WriteBoundingBox ( DocRect Bounds )
 {
 	// Calculate the number of significant bits needed to store the co-ordinates.
-	UINT32 Bits = CountBits ( Max ( Absol ( Bounds.lox ),
-								  Absol ( Bounds.loy ),
-								  Absol ( Bounds.hix ),
-								  Absol ( Bounds.hiy ) ) );
+	UINT32 Bits = CountBits ( Max ( Absol ( Bounds.lo.x ),
+								  Absol ( Bounds.lo.y ),
+								  Absol ( Bounds.hi.x ),
+								  Absol ( Bounds.hi.y ) ) );
 
 	// Write the bounding box to a file.
 	if ( WriteBits ( Bits, 5 ) &&
-		 WriteBits ( Bounds.lox, Bits ) &&
-		 WriteBits ( Bounds.hix, Bits ) &&
-		 WriteBits ( Bounds.loy, Bits ) &&
-		 WriteBits ( Bounds.hiy, Bits ) )
+		 WriteBits ( Bounds.lo.x, Bits ) &&
+		 WriteBits ( Bounds.hi.x, Bits ) &&
+		 WriteBits ( Bounds.lo.y, Bits ) &&
+		 WriteBits ( Bounds.hi.y, Bits ) )
 	{
 		ByteAlign ();
 		return TRUE;
@@ -652,7 +652,7 @@
 	WORD		ID			= FLASH_FIRST_ID + FlashPlaceObject::GetBitmapCount () +
 							  FlashPlaceObject::GetFontCount () +
 							  FlashPlaceObject::GetTextCount () + pPath->GetShapeID ();
-	DocCoord	MoveTo		( Bounds.lox, Bounds.hiy );
+	DocCoord	MoveTo		( Bounds.lo.x, Bounds.hi.y );
 	double		Tolerance	= 100.0f;
 	FlashColour	LineColour	= pPath->GetLineColour ();
 	WORD		LineWidth	= pPath->GetLineWidth ();
@@ -704,7 +704,7 @@
 
 	// Calculate the difference between the original curve and the generated curve. This
 	// creates it as 5% of the diagonal of the bounding box.
-	Tolerance = ( sqrt ( ( Bounds.hix * Bounds.hix ) + ( Bounds.hiy * Bounds.hiy ) ) ) / 20;
+	Tolerance = ( sqrt ( ( Bounds.hi.x * Bounds.hi.x ) + ( Bounds.hi.y * Bounds.hi.y ) ) ) / 20;
 
 	// Write the edge record.
 	WriteEdgeRecord ( Coords, &MoveTo, Verb, NumCoords, Lines, Fills, 0,
@@ -1326,8 +1326,8 @@
 	// Calculate the new hi co-ordinates for the bounding box.
 	INT32 HiX;
 	INT32 HiY;
-	INT32 dX = Bounds->hix - Bounds->lox;
-	INT32 dY = Bounds->hiy - Bounds->loy;
+	INT32 dX = Bounds->hi.x - Bounds->lo.x;
+	INT32 dY = Bounds->hi.y - Bounds->lo.y;
 	
 	// Catch rounding errors.
 	if ( ( dX % FLASH_SCALE ) > ( FLASH_SCALE / 2 ) )
@@ -1349,10 +1349,10 @@
 	}
 
 	// And write them into the data structure.
-	Bounds->lox = 0;
-	Bounds->loy = 0;
-	Bounds->hix = HiX;
-	Bounds->hiy = HiY;
+	Bounds->lo.x = 0;
+	Bounds->lo.y = 0;
+	Bounds->hi.x = HiX;
+	Bounds->hi.y = HiY;
 }
 
 /********************************************************************************************
@@ -2264,6 +2264,7 @@
 	UINT32 Size = wcslen ( pGlyphs );
 
 	// Create an array to store the characters in.
+#if 0
 	char ASCIIChars [FLASH_TEXT_ARRAY_SIZE];
 
 	// Convert the unicode characters into ASCII characters.
@@ -2273,7 +2274,14 @@
 		// Write the string out to disk.
 		Write ( ASCIIChars, Size );
 	}
+#else
+	// Bodge using wx
+	wxString temp(pGlyphs);
+	Write (temp.mb_str(), Size);
 
+#endif
+	
+
 	WriteTagSize ( StartPos );
 
 	return TRUE;
@@ -2875,10 +2883,20 @@
 	StartPos = ExportFile->tell();				// Get the start position of the file.
 
 	// Step 4:	Record the strings to the file.
-	Write ( ( BYTE* ) pURL, strlen ( pURL ) );	// Write a string of the URL.
+
+	// Write ( ( BYTE* ) pURL, strlen ( pURL ) );	// Write a string of the URL.
+	TCHAR * pC=pURL;
+	while (*pC)
+	{
+		WriteByte(*(pC++));	// 1:1 TCHAR to CHAR conversion
+	}
 	WriteByte ( 0 );							// Terminate the string.
-	Write ( ( BYTE* ) pFrame,					// Write the frame to insert the URL into.
-			strlen ( pFrame ) );
+	// Write ( ( BYTE* ) pFrame, strlen ( pFrame ) );	// Write the frame to insert the URL into.
+	pC=pFrame;
+	while (*pC)
+	{
+		WriteByte(*(pC++));	// 1:1 TCHAR to CHAR conversion
+	}
 
 	// Step 5:	Fill in the record length.
 	EndPos = ExportFile->tell ();				// Get the file position.
Index: Trunk/XaraLX/Kernel/swftext.cpp
===================================================================
--- Trunk/XaraLX/Kernel/swftext.cpp	(revision 0)
+++ Trunk/XaraLX/Kernel/swftext.cpp	(revision 1313)
@@ -0,0 +1,897 @@
+// $Id$
+/* @@tag:xara-cn@@ DO NOT MODIFY THIS LINE
+================================XARAHEADERSTART===========================
+ 
+               Xara LX, a vector drawing and manipulation program.
+                    Copyright (C) 1993-2006 Xara Group Ltd.
+       Copyright on certain contributions may be held in joint with their
+              respective authors. See AUTHORS file for details.
+
+LICENSE TO USE AND MODIFY SOFTWARE
+----------------------------------
+
+This file is part of Xara LX.
+
+Xara LX is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License version 2 as published
+by the Free Software Foundation.
+
+Xara LX and its component source files are distributed in the hope
+that it will be useful, but WITHOUT ANY WARRANTY; without even the
+implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along
+with Xara LX (see the file GPL in the root directory of the
+distribution); if not, write to the Free Software Foundation, Inc., 51
+Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+
+
+ADDITIONAL RIGHTS
+-----------------
+
+Conditional upon your continuing compliance with the GNU General Public
+License described above, Xara Group Ltd grants to you certain additional
+rights. 
+
+The additional rights are to use, modify, and distribute the software
+together with the wxWidgets library, the wxXtra library, and the "CDraw"
+library and any other such library that any version of Xara LX relased
+by Xara Group Ltd requires in order to compile and execute, including
+the static linking of that library to XaraLX. In the case of the
+"CDraw" library, you may satisfy obligation under the GNU General Public
+License to provide source code by providing a binary copy of the library
+concerned and a copy of the license accompanying it.
+
+Nothing in this section restricts any of the rights you have under
+the GNU General Public License.
+
+
+SCOPE OF LICENSE
+----------------
+
+This license applies to this program (XaraLX) and its constituent source
+files only, and does not necessarily apply to other Xara products which may
+in part share the same code base, and are subject to their own licensing
+terms.
+
+This license does not apply to files in the wxXtra directory, which
+are built into a separate library, and are subject to the wxWindows
+license contained within that directory in the file "WXXTRA-LICENSE".
+
+This license does not apply to the binary libraries (if any) within
+the "libs" directory, which are subject to a separate license contained
+within that directory in the file "LIBS-LICENSE".
+
+
+ARRANGEMENTS FOR CONTRIBUTION OF MODIFICATIONS
+----------------------------------------------
+
+Subject to the terms of the GNU Public License (see above), you are
+free to do whatever you like with your modifications. However, you may
+(at your option) wish contribute them to Xara's source tree. You can
+find details of how to do this at:
+  http://www.xaraxtreme.org/developers/
+
+Prior to contributing your modifications, you will need to complete our
+contributor agreement. This can be found at:
+  http://www.xaraxtreme.org/developers/contribute/
+
+Please note that Xara will not accept modifications which modify any of
+the text between the start and end of this header (marked
+XARAHEADERSTART and XARAHEADEREND).
+
+
+MARKS
+-----
+
+Xara, Xara LX, Xara X, Xara X/Xtreme, Xara Xtreme, the Xtreme and Xara
+designs are registered or unregistered trademarks, design-marks, and/or
+service marks of Xara Group Ltd. All rights in these marks are reserved.
+
+
+      Xara Group Ltd, Gaddesden Place, Hemel Hempstead, HP2 6EX, UK.
+                        http://www.xara.com/
+
+=================================XARAHEADEREND============================
+ */
+#include "camtypes.h"
+//#include "paths.h" - in camtypes.h [AUTOMATICALLY REMOVED]
+#include "nodetext.h"
+#include "swfexpdc.h"
+#include "swftext.h"
+
+#define new CAM_DEBUG_NEW
+
+/********************************************************************************************
+
+>	FlashTextRecord::FlashTextRecord ( void )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	14/10/99
+	Inputs:		-
+	Returns:	-
+	Purpose:	Creates a FlashTextRecord list node, and initialises any values.
+
+********************************************************************************************/
+
+FlashTextRecord::FlashTextRecord ( void )
+{
+	// Initialise the member variables, so as to avoid any unpleasentness later.
+	mTextID		= 0;
+	mCurrent	= 0;
+	mScaleX		= FLASH_FIXED_ONE;
+	mScaleY		= FLASH_FIXED_ONE;
+	mSkewY		= 0;
+	mSkewX		= 0;
+	mAscent		= 0;
+	mpLast		= NULL;				// Pointer to the previous node.
+	mpNext		= NULL;				// Pointer to the next node.
+}
+
+/********************************************************************************************
+
+>	FlashTextRecord::~FlashTextRecord ( void )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	14/10/99
+	Inputs:		-
+	Returns:	-
+	Purpose:	Destroys this instance of FlashTextRecord.
+
+********************************************************************************************/
+
+FlashTextRecord::~FlashTextRecord ( void )
+{
+	// Clean up any stray values.
+}
+
+/********************************************************************************************
+
+>	FlashTextRecord* FlashTextRecord::AddElement ( void )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	14/10/99
+	Inputs:		-
+	Returns:	pTail - The pointer to the new node.
+	Purpose:	Adds an element to the tail of the list.
+
+********************************************************************************************/
+
+FlashTextRecord* FlashTextRecord::AddElement ( void )
+{
+	FlashTextRecord *pTail = new FlashTextRecord;
+	
+	// Set the appropriate pointers.
+	pTail->SetLast ( this );		// Ensure that a reference exists to this object...
+	pTail->SetNext ( mpNext );		// Avoids any problems if mpLast isn't NULL.
+	mpNext = pTail;					// ... and a reference exists to the new one.
+
+	return pTail;
+}
+
+/********************************************************************************************
+
+>	void FlashTextRecord::DeleteLastElement ( void )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	14/10/99
+	Inputs:		-
+	Returns:	-
+	Purpose:	Deletes the previous item in the list.
+
+********************************************************************************************/
+
+void FlashTextRecord::DeleteLastElement ( void )
+{
+	FlashTextRecord *pToDelete = mpLast;
+	
+	// Reset mpLast to be mpLast->GetLast (), so that the list isn't broken.
+	mpLast = mpLast->GetLast ();
+
+	delete pToDelete;
+}
+
+/********************************************************************************************
+
+>	void FlashTextRecord::DeleteNextElement ( void )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	14/10/99
+	Inputs:		-
+	Returns:	-
+	Purpose:	Deletes the next item in the list.
+
+********************************************************************************************/
+
+void FlashTextRecord::DeleteNextElement ( void )
+{
+	FlashTextRecord *pToDelete = mpNext;
+	
+	// Reset mpNext to be mpNext->GetNext (), so that the list isn't broken.
+	mpNext = mpNext->GetNext ();
+
+	delete pToDelete;
+}
+
+
+/********************************************************************************************
+
+>	TCHAR* FlashTextRecord::GetString ( void )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	14/10/99
+	Inputs:		-
+	Returns:	TCHAR* - A pointer to the contents of mText.
+	Purpose:	Gets a pointer to mText.
+
+********************************************************************************************/
+
+INT32* FlashTextRecord::GetString ( void )
+{
+	return mText;
+}
+
+/********************************************************************************************
+
+>	BOOL FlashTextRecord::IsFull ( void )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	14/10/99
+	Inputs:		-
+	Returns:	TRUE if the string is full, otherwise FALSE.
+	Purpose:	Used to determine whether the string is full.
+
+********************************************************************************************/
+
+BOOL FlashTextRecord::IsFull ( void )
+{
+	// Compare the string's length with the maximum length of the string. Doing it this way
+	// allows the string length to be changed internally without having to alter the class's
+	// interface.
+	if ( mCurrent >= FTR_STRING_SIZE )
+		return TRUE;
+	else
+		return FALSE;
+}
+
+/********************************************************************************************
+
+>	DocCoord FlashTextRecord::GetPosition ( void )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	14/10/99
+	Inputs:		-
+	Returns:	mPosition - The position of this string in the Flash image.
+	Purpose:	Gets the value of mPosition.
+
+********************************************************************************************/
+
+DocCoord FlashTextRecord::GetPosition ( void )
+{
+	return mPosition;
+}
+
+/********************************************************************************************
+
+>	DocRect FlashTextRecord::GetBounds ( void )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	17/10/99
+	Inputs:		-
+	Returns:	mTextBounds - The bounding box of the text.
+	Purpose:	Gets the value of mTextBounds.
+
+********************************************************************************************/
+
+DocRect FlashTextRecord::GetBounds ( void )
+{
+	return mTextBounds;
+}
+
+/********************************************************************************************
+
+>	INT32* FlashTextRecord::GetAdvances ( void )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	17/10/99
+	Inputs:		-
+	Returns:	DWORD* - A pointer to mAdvances [0].
+	Purpose:	Gets a pointer to mAdvances
+
+********************************************************************************************/
+
+INT32* FlashTextRecord::GetAdvances ( void )
+{
+	return mAdvances;
+}
+
+/********************************************************************************************
+
+>	WORD* FlashTextRecord::GetSizes ( void )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	17/10/99
+	Inputs:		-
+	Returns:	WORD* - A pointer to mCharacterSize.
+	Purpose:	Gets a pointer to mCharacterSize [].
+
+
+********************************************************************************************/
+
+WORD* FlashTextRecord::GetSizes ( void )
+{
+	return mCharacterSize;
+}
+
+/********************************************************************************************
+
+>	FlashColour* FlashTextRecord::GetColours ( void )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	17/10/99
+	Inputs:		-
+	Returns:	DocColour* - A pointer to mCharacterColour.
+	Purpose:	Gets a pointer to mCharacterColour.
+
+********************************************************************************************/
+
+FlashColour* FlashTextRecord::GetColours ( void )
+{
+	return mCharacterColour;
+}
+
+/********************************************************************************************
+
+>	WORD* FlashTextRecord::GetFontStyles ( void )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	17/10/99
+	Inputs:		-
+	Returns:	WORD* - A pointer to mCharacterStyle.
+	Purpose:	Gets a pointer to mCharacterStyle.
+
+********************************************************************************************/
+
+WORD* FlashTextRecord::GetFontStyles ( void )
+{
+	return mCharacterStyle;
+}
+
+/********************************************************************************************
+
+>	INT8* FlashTextRecord::GetOffsets ( void )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	17/10/99
+	Inputs:		-
+	Returns:	INT8* - A pointer to mOffsetss.
+	Purpose:	Gets a pointer to mOffsetss.
+
+********************************************************************************************/
+
+INT8* FlashTextRecord::GetOffsets ( void )
+{
+	return mOffsets;
+}
+
+/********************************************************************************************
+
+>	FIXED16 FlashTextRecord::GetAspect ( void )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	17/10/99
+	Inputs:		-
+	Returns:	FIXED16 - The character's aspect ratio.
+	Purpose:	Gets the value of mAspectRatio
+
+********************************************************************************************/
+
+FIXED16 FlashTextRecord::GetAspect ( void )
+{
+	return mAspectRatio;
+}
+
+/********************************************************************************************
+
+>	INT32 FlashTextRecord::GetAscent ( void )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	24/11/99
+	Inputs:		-
+	Returns:	INT32 - The character's ascent.
+	Purpose:	Gets the value of mAscent.
+
+********************************************************************************************/
+
+INT32 FlashTextRecord::GetAscent ( void )
+{
+	return mAscent;
+}
+
+/********************************************************************************************
+
+>	INT32 FlashTextRecord::GetCount ( void )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	17/10/99
+	Inputs:		-
+	Returns:	INT32 - The length of the text string.
+	Purpose:	Gets the length of the text string stored within the FlashTextRecord.
+
+********************************************************************************************/
+
+INT32 FlashTextRecord::GetCount ( void )
+{
+	return mCurrent;
+}
+
+/********************************************************************************************
+
+>	WORD FlashTextRecord::GetTextID ( void )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	22/10/99
+	Inputs:		-
+	Returns:	WORD - The value of mTextID.
+	Purpose:	Gets the ID for this text record.
+
+********************************************************************************************/
+
+WORD FlashTextRecord::GetTextID ( void )
+{
+	return mTextID;
+}
+
+/********************************************************************************************
+
+>	FlashTextRecord* FlashTextRecord::GetLast ( void )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	14/10/99
+	Inputs:		-
+	Returns:	*mpLast - A pointer to the previous node in the linked list.
+	Purpose:	Gets mpLast.
+
+********************************************************************************************/
+
+FlashTextRecord* FlashTextRecord::GetLast ( void )
+{
+	return mpLast;
+}
+
+/********************************************************************************************
+
+>	FlashTextRecord* FlashTextRecord::GetNext ( void )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	14/10/99
+	Inputs:		-
+	Returns:	*mpNext - A pointer to the next node in the linked list.
+	Purpose:	Gets mpNext.
+
+********************************************************************************************/
+
+FlashTextRecord* FlashTextRecord::GetNext ( void )
+{
+	return mpNext;
+}
+
+/********************************************************************************************
+
+>	INT32 FlashTextRecord::AddChar ( TextChar *pTheLetter,
+								   INT32 FlashCode )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	14/10/99
+	Inputs:		TheLetter - The character to add to mText.
+	Returns:	The position of this character within the array, or -1 if there's been a
+				problem.
+	Purpose:	Adds FlashCode to the end of mText, and updates the bounding rectangle, and
+				calculates the Advance for this letter from the original letter record within
+				the Camelot tree. The FlashCode value is returned by
+				FlashFontRecord::AddGlyph (), and is needed to access the correct character
+				record by a Flash viewer.
+
+********************************************************************************************/
+
+INT32 FlashTextRecord::AddChar ( TextChar *pTheLetter,
+							   INT32 FlashCode )
+{
+	INT32 Index = -1;		// Traditional UNIX error value.
+	
+	if ( pTheLetter != NULL )
+	{
+		// Get the current character, and store it within the array.
+		mText [mCurrent] = FlashCode;
+		Index = mCurrent;
+		mCurrent ++;
+
+		// Set the advance value. (i.e. how far the character is from the start of the string.
+		SetAdvance ( pTheLetter->GetCharAdvance (), Index );
+	}
+
+	return Index;
+}
+
+/********************************************************************************************
+
+>	void FlashTextRecord::SetPosition ( DocCoord Point )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	14/10/99
+	Inputs:		Point - The position of the start of the TextLine.
+	Returns:	-
+	Purpose:	Sets the value of mPosition.
+
+********************************************************************************************/
+
+void FlashTextRecord::SetPosition ( DocCoord Point )
+{
+	mPosition = Point;
+}
+
+/********************************************************************************************
+
+>	void FlashTextRecord::SetBounds ( DocRect Bounds )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	17/10/99
+	Inputs:		Bounds - The bounding box of the text string.
+	Returns:	-
+	Purpose:	Sets the value of mTextBounds.
+
+********************************************************************************************/
+
+void FlashTextRecord::SetBounds ( DocRect Bounds )
+{
+	mTextBounds = Bounds;
+}
+
+/********************************************************************************************
+
+>	void FlashTextRecord::SetAdvance ( INT32 Advance,
+									  INT32 i )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	17/10/99
+	Inputs:		Advance - The advance for this character.
+				i - The position at which the value is to be added.
+	Returns:	-
+	Purpose:	Sets the value of mAdvances at position i. ( mAdvances [i] )
+
+********************************************************************************************/
+
+void FlashTextRecord::SetAdvance ( INT32 Advance,
+								  INT32 i )
+{
+	// Convert from millipoints to twips.
+	Advance /= FLASH_SCALE;
+
+	// Stores the advance for the current font.
+	mAdvances [i] = Advance;
+}
+
+/********************************************************************************************
+
+>	void FlashTextRecord::SetSize ( MILLIPOINT Size,
+									INT32 i )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	17/10/99
+	Inputs:		Size - The height of the current font style.
+				i - The position at which the value is to be added.
+	Returns:	-
+	Purpose:	Sets the value of mCharacterSize at position i. ( mCharacterSize [i] )
+
+********************************************************************************************/
+
+void FlashTextRecord::SetSize ( MILLIPOINT Size,
+								INT32 i )
+{
+	Size /= FLASH_SCALE;
+	mCharacterSize [i] = ( WORD ) Size;
+}
+
+/********************************************************************************************
+
+>	void FlashTextRecord::SetColour ( DocColour *Colour,
+									  BYTE Alpha,
+									  INT32 i )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	12/10/99
+	Inputs:		Colour - A standard Camelot colour.
+				Alpha - The transparency value.
+				i - The index value.
+	Returns:	-
+	Purpose:	Sets the value of ColourValue[i] to have the RGB colour from the DocColour,
+				and the Alpha value from Alpha.
+
+********************************************************************************************/
+
+void FlashTextRecord::SetColour ( DocColour *Colour,
+								  UINT32 *Alpha,
+								  INT32 i )
+{
+	INT32 lRed, lGreen, lBlue;
+
+	// If no colour pointer has been set, return.
+	if ( Colour == NULL )
+		return;
+
+	// Extract the colour value from DocColour.
+	Colour->GetRGBValue ( &lRed, &lGreen, &lBlue );
+
+	// And cast it into the record as an RGB triplet of BYTEs.
+	mCharacterColour [i].Red	= ( BYTE ) lRed;
+	mCharacterColour [i].Green	= ( BYTE ) lGreen;
+	mCharacterColour [i].Blue	= ( BYTE ) lBlue;
+	mCharacterColour [i].Alpha	= 255 - ( BYTE ) ( *Alpha );
+}
+
+/********************************************************************************************
+
+>	void FlashTextRecord::SetStyle ( WORD Style,
+									 INT32 i )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	17/10/99
+	Inputs:		Style - A handle to a current font sytle.
+				i - The position at which the value is to be added.
+	Returns:	-
+	Purpose:	Sets the value of mCharacterStyle [i].
+
+********************************************************************************************/
+
+void FlashTextRecord::SetStyle ( WORD Style,
+								 INT32 i )
+{
+	mCharacterStyle [i] = Style;
+}
+
+/********************************************************************************************
+
+>	void FlashTextRecord::SetOffset ( INT32 Offset,
+										INT32 i )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	9/11/99
+	Inputs:		Offset - The value of the current font's offset.
+				i - The position at which the value is to be added.
+	Returns:	-
+	Purpose:	Sets the value of mOffsets [i].
+
+********************************************************************************************/
+
+void FlashTextRecord::SetOffset ( INT32 Offset,
+								  INT32 i )
+{
+	Offset /= FLASH_SCALE;
+	mOffsets [i] = ( INT8 ) Offset;
+}
+
+/********************************************************************************************
+
+>	void FlashTextRecord::SetAspect ( FIXED16 AspectRatio )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	14/10/99
+	Inputs:		FIXED16 - The AspectRatio of the line of text.
+	Returns:	-
+	Purpose:	Sets the value of mAspectRatio.
+
+********************************************************************************************/
+
+void FlashTextRecord::SetAspect ( FIXED16 AspectRatio )
+{
+	mAspectRatio = AspectRatio;
+}
+
+/********************************************************************************************
+
+>	void FlashTextRecord::SetAscent ( INT32 Ascent )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	24/11/99
+	Inputs:		INT32 - The ascent of the first character in the line of text.
+	Returns:	-
+	Purpose:	Sets the value of mAscent.
+
+********************************************************************************************/
+
+void FlashTextRecord::SetAscent ( INT32 Ascent )
+{
+	Ascent /= FLASH_SCALE;
+
+	if ( Ascent > mAscent )
+		mAscent = Ascent;
+}
+
+/********************************************************************************************
+
+>	void FlashTextRecord::SetTextID ( WORD ID )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	22/10/99
+	Inputs:		WORD - The ID value to be set.
+	Returns:	-
+	Purpose:	Sets the value of mTextID.
+
+********************************************************************************************/
+
+void FlashTextRecord::SetTextID ( WORD ID )
+{
+	mTextID = ID;
+}
+
+/********************************************************************************************
+
+>	void FlashTextRecord::SetLast ( FlashTextRecord *pLast )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	14/10/99
+	Inputs:		pLast - A pointer to the previous FlashTextRecord in the linked list.
+	Returns:	-
+	Purpose:	Sets the value of mpLast.
+
+********************************************************************************************/
+
+void FlashTextRecord::SetLast ( FlashTextRecord *pLast )
+{
+	mpLast = pLast;
+}
+
+/********************************************************************************************
+
+>	void FlashTextRecord::SetNext ( FlashTextRecord *pNext )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	14/10/99
+	Inputs:		pNext - A pointer to the next FlashTextRecord in the linked list.
+	Returns:	-
+	Purpose:	Sets the value of mpNext.
+
+********************************************************************************************/
+
+void FlashTextRecord::SetNext ( FlashTextRecord *pNext )
+{
+	mpNext = pNext;
+}
+
+/********************************************************************************************
+
+>	void FlashTextRecord::SetSkewY ( INT32 Skew )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	4/11/99
+	Inputs:		Skew - The value for mSkewY.
+	Returns:	-
+	Purpose:	Sets mSkewY.
+
+********************************************************************************************/
+
+void FlashTextRecord::SetSkewY ( INT32 Skew )
+{
+	mSkewY = Skew;
+}
+
+/********************************************************************************************
+
+>	INT32 FlashTextRecord::GetSkewY ( void )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	4/11/99
+	Inputs:		-
+	Returns:	mSkewY
+	Purpose:	Gets mSkewY.
+
+********************************************************************************************/
+
+INT32 FlashTextRecord::GetSkewY ( void )
+{
+	return mSkewY;
+}
+
+/********************************************************************************************
+
+>	void FlashTextRecord::SetSkewX ( INT32 Skew )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	4/11/99
+	Inputs:		Skew - The value for mSkewX.
+	Returns:	-
+	Purpose:	Sets mSkewX.
+
+********************************************************************************************/
+
+void FlashTextRecord::SetSkewX ( INT32 Skew )
+{
+	mSkewX = Skew;
+}
+
+/********************************************************************************************
+
+>	INT32 FlashTextRecord::GetSkewX ( void )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	4/11/99
+	Inputs:		-
+	Returns:	mSkewX
+	Purpose:	Gets mSkewX.
+
+********************************************************************************************/
+
+INT32 FlashTextRecord::GetSkewX ( void )
+{
+	return mSkewX;
+}
+
+/********************************************************************************************
+
+>	void FlashTextRecord::SetScaleX ( INT32 Scale )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	4/11/99
+	Inputs:		Scale - The value for mScaleX.
+	Returns:	-
+	Purpose:	Sets mScaleX.
+
+********************************************************************************************/
+
+void FlashTextRecord::SetScaleX ( INT32 Scale )
+{
+	mScaleX = Scale;
+}
+
+/********************************************************************************************
+
+>	INT32 FlashTextRecord::GetScaleX ( void )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	4/11/99
+	Inputs:		-
+	Returns:	mScaleX
+	Purpose:	Gets mScaleX.
+
+********************************************************************************************/
+
+INT32 FlashTextRecord::GetScaleX ( void )
+{
+	return mScaleX;
+}
+
+/********************************************************************************************
+
+>	void FlashTextRecord::SetScaleY ( INT32 Scale )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	4/11/99
+	Inputs:		Scale - The value for mScaleY.
+	Returns:	-
+	Purpose:	Sets mScaleY.
+
+********************************************************************************************/
+
+void FlashTextRecord::SetScaleY ( INT32 Scale )
+{
+	mScaleY = Scale;
+}
+
+/********************************************************************************************
+
+>	INT32 FlashTextRecord::GetScaleY ( void )
+
+	Author:		Graeme_Sutherland (Xara Group Ltd) <camelotdev@xxxxxxxx>
+	Created:	4/11/99
+	Inputs:		-
+	Returns:	mScaleY
+	Purpose:	Gets mScaleY.
+
+********************************************************************************************/
+
+INT32 FlashTextRecord::GetScaleY ( void )
+{
+	return mScaleY;
+}
+

Property changes on: Trunk/XaraLX/Kernel/swftext.cpp
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Index: Trunk/XaraLX/Kernel/Makefile.am
===================================================================
--- Trunk/XaraLX/Kernel/Makefile.am	(revision 1312)
+++ Trunk/XaraLX/Kernel/Makefile.am	(revision 1313)
@@ -72,7 +72,10 @@
 	sgstroke.cpp sgbrush.cpp lattrops.cpp la_base.cpp maskedrr.cpp  \
 	cameleps.cpp epscdef.cpp epsclist.cpp epssitem.cpp epsstack.cpp \
 	nativeps.cpp epsfiltr.cpp aw_eps.cpp saveeps.cpp vectrndr.cpp kerneldc.cpp \
-	release.cpp ai_eps.cpp ai8_eps.cpp ai5_eps.cpp ai_epsrr.cpp freeeps.cpp
+	release.cpp ai_eps.cpp ai8_eps.cpp ai5_eps.cpp ai_epsrr.cpp ai_layer.cpp \
+	ai_bmp.cpp ai_grad.cpp freeeps.cpp swffiltr.cpp swfrndr.cpp swfbitmp.cpp \
+	swfbuttn.cpp swffont.cpp swfplace.cpp swfrndr.cpp swfshape.cpp swfsprit.cpp \
+	swfexpdc.cpp swftext.cpp
 
 
 AM_CXXFLAGS = $(XARAFLAGS)
Index: Trunk/XaraLX/Kernel/ai_bmp.cpp
===================================================================
--- Trunk/XaraLX/Kernel/ai_bmp.cpp	(revision 1312)
+++ Trunk/XaraLX/Kernel/ai_bmp.cpp	(revision 1313)
@@ -121,8 +121,8 @@
 //////////////////////////////////////////////////////////////////////
 
 AIBitmapProcessor::AIBitmapProcessor() :
-	mLastIndex(0),
-	mpNewBitmap(0)
+	mpNewBitmap(0),
+	mLastIndex(0)
 {
 
 }
@@ -607,7 +607,8 @@
 	double dRed, dGreen, dBlue;
 	double dKey;
 
-	for ( UINT32 i = nStart; i < nTokenLen; i += 2 )
+	UINT32 i;
+	for ( i = nStart; i < nTokenLen; i += 2 )
 	{
 		/////////////////
 		//	read in the CMYK value one component at at time
@@ -711,7 +712,8 @@
 	// Decode the string two characters at a time 
 	/////////////////
 
-	for ( UINT32 i = nStart; i < nTokenLen; i += 2 )
+	UINT32 i;
+	for ( i = nStart; i < nTokenLen; i += 2 )
 	{
 		RGBVal[nShift] = 0;
 
Index: Trunk/XaraLX/Kernel/ccfile.cpp
===================================================================
--- Trunk/XaraLX/Kernel/ccfile.cpp	(revision 1312)
+++ Trunk/XaraLX/Kernel/ccfile.cpp	(revision 1313)
@@ -5731,7 +5731,7 @@
 		return *this;
 	}
     
-	TCHAR* tempMemFile 	= (TCHAR*) MemFile;			// Cast MemFile to a TCHAR pointer
+	char* tempMemFile 	= (char*) MemFile;			// Cast MemFile to a TCHAR pointer
 
 	if (!eof())
 	{
@@ -6024,7 +6024,7 @@
 BOOL CCMemTextFile::eof() const
 {
 	// Cast pointer to memory file to TCHAR
-    TCHAR* tempMemFile = (TCHAR*) MemFile;
+    char* tempMemFile = (char*) MemFile;
 
 	if ((CurrentPos == (FileSize - 1)) || (tempMemFile[CurrentPos] == END_OF_FILE))
 		return TRUE;
Index: Trunk/XaraLX/Kernel/ai_grad.cpp
===================================================================
--- Trunk/XaraLX/Kernel/ai_grad.cpp	(revision 1312)
+++ Trunk/XaraLX/Kernel/ai_grad.cpp	(revision 1313)
@@ -146,8 +146,8 @@
 //////////////////////////////////////////////////////////////////////
 
 AIGradientProcessor::AIGradientProcessor() :
-	mpCurrentFill(0),
-	mbGradFillTooComplex(FALSE)
+	mbGradFillTooComplex(FALSE),
+	mpCurrentFill(0)
 {
 	// The last ramp point is set to 101, since this is effectively a
 	// counter from 100 down to 0.
Index: Trunk/XaraLX/Kernel/swfrndr.cpp
===================================================================
--- Trunk/XaraLX/Kernel/swfrndr.cpp	(revision 1312)
+++ Trunk/XaraLX/Kernel/swfrndr.cpp	(revision 1313)
@@ -100,7 +100,6 @@
 //#include "attrmgr.h" - in camtypes.h [AUTOMATICALLY REMOVED]
 #include "nodetext.h"
 #include "nodetxtl.h"
-#include "fixedasm.h"		// For Div32by32 ().
 //#include "ccmaths.h" - in camtypes.h [AUTOMATICALLY REMOVED]
 //#include "pathshap.h" - in camtypes.h [AUTOMATICALLY REMOVED]
 #include "webaddr.h"
@@ -252,8 +251,8 @@
 
 	// Set up the position for the place object record...
 	Bounds = mpShapeTail->GetBoundingBox ();
-	LowCorner.x = Bounds.lox;
-	LowCorner.y = Bounds.hiy;
+	LowCorner.x = Bounds.lo.x;
+	LowCorner.y = Bounds.hi.y;
 
 	// ... and create it.
 	PlaceObject ( FlashPlaceObject::GetShapeCount (), FLASH_SHAPE, &LowCorner, TRUE );
@@ -285,7 +284,7 @@
 	StrokeColourAttribute	*pStrokeColour	= NULL;
 	TranspFillAttribute		*pTransp		= NULL;
 	DocColour				*pColour		= NULL;
-	FlashExportDC			*FlashDC		= ( FlashExportDC * ) RenderDC;
+//	FlashExportDC			*FlashDC		= ( FlashExportDC * ) RenderDC;
 
 	// Step 2:	If this is the first path to be processed, mpShape will be NULL. Therefore
 	//			create a new element. Otherwise add one to the end of the existing list.
@@ -486,8 +485,7 @@
 					  ( ATTR_TXTITALIC ) )->ItalicOn;
 
 	// And finally, it's offset and relative size values.
-	TxtScriptAttribute *pScript = ( TxtScriptAttribute* ) GetCurrentAttribute
-								  ( ATTR_TXTSCRIPT );
+//	TxtScriptAttribute *pScript = ( TxtScriptAttribute* ) GetCurrentAttribute  ( ATTR_TXTSCRIPT );
 
 
 	// Flash doesn't seem to support fonts with obscure aspect ratios, so maybe set
@@ -591,8 +589,8 @@
 	// Fill in the font's characteristics:
 	
 	// Font size.
-	INT32		Offset	= ( pScript->Offset ).GetRawLong ();
-	INT32		Ratio	= ( pScript->Size ).GetRawLong ();
+//	INT32		Offset	= ( pScript->Offset ).GetRawLong ();
+//	INT32		Ratio	= ( pScript->Size ).GetRawLong ();
 
 	MILLIPOINT	Size	= ( ( TxtFontSizeAttribute* ) GetCurrentAttribute
 						  ( ATTR_TXTFONTSIZE ) )->FontSize;
@@ -604,14 +602,14 @@
 	mpTextTail->SetAscent ( pTheLetter->GetFontAscent () );
 
 	// Calculate the baseline of the font.
-	double		dDiv	= ( double ) Ratio * ( double ) FLASH_FIXED_ONE;
-	double		dBase	= ( double ) ( Size - pTheLetter->GetFontDescent () ) / dDiv;
+//	double		dDiv	= ( double ) Ratio * ( double ) FLASH_FIXED_ONE;
+//	double		dBase	= ( double ) ( Size - pTheLetter->GetFontDescent () ) / dDiv;
 
 	// And the offset.
-	double		dOffset	= Size * ( ( double ) Offset / ( double ) FLASH_FIXED_ONE );
+//	double		dOffset	= Size * ( ( double ) Offset / ( double ) FLASH_FIXED_ONE );
 
 	// Use these to calculate the y offset value for the text.
-	double		dYOff	= dBase - dOffset - ( double ) pTheLetter->GetBaseLineShift ();
+//	double		dYOff	= dBase - dOffset - ( double ) pTheLetter->GetBaseLineShift ();
 
 	// mpTextTail->SetBaseline ( ( INT32 ) dYOff, Index );
 	mpTextTail->SetOffset ( 0 , Index );
@@ -705,8 +703,8 @@
 
 		// Record the details of the fill.
 		mpShapeTail->SetStartPoint	( Bounds.lo );
-		mpShapeTail->SetEndPoint	( DocCoord ( Bounds.hix, Bounds.loy ) );
-		mpShapeTail->SetEndPoint2	( DocCoord ( Bounds.lox, Bounds.hiy ) );
+		mpShapeTail->SetEndPoint	( DocCoord ( Bounds.hi.x, Bounds.lo.y ) );
+		mpShapeTail->SetEndPoint2	( DocCoord ( Bounds.lo.x, Bounds.hi.y ) );
 		mpShapeTail->SetFill		( FLASH_CLIPPED_BITMAP );
 
 		// Record the size and ID number of the bitmap used.
@@ -768,10 +766,10 @@
 	DocColour		ShadColour	= *( ( ( FillGeometryAttribute* ) GetCurrentAttribute
 								 ( ATTR_FILLGEOMETRY ) )->GetStartColour () );
 	DocRect			PathBounds	= pShadowPath->GetBoundingRect ();
-	DocCoord		EndPoint1	( PathBounds.hix, PathBounds.loy );
-	DocCoord		EndPoint2	( PathBounds.lox, PathBounds.hiy );
+	DocCoord		EndPoint1	( PathBounds.hi.x, PathBounds.lo.y );
+	DocCoord		EndPoint2	( PathBounds.lo.x, PathBounds.hi.y );
 	WORD			BitmapID	= FlashPlaceObject::GetBitmapCount ();
-	FlashExportDC	*pFlashDC	= static_cast <FlashExportDC*> ( GetRenderDC() );
+	FlashExportDC	*pFlashDC	= static_cast <FlashExportDC*> ( CCDC::ConvertFromNativeDC(GetRenderDC()) );
 
 	TRACEUSER( "Graeme", _T("Entering ExportShadow!
") );
 
@@ -1891,8 +1889,8 @@
 	OILBitmap			*pBitmap		= ( pBMFill->GetBitmap () )->GetActualBitmap ();
 	DocColour			*pStartColour	= pFill->GetStartColour ();
 	FlashExportDC		*pFlashDC		= ( FlashExportDC * ) RenderDC;
-	BOOL				IsContone		= TRUE;
-	FlashBitmapRecord	*pRecord		= mpBitmap;
+//	BOOL				IsContone		= TRUE;
+//	FlashBitmapRecord	*pRecord		= mpBitmap;
 
 	// If we've got a bitmap fill applied too, we want to export that. So just set the
 	// object up with a flat fill.
Index: Trunk/XaraLX/Kernel/swffiltr.cpp
===================================================================
--- Trunk/XaraLX/Kernel/swffiltr.cpp	(revision 1312)
+++ Trunk/XaraLX/Kernel/swffiltr.cpp	(revision 1313)
@@ -125,6 +125,7 @@
 #include "swfplace.h"	// For FlashPlaceObject.
 
 #include "swffiltr.h"	// Definition of this class.
+#include "layer.h"
 
 CC_IMPLEMENT_DYNAMIC ( FlashFilter, VectorFilter )
 
@@ -281,7 +282,7 @@
 	mpBackgroundCol = &BackgroundCol;
 
 	// Set up the origin of the bounding rectangle according to the Flash file specification.
-	DocCoord			Origin		( mPageRect.lox, mPageRect.hiy );		// Flash's lox, loy.
+	DocCoord			Origin		( mPageRect.lo.x, mPageRect.hi.y );		// Flash's lox, loy.
 
 	// Initialise the render region.
 	SWFRegion.Init ();
@@ -304,8 +305,7 @@
 		}
 		else
 		{
-			TRACEUSER ( "Graeme",
-						"Tried to open non-CCDiskFile in FlashFilter::DoExport
" );
+			TRACEUSER ( "Graeme", _T("Tried to open non-CCDiskFile in FlashFilter::DoExport
") );
 			return FALSE;
 		}
 	}
@@ -425,7 +425,7 @@
 #ifdef DO_EXPORT
 
 	// Export the file, but catch any file errors.
-	TRY
+	try
 	{
 		// This function parses through the Camelot tree in common with the other export
 		// loops. Unlike the other loops, it builds up four linked lists as dictionaries
@@ -442,8 +442,8 @@
 
 		// Find the first node that we should export from this spread
 		Spread *pSpread = pRegion->GetRenderSpread ();
-		Node *pLayer = ( Node * ) pSpread->FindFirstLayer ();
 /*
+		Node *pLayer = ( Node * ) pSpread->FindFirstLayer ();
 		Node *pNode = pSpread->FindFirstForExport( pRegion, TRUE, VisibleLayersOnly, CheckSelected );
 
 		if ( mpBackground != NULL && pNode == mpBackground )
@@ -540,7 +540,7 @@
 	}
 
 	// Handle any file errors, or other exceptions.
-	CATCH ( CFileException, e )
+	catch ( CFileException )
 	{
 		// Didn't work - report failure to caller.
 		if ( pDC )
@@ -550,7 +550,6 @@
 			EndSlowJob ();
 		return FALSE;
 	}
-	END_CATCH
 
 	// All ok
 	return TRUE;
Index: Trunk/XaraLX/Kernel/SWFText.cpp (deleted)
===================================================================


Xara