[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
[XaraXtreme-commits] Commit Complete
Commit by : alex
Repository : xara
Revision : 1312
Date : Tue Jun 13 16:46:48 BST 2006
Changed paths:
M /Trunk/XaraLX/Kernel/Makefile.am
M /Trunk/XaraLX/Kernel/ai5_eps.cpp
M /Trunk/XaraLX/Kernel/ai5_eps.h
M /Trunk/XaraLX/Kernel/ai8_eps.cpp
M /Trunk/XaraLX/Kernel/ai_eps.cpp
M /Trunk/XaraLX/Kernel/ai_eps.h
M /Trunk/XaraLX/Kernel/ai_epsrr.cpp
M /Trunk/XaraLX/Kernel/coreleps.cpp
M /Trunk/XaraLX/Kernel/freeeps.cpp
A /Trunk/XaraLX/wxOil/riffdata.h
A /Trunk/XaraLX/wxOil/xrc/prolog.ps
A /Trunk/XaraLX/wxOil/xrc/setup.ps
A /Trunk/XaraLX/wxOil/xrc/spotfunc.ps
More EPS work
Diff:
Index: Trunk/XaraLX/Kernel/freeeps.cpp
===================================================================
--- Trunk/XaraLX/Kernel/freeeps.cpp (revision 1311)
+++ Trunk/XaraLX/Kernel/freeeps.cpp (revision 1312)
@@ -161,41 +161,41 @@
CommandMap FreeHandEPSFilter::FHCommands[] =
{
// colours
- { EPSC_Xa, "Xa" },
- { EPSC_xa, "xa" },
- { EPSC_Ka, "Ka" },
- { EPSC_ka, "ka" },
+ { EPSC_Xa, _T("Xa") },
+ { EPSC_xa, _T("xa") },
+ { EPSC_Ka, _T("Ka") },
+ { EPSC_ka, _T("ka") },
// fills
- { EPSC_radfill, "radfill" },
- { EPSC_recfill, "recfill" },
- { EPSC_load, "load" },
+ { EPSC_radfill, _T("radfill") },
+ { EPSC_recfill, _T("recfill") },
+ { EPSC_load, _T("load") },
// colour list stuff
- { EPSC_BeginSetup, "%%BeginSetup"},
- { EPSC_def, "def" },
- { EPSC_newcmykcustomcolor, "newcmykcustomcolor" },
+ { EPSC_BeginSetup, _T("%%BeginSetup")},
+ { EPSC_def, _T("def") },
+ { EPSC_newcmykcustomcolor, _T("newcmykcustomcolor") },
// text stuff
- { EPSC_makesetfont, "makesetfont" },
- { EPSC_ts, "ts" },
- { EPSC_sts, "sts" },
+ { EPSC_makesetfont, _T("makesetfont") },
+ { EPSC_ts, _T("ts") },
+ { EPSC_sts, _T("sts") },
// complex path stuff
- { EPSC_eomode, "eomode" },
- { EPSC_true, "true" },
- { EPSC_false, "false" },
+ { EPSC_eomode, _T("eomode") },
+ { EPSC_true, _T("true") },
+ { EPSC_false, _T("false") },
// misc stuff
- { EPSC_concat, "concat" },
- { EPSC_vms, "vms" },
- { EPSC_vmr, "vmr" },
- { EPSC_vmrs, "vmrs" },
- { EPSC_stob, "stob" },
- { EPSC_fhsetspreadallow, "fhsetspreadallow" },
+ { EPSC_concat, _T("concat") },
+ { EPSC_vms, _T("vms") },
+ { EPSC_vmr, _T("vmr") },
+ { EPSC_vmrs, _T("vmrs") },
+ { EPSC_stob, _T("stob") },
+ { EPSC_fhsetspreadallow, _T("fhsetspreadallow") },
// Sentinel
- { EPSC_Invalid, "Invalid" }
+ { EPSC_Invalid, _T("Invalid") }
};
/********************************************************************************************
@@ -360,14 +360,14 @@
INT32 FreeHandEPSFilter::EPSHeaderIsOk(ADDR pFileHeader, UINT32 HeaderSize)
{
// Check the first line in EPS file
- if (camStrncmp((char *) pFileHeader, "%!PS-Adobe", 10) != 0)
+ if (strncmp((char *) pFileHeader, "%!PS-Adobe", 10) != 0)
{
// Incorrect version of EPS header line - we don't want this
return 0;
}
// !PS-Adobe line is ok - check creator line...
- char *Buffer;
+ TCHAR *Buffer;
CCMemTextFile HeaderFile((char *)pFileHeader, HeaderSize);
if(HeaderFile.IsMemFileInited() == FALSE || HeaderFile.InitLexer() == FALSE)
{
@@ -382,20 +382,20 @@
while ((Lines < 20) && !HeaderFile.eof())
{
HeaderFile.GetLineToken();
- Buffer = (char *)HeaderFile.GetTokenBuf();
+ Buffer = (TCHAR *)HeaderFile.GetTokenBuf();
ERROR2IF(Buffer == 0, 0, "Returned buffer from lex file == 0");
Lines++;
// Return TRUE if this file was created by Illustrator, or has been exported in
// Illustrator format.
- if (camStrncmp(Buffer, "%%Creator: ", 11) == 0 && strstr(Buffer, "FreeHand") != 0)
+ if (camStrncmp(Buffer, _T("%%Creator: "), 11) == 0 && camStrstr(Buffer, _T("FreeHand")) != 0)
{
// found a plausible creator string - but it could be any version
// (3.0 for the Mac gives it's version number here, but the PC one doesn't)
HaveCreatorString = TRUE;
}
- if (camStrncmp(Buffer, "%%DocumentProcSets: FreeHand_header 3 ", 38) == 0 && HaveCreatorString)
+ if (camStrncmp(Buffer, _T("%%DocumentProcSets: FreeHand_header 3 "), 38) == 0 && HaveCreatorString)
{
// I'll have that then.
HeaderFile.close();
@@ -404,7 +404,7 @@
// If we find the compression token then stop the search as we don't want to start
// looking in the compressed data!
- if (camStrncmp(Buffer, "%%Compression:", 14)==0)
+ if (camStrncmp(Buffer, _T("%%Compression:"), 14)==0)
break;
}
@@ -877,7 +877,7 @@
if(EPSFile->GetTokenType() == TOKEN_NORMAL)
{
- if(camStrcmp(TokenBuf, "spots") == 0)
+ if(camStrcmp(TokenBuf, _T("spots")) == 0)
{
// check to see if the array is about to start
if(!EPSFile->GetToken())
@@ -891,7 +891,7 @@
}
}
- if(camStrncmp(TokenBuf, "%%EndSetup", 10) == 0)
+ if(camStrncmp(TokenBuf, _T("%%EndSetup"), 10) == 0)
{
TRACEUSER( "Ben", _T("Met end of setup without finding spots
"));
break;
@@ -923,7 +923,7 @@
if(EPSFile->GetTokenType() == TOKEN_COMMENT)
{
- if(camStrncmp(TokenBuf, "%%EndSetup", 10) == 0)
+ if(camStrncmp(TokenBuf, _T("%%EndSetup"), 10) == 0)
{
TRACEUSER( "Ben", _T("Found end of setup
"));
Found = TRUE;
@@ -1077,7 +1077,7 @@
String_64 Str;
if(!Stack.Pop(&Str))
return FALSE;
- if(camStrcmp(Str, "{") == 0)
+ if(camStrcmp(Str, _T("{")) == 0)
Done = TRUE; // found end of this bit
}
else
Index: Trunk/XaraLX/Kernel/ai8_eps.cpp
===================================================================
--- Trunk/XaraLX/Kernel/ai8_eps.cpp (revision 1311)
+++ Trunk/XaraLX/Kernel/ai8_eps.cpp (revision 1312)
@@ -220,7 +220,7 @@
INT32 AI8EPSFilter::EPSHeaderIsOk(ADDR pFileHeader, UINT32 HeaderSize)
{
UINT32 Lines = 0;
- char *Buffer = NULL;
+ TCHAR *Buffer = NULL;
// !PS-Adobe line is ok - check creator line...
CCMemTextFile HeaderFile ( reinterpret_cast<char *> ( pFileHeader ), HeaderSize );
@@ -238,7 +238,7 @@
{
// Get the current line from the file.
HeaderFile.GetLineToken();
- Buffer = const_cast<char *> ( HeaderFile.GetTokenBuf () );
+ Buffer = const_cast<TCHAR *> ( HeaderFile.GetTokenBuf () );
// Ensure that it's OK.
ERROR2IF(Buffer == 0, 0, "Returned buffer from lex file == 0");
@@ -246,19 +246,19 @@
// Increment the line counter.
Lines++;
- if (camStrncmp(Buffer, "%!PS-Adobe", 10) == 0)
+ if (camStrncmp(Buffer, _T("%!PS-Adobe"), 10) == 0)
{
// Now find the %%Creator string.
while ((Lines < 100) && !HeaderFile.eof())
{
HeaderFile.GetLineToken();
- Buffer = const_cast<char *> ( HeaderFile.GetTokenBuf() );
+ Buffer = const_cast<TCHAR *> ( HeaderFile.GetTokenBuf() );
ERROR2IF(Buffer == 0, 0, "Returned buffer from lex file == 0");
Lines++;
// Return TRUE if this file was created by Illustrator, or has been exported in
// Illustrator format.
- if (camStrncmp(Buffer, "%%Creator: Adobe Illustrator(R) 8", 33) == 0)
+ if (camStrncmp(Buffer, _T("%%Creator: Adobe Illustrator(R) 8"), 33) == 0)
{
// We definitely want this.
HeaderFile.close();
@@ -267,7 +267,7 @@
// Check to see if it's from Illustrator 9. If you're writing a dedicated AI9
// filter, then you really should remove this code.
- else if (camStrncmp(Buffer, "%%Creator: Adobe Illustrator(R) 9", 33) == 0)
+ else if (camStrncmp(Buffer, _T("%%Creator: Adobe Illustrator(R) 9"), 33) == 0)
{
// We probably want this. Note: I'm returning 9 because a native AI9
// filter would return 10, and if this code is left in, it will be
@@ -276,10 +276,10 @@
return 9;
}
- if (camStrncmp(Buffer, "%%Creator:", 10) == 0)
+ if (camStrncmp(Buffer, _T("%%Creator:"), 10) == 0)
{
// Found the creator line - does it contain the word Illustrator?
- if (camStrstr(Buffer, "Illustrator(R) 8") != NULL)
+ if (camStrstr(Buffer, _T("Illustrator(R) 8")) != NULL)
{
HeaderFile.close();
return 10;
@@ -287,7 +287,7 @@
// Try to see if it's Illustrator 9. Again, remove this code when you're
// writing a dedicated AI9 filter.
- else if (camStrstr(Buffer, "Illustrator(R) 9") != NULL)
+ else if (camStrstr(Buffer, _T("Illustrator(R) 9")) != NULL)
{
HeaderFile.close();
return 9;
@@ -302,7 +302,7 @@
// If we find the compression token then stop the search as we don't want to
// start looking in the compressed data!
- if (camStrncmp(Buffer, "%%Compression:", 14)==0)
+ if (camStrncmp(Buffer, _T("%%Compression:"), 14)==0)
break;
}
@@ -316,7 +316,7 @@
// If we find the compression token then stop the search as we don't want to start
// looking in the compressed data!
- if (camStrncmp(Buffer, "%%Compression:", 14)==0)
+ if (camStrncmp(Buffer, _T("%%Compression:"), 14)==0)
break;
}
Index: Trunk/XaraLX/Kernel/Makefile.am
===================================================================
--- Trunk/XaraLX/Kernel/Makefile.am (revision 1311)
+++ Trunk/XaraLX/Kernel/Makefile.am (revision 1312)
@@ -72,6 +72,7 @@
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
+ release.cpp ai_eps.cpp ai8_eps.cpp ai5_eps.cpp ai_epsrr.cpp freeeps.cpp
+
AM_CXXFLAGS = $(XARAFLAGS)
Index: Trunk/XaraLX/Kernel/ai_eps.cpp
===================================================================
--- Trunk/XaraLX/Kernel/ai_eps.cpp (revision 1311)
+++ Trunk/XaraLX/Kernel/ai_eps.cpp (revision 1312)
@@ -102,7 +102,7 @@
#include "ai_eps.h"
#include "ai_epsrr.h"
-#include <strstrea.h>
+#include <sstream>
#include <stdio.h>
#include "nodepath.h"
@@ -115,6 +115,7 @@
#include "page.h"
//#include "fillattr.h" - in camtypes.h [AUTOMATICALLY REMOVED]
//#include "docview.h" - in camtypes.h [AUTOMATICALLY REMOVED]
+#include "layer.h"
#include "opbevel.h"
#include "progress.h"
#include "ai_grad.h"
@@ -136,13 +137,13 @@
CommandMap AIEPSFilter::AICommands[] =
{
// Text handling
- EPSC_z, "z",
- EPSC_e, "e",
- EPSC_T, "T",
- EPSC_t, "t",
+ { EPSC_z, _T("z")},
+ { EPSC_e, _T("e")},
+ { EPSC_T, _T("T")},
+ { EPSC_t, _T("t")},
// Sentinel
- EPSC_Invalid, "Invalid"
+ { EPSC_Invalid, _T("Invalid") }
};
/********************************************************************************************
@@ -229,7 +230,7 @@
INT32 AIEPSFilter::EPSHeaderIsOk(ADDR pFileHeader, UINT32 HeaderSize)
{
UINT32 Lines = 0;
- char *Buffer = NULL;
+ TCHAR *Buffer = NULL;
// !PS-Adobe line is ok - check creator line...
CCMemTextFile HeaderFile ( reinterpret_cast<char *> ( pFileHeader ), HeaderSize );
@@ -247,7 +248,7 @@
{
// Get the current line from the file.
HeaderFile.GetLineToken();
- Buffer = const_cast<char *> ( HeaderFile.GetTokenBuf () );
+ Buffer = const_cast<TCHAR *> ( HeaderFile.GetTokenBuf () );
// Ensure that it's OK.
ERROR2IF(Buffer == 0, 0, "Returned buffer from lex file == 0");
@@ -255,19 +256,19 @@
// Increment the line counter.
Lines++;
- if (camStrncmp(Buffer, "%!PS-Adobe", 10) == 0)
+ if (camStrncmp(Buffer, _T("%!PS-Adobe"), 10) == 0)
{
// Now find the %%Creator string.
while ((Lines < 100) && !HeaderFile.eof())
{
HeaderFile.GetLineToken();
- Buffer = const_cast<char *> ( HeaderFile.GetTokenBuf() );
+ Buffer = const_cast<TCHAR *> ( HeaderFile.GetTokenBuf() );
ERROR2IF(Buffer == 0, 0, "Returned buffer from lex file == 0");
Lines++;
// Return TRUE if this file was created by Illustrator, or has been exported
// in Illustrator format.
- if (camStrncmp(Buffer, "%%Creator: Adobe Illustrator", 28) == 0)
+ if (camStrncmp(Buffer, _T("%%Creator: Adobe Illustrator"), 28) == 0)
{
// We definitely want this.
HeaderFile.close();
@@ -275,7 +276,7 @@
}
// Another variation on the Illustrator theme
- if (camStrncmp(Buffer, "%%Creator: AI", 13) == 0)
+ if (camStrncmp(Buffer, _T("%%Creator: AI"), 13) == 0)
{
// We definitely want this.
HeaderFile.close();
@@ -283,7 +284,7 @@
}
// yet another variation (see cru_logo.eps for this one)
- if (camStrncmp(Buffer, "%%Creator: ps2ai.ps", 19) == 0)
+ if (camStrncmp(Buffer, _T("%%Creator: ps2ai.ps"), 19) == 0)
{
HeaderFile.close ();
return 9;
@@ -291,10 +292,10 @@
// If there is a creator field, see if it mentions Illustrator
// NOTE: this test must be the last one of the "Creator:" tests.
- if (camStrncmp(Buffer, "%%Creator:", 10) == 0)
+ if (camStrncmp(Buffer, _T("%%Creator:"), 10) == 0)
{
// Found the creator line - does it contain the word Illustrator?
- if (camStrstr(Buffer, "Illustrator") != NULL)
+ if (camStrstr(Buffer, _T("Illustrator")) != NULL)
{
HeaderFile.close();
return 9;
@@ -305,7 +306,7 @@
// If we find the compression token then stop the search as we don't want to
// start looking in the compressed data!
- if (camStrncmp(Buffer, "%%Compression:", 14)==0)
+ if (camStrncmp(Buffer, _T("%%Compression:"), 14)==0)
break;
}
@@ -319,7 +320,7 @@
// If we find the compression token then stop the search as we don't want to start
// looking in the compressed data!
- if (camStrncmp(Buffer, "%%Compression:", 14)==0)
+ if (camStrncmp(Buffer, _T("%%Compression:"), 14)==0)
break;
}
@@ -371,7 +372,7 @@
return FALSE;
// Attach to the right device.
- ExportRegion->AttachDevice(DocView::GetSelected(), ExportDCPtr, pSpread);
+ ExportRegion->AttachDevice(DocView::GetSelected(), ExportDCPtr->GetDC(), pSpread);
// All ok
return TRUE;
@@ -720,7 +721,7 @@
/********************************************************************************************
-> char *AIEPSFilter::GetEPSCommand(EPSCommand Cmd)
+> TCHAR *AIEPSFilter::GetEPSCommand(EPSCommand Cmd)
Author: Tim_Browse (Xara Group Ltd) <camelotdev@xxxxxxxx>
Created: 28/02/94
@@ -731,7 +732,7 @@
********************************************************************************************/
-char *AIEPSFilter::GetEPSCommand(EPSCommand Cmd)
+TCHAR *AIEPSFilter::GetEPSCommand(EPSCommand Cmd)
{
INT32 i = 0;
while (AICommands[i].Cmd != EPSC_Invalid)
@@ -804,10 +805,11 @@
Node *pBGNode = NULL;
// Set the background colour.
- pRegion->SetBackgroundColour ( FlashFilter::GetPageColour ( pSpread, &pBGNode ) );
+ DocColour bg(FlashFilter::GetPageColour ( pSpread, &pBGNode ) );
+ pRegion->SetBackgroundColour ( bg );
// Export the file, but catch any file errors.
- TRY
+ try
{
// (ChrisG 5/4/2001) Find the first non-guide layer.
while (pLayer && pLayer->IsGuide ())
@@ -827,7 +829,7 @@
}
} // TRY
- CATCH ( CFileException, e )
+ catch ( CFileException)
{
// Didn't work - report failure to caller.
if ( pDC )
@@ -837,7 +839,7 @@
EndSlowJob ();
success = FALSE;
}
- END_CATCH
+
#endif
return success;
@@ -997,7 +999,7 @@
INT32 PhotoShopEPSFilter::EPSHeaderIsOk(ADDR pFileHeader, UINT32 HeaderSize)
{
UINT32 Lines = 0;
- char *Buffer = NULL;
+ TCHAR *Buffer = NULL;
// !PS-Adobe line is ok - check creator line...
CCMemTextFile HeaderFile ( reinterpret_cast<char *> ( pFileHeader ), HeaderSize );
@@ -1015,7 +1017,7 @@
{
// Get the current line from the file.
HeaderFile.GetLineToken();
- Buffer = const_cast<char *> ( HeaderFile.GetTokenBuf () );
+ Buffer = const_cast<TCHAR *> ( HeaderFile.GetTokenBuf () );
// Ensure that it's OK.
ERROR2IF(Buffer == 0, 0, "Returned buffer from lex file == 0");
@@ -1023,19 +1025,19 @@
// Increment the line counter.
Lines++;
- if (camStrncmp(Buffer, "%!PS-Adobe", 10) == 0)
+ if (camStrncmp(Buffer, _T("%!PS-Adobe"), 10) == 0)
{
// Now find the %%Creator string.
while ((Lines < 100) && !HeaderFile.eof())
{
HeaderFile.GetLineToken();
- Buffer = const_cast<char *> ( HeaderFile.GetTokenBuf() );
+ Buffer = const_cast<TCHAR *> ( HeaderFile.GetTokenBuf() );
ERROR2IF(Buffer == 0, 0, "Returned buffer from lex file == 0");
Lines++;
// Return TRUE if this file was created by Illustrator, or has been exported
// in Illustrator format.
- if (camStrncmp(Buffer, "%%Creator: Adobe Photoshop", 26) == 0)
+ if (camStrncmp(Buffer, _T("%%Creator: Adobe Photoshop"), 26) == 0)
{
// We definitely want this.
HeaderFile.close();
@@ -1044,7 +1046,7 @@
// If we find the compression token then stop the search as we don't want to
// start looking in the compressed data!
- if (camStrncmp(Buffer, "%%Compression:", 14)==0)
+ if (camStrncmp(Buffer, _T("%%Compression:"), 14)==0)
break;
}
@@ -1058,7 +1060,7 @@
// If we find the compression token then stop the search as we don't want to start
// looking in the compressed data!
- if (camStrncmp(Buffer, "%%Compression:", 14)==0)
+ if (camStrncmp(Buffer, _T("%%Compression:"), 14)==0)
break;
}
@@ -1086,7 +1088,7 @@
// Display error message.
String_256 WarnMsg;
- WarnMsg.MakeMsg(_R(IDT_IMPORTMSG_PHOTOSHOPEPS), "");
+ WarnMsg.MakeMsg(_R(IDT_IMPORTMSG_PHOTOSHOPEPS), _T(""));
Error::SetError(0, WarnMsg, 0);
return FALSE;
Index: Trunk/XaraLX/Kernel/ai_eps.h
===================================================================
--- Trunk/XaraLX/Kernel/ai_eps.h (revision 1311)
+++ Trunk/XaraLX/Kernel/ai_eps.h (revision 1312)
@@ -135,7 +135,7 @@
AIEPSFilter();
virtual BOOL Init();
BOOL PrepareToExport(CCLexFile*, Spread *pSpread);
- char *GetEPSCommand(EPSCommand Cmd);
+ TCHAR *GetEPSCommand(EPSCommand Cmd);
virtual BOOL NeedsPrintComponents ( void );
protected:
Index: Trunk/XaraLX/Kernel/ai_epsrr.cpp
===================================================================
--- Trunk/XaraLX/Kernel/ai_epsrr.cpp (revision 1311)
+++ Trunk/XaraLX/Kernel/ai_epsrr.cpp (revision 1312)
@@ -122,8 +122,10 @@
#include "fontman.h" // for FontManager - for writing font changes to overflow text
#include "colplate.h" // for ColourPlate - in overflow text functions
#include "colourix.h" // for Indexed Colour - for writing colour changes to overflow
+#include "nodebev.h"
+#include "layer.h"
+#include "clipattr.h"
-
CC_IMPLEMENT_DYNAMIC(AIEPSRenderRegion, EPSRenderRegion)
/********************************************************************************************
@@ -163,7 +165,7 @@
m_pRadialGradList = NULL;
// Initialise the creator string to show that it's an AI file.
- CreatorString = "Adobe Illustrator(TM) 7.0 by Xara.";
+ CreatorString = _T("Adobe Illustrator(TM) 7.0 by Xara.");
}
/********************************************************************************************
@@ -226,13 +228,13 @@
BOOL AIEPSRenderRegion::ExportBevel ( NodeBevel *pBevel )
{
// Set up the local variables.
- KernelDC *pDC = static_cast<KernelDC *> ( RenderDC );
+ KernelDC *pDC = static_cast<KernelDC *> ( CCDC::ConvertFromNativeDC(RenderDC) );
RangeControl ControlFlags ( TRUE, TRUE );
Range ToRender ( pBevel, pBevel, ControlFlags );
KernelBitmap *pBitmap = NULL;
Path *pSourcePath = &( pBevel->InkPath );
DocRect Bounds = pBevel->GetBoundingRect ();
- DocCoord Position ( Bounds.lox, Bounds.hiy );
+ DocCoord Position ( Bounds.lo.x, Bounds.hi.y );
double Width = static_cast<double> ( Bounds.Width () );
double Height = static_cast<double> ( Bounds.Height () );
@@ -269,7 +271,7 @@
// Write the end of mask operator. (ChrisG 16/01/01) If we've written a mask.
if (pSourcePath->GetNumCoords () != 0)
{
- pDC->OutputToken ( "Q" );
+ pDC->OutputToken ( _T("Q") );
pDC->OutputNewLine ();
}
@@ -304,8 +306,8 @@
DocRect &Bounds )
{
// Set up the local variables.
- KernelDC *pDC = static_cast<KernelDC *> ( RenderDC );
- DocCoord Position ( Bounds.lox, Bounds.hiy );
+// KernelDC *pDC = static_cast<KernelDC *> ( RenderDC );
+ DocCoord Position ( Bounds.lo.x, Bounds.hi.y );
double Width = static_cast<double> ( Bounds.Width () ) / 1000;
double Height = static_cast<double> ( Bounds.Height () ) / 1000;
double BMPWidth = static_cast<double> ( pBitmap->GetWidth () );
@@ -327,7 +329,7 @@
m_d = Height / BMPHeight;
// Write out the bitmap header.
- WriteBitmapHeader ( BMPWidth, BMPHeight );
+ WriteBitmapHeader ( (INT32)BMPWidth, (INT32)BMPHeight );
// Export the bitmap.
WriteContoneBody ( pBitmap );
@@ -382,14 +384,14 @@
// Catch null pointers to layers.
if ( pLayer != NULL )
{
- KernelDC *pDC = static_cast<KernelDC *> ( RenderDC );
- char LayerName [258];
+ KernelDC *pDC = static_cast<KernelDC *> ( CCDC::ConvertFromNativeDC(RenderDC) );
+ TCHAR LayerName [258];
// Set up the layer's name.
- sprintf ( LayerName, "(%s)", ( TCHAR* ) pLayer->GetLayerID () );
+ camSprintf ( LayerName, _T("(%s)"), ( TCHAR* ) pLayer->GetLayerID () );
// Start a layer definition.
- pDC->OutputToken ( "%AI5_BeginLayer" );
+ pDC->OutputToken ( _T("%AI5_BeginLayer") );
pDC->OutputNewLine ();
// Set the layer's properties.
@@ -410,12 +412,12 @@
pDC->OutputValue ( ( UINT32 ) 0 ); // Green intensity.
// Write out the Lb tag.
- pDC->OutputToken ( "Lb" );
+ pDC->OutputToken ( _T("Lb") );
pDC->OutputNewLine ();
// Set the layer's name.
pDC->OutputToken ( LayerName );
- pDC->OutputToken ( "Ln" );
+ pDC->OutputToken ( _T("Ln") );
pDC->OutputNewLine ();
// Tell Camelot that there is an active layer.
@@ -443,7 +445,7 @@
BOOL AIEPSRenderRegion::RenderChar(WCHAR ch, Matrix* pMatrix)
{
- char buf[20];
+ TCHAR buf[20];
BOOL result = FALSE; // assume failure if nothing given.
if (m_bTextAsShapes)
@@ -459,7 +461,7 @@
KernelDC *pDC = (KernelDC *) RenderDC;
pDC->OutputMatrix(pMatrix);
- pDC->OutputToken("Tm");
+ pDC->OutputToken(_T("Tm"));
pDC->OutputNewLine();
}
@@ -470,7 +472,7 @@
if (ExportingOnPath ())
{
OverflowTextFinishGap ();
- wsprintf (buf,"%c",ch);
+ camSprintf (buf,_T("%c"),ch);
OverflowTextWrite (buf);
}
}
@@ -560,10 +562,10 @@
BOOL AIEPSRenderRegion::WriteEPSVersion ( void )
{
// Cast the pointer to an appropriate DC.
- KernelDC *pDC = static_cast<KernelDC *> ( RenderDC );
+ KernelDC *pDC = static_cast<KernelDC *> ( CCDC::ConvertFromNativeDC(RenderDC) );
// Output the special AIEPS header start token.
- pDC->OutputToken ( "%!PS-Adobe-3.0" );
+ pDC->OutputToken ( _T("%!PS-Adobe-3.0") );
pDC->OutputNewLine ();
return TRUE;
@@ -589,7 +591,7 @@
KernelDC *pDC = ( KernelDC * ) RenderDC;
// Output the process colours
- pDC->OutputToken ( "%%DocumentProcessColors: Cyan Magenta Yellow Black" );
+ pDC->OutputToken ( _T("%%DocumentProcessColors: Cyan Magenta Yellow Black") );
pDC->OutputNewLine ();
return TRUE;
@@ -621,9 +623,9 @@
pDocument->WriteEPSResources ( pFilter );
// Add a few things necessary for the AI file format.
- pDC->OutputToken ( "%AI3_ColorUsage: Color" );
+ pDC->OutputToken ( _T("%AI3_ColorUsage: Color") );
pDC->OutputNewLine ();
- pDC->OutputToken ( "%AI5_FileFormat 2.0" );
+ pDC->OutputToken ( _T("%AI5_FileFormat 2.0") );
pDC->OutputNewLine ();
// All done.
@@ -705,15 +707,15 @@
BOOL AIEPSRenderRegion::WriteLinearFill ( FillGeometryAttribute * pFill, EFFECTTYPE effect, INT32 id )
{
// Extract the fill attribute - this is necessary for processing the fill type.
- KernelDC *pDC = static_cast<KernelDC *> ( RenderDC );
+ KernelDC *pDC = static_cast<KernelDC *> ( CCDC::ConvertFromNativeDC(RenderDC) );
INT32 Colours = 2;
- char GradientName [32];
+ TCHAR GradientName [32];
DocColour StartColour = *( pFill->GetStartColour () );
DocColour EndColour;
ColourRamp *pRamp = pFill->GetColourRamp ();
// The fill is, or can be approximated by, a linear fill.
- sprintf ( GradientName, "(%s %d)", LinearGradient, id );
+ camSprintf ( GradientName, _T("(%s %d)"), LinearGradient, id );
// (ChrisG 16/01/01) Four colour fill MUST come first, as it's derived from Three
// colour fill, and returns valid for IsThreeColFill().
@@ -766,7 +768,7 @@
}
// Write the gradient's header.
- pDC->OutputToken ( "%AI5_BeginGradient:" );
+ pDC->OutputToken ( _T("%AI5_BeginGradient:") );
pDC->OutputToken ( GradientName );
pDC->OutputNewLine ();
@@ -774,9 +776,9 @@
pDC->OutputToken ( GradientName );
pDC->OutputValue ( static_cast<INT32> ( LinearFill ) );
pDC->OutputValue ( static_cast<INT32> ( Colours ) );
- pDC->OutputToken ( "Bd" );
+ pDC->OutputToken ( _T("Bd") );
pDC->OutputNewLine ();
- pDC->OutputToken ( "[" );
+ pDC->OutputToken ( _T("[") );
pDC->OutputNewLine ();
// (ChrisG 3/4/2001) Get bias and convert to 0-100 range (from -1 to +1)
@@ -852,9 +854,9 @@
WriteGradientEntry ( &StartColour, 0, bias );
// Write out the end of gradient tokens.
- pDC->OutputToken ( "BD" );
+ pDC->OutputToken ( _T("BD") );
pDC->OutputNewLine ();
- pDC->OutputToken ( "%AI5_EndGradient" );
+ pDC->OutputToken ( _T("%AI5_EndGradient") );
pDC->OutputNewLine ();
// It worked!
@@ -878,15 +880,15 @@
BOOL AIEPSRenderRegion::WriteRadialFill (FillGeometryAttribute * pFill, EFFECTTYPE effect, INT32 id)
{
// Extract the fill attribute - this is necessary for processing the fill type.
- KernelDC *pDC = static_cast<KernelDC *> ( RenderDC );
+ KernelDC *pDC = static_cast<KernelDC *> ( CCDC::ConvertFromNativeDC(RenderDC) );
INT32 Colours = 2;
- char GradientName [32];
+ TCHAR GradientName [32];
DocColour StartColour = *( pFill->GetStartColour () );
DocColour EndColour = *( pFill->GetEndColour () );
ColourRamp *pRamp = pFill->GetColourRamp ();
// The fill is, or can be approximated by, a Radial fill.
- sprintf ( GradientName, "(%s %d)", RadialGradient, id );
+ camSprintf ( GradientName, _T("(%s %d)"), RadialGradient, id );
// Count the number of colours.
if ( pRamp != NULL )
@@ -911,7 +913,7 @@
}
// Write the gradient's header.
- pDC->OutputToken ( "%AI5_BeginGradient:" );
+ pDC->OutputToken ( _T("%AI5_BeginGradient:") );
pDC->OutputToken ( GradientName );
pDC->OutputNewLine ();
@@ -919,9 +921,9 @@
pDC->OutputToken ( GradientName );
pDC->OutputValue ( static_cast<INT32> ( RadialFill ) );
pDC->OutputValue ( static_cast<INT32> ( Colours ) );
- pDC->OutputToken ( "Bd" );
+ pDC->OutputToken ( _T("Bd") );
pDC->OutputNewLine ();
- pDC->OutputToken ( "[" );
+ pDC->OutputToken ( _T("[") );
pDC->OutputNewLine ();
// (ChrisG 3/4/2001) Get bias and convert to 0-100 range (from -1 to +1)
@@ -972,9 +974,9 @@
WriteGradientEntry ( &EndColour, 100, 50 );
// Write out the end of gradient tokens.
- pDC->OutputToken ( "BD" );
+ pDC->OutputToken ( _T("BD") );
pDC->OutputNewLine ();
- pDC->OutputToken ( "%AI5_EndGradient" );
+ pDC->OutputToken ( _T("%AI5_EndGradient") );
pDC->OutputNewLine ();
// It worked!
@@ -1007,7 +1009,7 @@
PColourCMYK CMYKColour; // The colour to be stored.
KernelDC *pDC = (KernelDC *) RenderDC; // A pointer to the export DC used.
- char Line [80]; // Contains the string to be stored.
+ TCHAR Line [80]; // Contains the string to be stored.
// (ChrisG 3/4/2001)
if (Midpoint < 13)
@@ -1023,7 +1025,7 @@
// Use RGB syntax.
pColour->GetRGBValue ( &red, &green, &blue );
- sprintf ( Line, "2 %d %d%%_Bs", Midpoint, Position );
+ camSprintf ( Line, _T("2 %d %d%%_Bs"), Midpoint, Position );
pDC->OutputColour ( &CMYKColour );
pDC->OutputColourValue ( red );
pDC->OutputColourValue ( green );
@@ -1036,7 +1038,7 @@
// It is necessary to build the output line like this, so that there isn't a space
// between the position of the colour, and the %_Bs operator.
- sprintf ( Line, "1 %d %d%%_Bs", Midpoint, Position ); // Build the output string.
+ camSprintf ( Line, _T("1 %d %d%%_Bs"), Midpoint, Position ); // Build the output string.
pDC->OutputColour ( &CMYKColour ); // Write the colour to the file.
pDC->OutputToken ( Line ); // Write the output string out.
@@ -1133,10 +1135,10 @@
for (INT32 i=1; i<NumFillEmulationSteps + 1; i++)
{
// increment each colour value and the position
- h2 = h1 + (i * hAdd);
- s2 = s1 + (i * sAdd);
- v2 = v1 + (i * vAdd);
- pos2 = pos1 + (i * posAdd);
+ h2 = (INT32)(h1 + (i * hAdd));
+ s2 = (INT32)(s1 + (i * sAdd));
+ v2 = (INT32)(v1 + (i * vAdd));
+ pos2 = (INT32)(pos1 + (i * posAdd));
// wrap the hue around if it's gone past 360 deg or 0 deg.
if (h2>=360)
@@ -1220,12 +1222,12 @@
if ( m_ActiveLayer )
{
// Cast the RenderDC pointer into a useful form.
- KernelDC *pDC = static_cast<KernelDC *> ( RenderDC );
+ KernelDC *pDC = static_cast<KernelDC *> ( CCDC::ConvertFromNativeDC(RenderDC) );
// Write out the end of layer tag.
- pDC->OutputToken ( "LB" );
+ pDC->OutputToken ( _T("LB") );
pDC->OutputNewLine ();
- pDC->OutputToken ( "%AI5_EndLayer" );
+ pDC->OutputToken ( _T("%AI5_EndLayer") );
pDC->OutputNewLine ();
// Set m_ActiveLayer to be FALSE.
@@ -1264,7 +1266,7 @@
DocCoord Delta = EndPoint - StartPoint;
double Angle = 90.0f;
double Length = FlashExportDC::CalculateLength ( Delta );
- char Name [80];
+ TCHAR Name [80];
BOOL IsRadial = pFillAttr->IsARadialFill () ||
pFillAttr->IsASquareFill ();
INT32 id = 0;
@@ -1278,13 +1280,13 @@
if ( IsRadial )
{
// Set up the name to show that it's a radial gradient.
- sprintf ( Name, "(%s %d)", RadialGradient, id );
+ camSprintf ( Name, _T("(%s %d)"), RadialGradient, id );
}
// Otherwise it's represented by a linear fill.
else
{
// Set up the name to show that it's a linear gradient.
- sprintf ( Name, "(%s %d)", LinearGradient, id );
+ camSprintf ( Name, _T("(%s %d)"), LinearGradient, id );
// Reset the end point value if we're dealing with a three colour fill.
if ( pFillAttr->IsAThreeColFill () )
@@ -1345,12 +1347,12 @@
Length /= 1000;
// Write out the appropriate fill record.
- pDC->OutputToken ( "1" ); // It is a clipped gradient.
+ pDC->OutputToken ( _T("1") ); // It is a clipped gradient.
pDC->OutputToken ( Name ); // The gradient's name.
pDC->OutputCoord ( StartPoint ); // Start point for the gradient fill.
pDC->OutputReal ( Angle ); // The angle of the fill from the X-Axis.
pDC->OutputReal ( Length ); // The length of the matrix.
- pDC->OutputToken ( "1 0 0 1 0 0 Bg" ); // Matrix manipulating the fill. (Unused.)
+ pDC->OutputToken ( _T("1 0 0 1 0 0 Bg") ); // Matrix manipulating the fill. (Unused.)
pDC->OutputNewLine ();
} // End of IsGradientFillValidForExport.
@@ -1407,7 +1409,7 @@
double SinRotate = sin ( Angle );
double CosRotate = cos ( Angle );
- double Skew = 0;
+// double Skew = 0;
DocCoord LowLeft = pNodeBMP->Parallel [3]; // Low corner of the bitmap.
DocCoord TopLeft = pNodeBMP->Parallel [0]; // Max Y corner.
@@ -1553,16 +1555,16 @@
{
// Cast the DC pointer to be a KernelDC pointer. This allows it to access useful member
// functions.
- KernelDC *pDC = static_cast<KernelDC *> ( RenderDC );
+ KernelDC *pDC = static_cast<KernelDC *> ( CCDC::ConvertFromNativeDC(RenderDC) );
// Write the matrix.
- pDC->OutputToken ( "[" );
+ pDC->OutputToken ( _T("[") );
pDC->OutputReal ( m_a );
pDC->OutputReal ( m_b );
pDC->OutputReal ( m_c );
pDC->OutputReal ( m_d );
pDC->OutputCoord ( m_T );
- pDC->OutputToken ( "]" );
+ pDC->OutputToken ( _T("]") );
return TRUE;
}
@@ -1588,7 +1590,7 @@
BOOL AIEPSRenderRegion::WriteMask ( Path *MaskPath, BOOL OutputGroupToken )
{
- KernelDC *pDC = static_cast<KernelDC*> ( RenderDC ); // DC for export file.
+ KernelDC *pDC = static_cast<KernelDC*> ( CCDC::ConvertFromNativeDC(RenderDC) ); // DC for export file.
DocCoord *Coords = MaskPath->GetCoordArray();
PathVerb *Verbs = MaskPath->GetVerbArray();
INT32 NumCoords = MaskPath->GetNumCoords();
@@ -1601,7 +1603,7 @@
if (OutputGroupToken)
{
// Start the mask.
- pDC->OutputToken ( "q" );
+ pDC->OutputToken ( _T("q") );
pDC->OutputNewLine ();
}
@@ -1617,7 +1619,7 @@
IsCompound = TRUE;
// Write the tag to indicate that it's a compound path.
- pDC->OutputToken ( "*u" );
+ pDC->OutputToken ( _T("*u") );
pDC->OutputNewLine ();
break;
}
@@ -1635,7 +1637,7 @@
while(ReadPos < NumCoords)
{
// Find out the type of element that we are over (after the close flag has been removed)
- Coord P[4];
+// Coord P[4];
switch ( (Verbs[ReadPos]) & (~PT_CLOSEFIGURE) )
{
case PT_MOVETO:
@@ -1695,12 +1697,12 @@
{
// End compound path
- pDC->OutputToken("*U");
+ pDC->OutputToken(_T("*U"));
pDC->OutputNewLine();
}
// Wrap up the mask.
- pDC->OutputToken ( "0 O" );
+ pDC->OutputToken ( _T("0 O") );
pDC->OutputNewLine ();
} // End of if there is a clip path.
@@ -1723,14 +1725,14 @@
BOOL AIEPSRenderRegion::WriteMaskTags ()
{
- KernelDC *pDC = static_cast<KernelDC*> ( RenderDC ); // DC for export file.
+ KernelDC *pDC = static_cast<KernelDC*> ( CCDC::ConvertFromNativeDC(RenderDC) ); // DC for export file.
// Write out the mask definition tags.
- pDC->OutputToken ( "h" );
+ pDC->OutputToken ( _T("h") );
pDC->OutputNewLine ();
- pDC->OutputToken ( "W" );
+ pDC->OutputToken ( _T("W") );
pDC->OutputNewLine ();
- pDC->OutputToken ( "n" );
+ pDC->OutputToken ( _T("n") );
pDC->OutputNewLine ();
return TRUE;
@@ -1753,7 +1755,7 @@
BOOL AIEPSRenderRegion::WriteBitmapRecord ( OILBitmap *pBitmap )
{
// Set up the local variables.
- KernelDC *pDC = static_cast<KernelDC*> ( RenderDC );
+// KernelDC *pDC = static_cast<KernelDC*> ( CCDC::ConvertFromNativeDC(RenderDC) );
INT32 Width = static_cast<INT32> ( pBitmap->GetWidth () );
INT32 Height = static_cast<INT32> ( pBitmap->GetHeight () );
@@ -1790,12 +1792,12 @@
INT32 Height )
{
// Set up kernel DC up in an appropriate form.
- KernelDC *pDC = static_cast<KernelDC *> ( RenderDC );
+ KernelDC *pDC = static_cast<KernelDC *> ( CCDC::ConvertFromNativeDC(RenderDC) );
// Declare the bitmap record.
- pDC->OutputToken ( "%AI5_File:" );
+ pDC->OutputToken ( _T("%AI5_File:") );
pDC->OutputNewLine ();
- pDC->OutputToken ( "%AI5_BeginRaster" );
+ pDC->OutputToken ( _T("%AI5_BeginRaster") );
pDC->OutputNewLine ();
// (ChrisG 23/11/00) The Xh operator has been removed, as it wasn't correct (it didn't
@@ -1812,7 +1814,7 @@
// pDC->OutputValue ( Width );
// pDC->OutputValue ( Height );
// pDC->OutputValue ( 0l );
-// pDC->OutputToken ( "Xh" );
+// pDC->OutputToken ( _T("Xh") );
// pDC->OutputNewLine ();
@@ -1822,7 +1824,7 @@
WriteLoadedMatrix ();
// The bounds of the bitmap.
- pDC->OutputToken ( "0 0" );
+ pDC->OutputToken ( _T("0 0") );
pDC->OutputValue ( Width );
pDC->OutputValue ( Height );
@@ -1833,16 +1835,16 @@
// These values are always constant, and so I don't need to worry about
// them changing.
- pDC->OutputToken ( "8 3 0 0 0 0" );
+ pDC->OutputToken ( _T("8 3 0 0 0 0") );
pDC->OutputNewLine ();
// Write out the file size.
- pDC->OutputToken ( "%%BeginData:" );
+ pDC->OutputToken ( _T("%%BeginData:") );
pDC->OutputValue ( static_cast<INT32> ( Height * Width * 3 ) );
pDC->OutputNewLine ();
// Wrap out the XI operator.
- pDC->OutputToken ( "XI" );
+ pDC->OutputToken ( _T("XI") );
pDC->OutputNewLine ();
return TRUE;
@@ -1871,11 +1873,11 @@
INT32 Height )
{
// Set up the local variables.
- KernelDC *pDC = static_cast<KernelDC*> ( RenderDC );
+ KernelDC *pDC = static_cast<KernelDC*> ( CCDC::ConvertFromNativeDC(RenderDC) );
INT32 Count = 0;
// Write the initial %.
- pDC->OutputToken ( "%" );
+ pDC->OutputToken ( _T("%") );
// Write out the bitmap data. It's necessary to go backwards through y
// otherwise the bitmap is rendered upside down.
@@ -1884,18 +1886,18 @@
for ( INT32 x = 0; x < Width; x++ )
{
Pixel32bpp BMPPixel = pBitmap->ReadPixel32bpp ( x, y );
- char Output [7];
+ TCHAR Output [7];
// Wrap the line to keep the file tidy.
if ( Count >= 10 )
{
pDC->OutputNewLine ();
- pDC->OutputToken ( "%" );
+ pDC->OutputToken ( _T("%") );
Count = 0;
}
// Translate the RGB values into an ASCII string.
- sprintf ( Output, "%.2X%.2X%.2X", BMPPixel.Red, BMPPixel.Green, BMPPixel.Blue );
+ camSprintf ( Output, _T("%.2X%.2X%.2X"), BMPPixel.Red, BMPPixel.Green, BMPPixel.Blue );
// And output them. I'm writing directly to the file because the OutputToken ()
// function introduces spaces between the values, which is not a good thing for
@@ -1933,13 +1935,13 @@
BOOL AIEPSRenderRegion::WriteContoneBody ( OILBitmap *pBitmap )
{
// Set up the local variables.
- KernelDC *pDC = static_cast<KernelDC*> ( RenderDC );
+ KernelDC *pDC = static_cast<KernelDC*> ( CCDC::ConvertFromNativeDC(RenderDC) );
INT32 Width = static_cast<INT32> ( pBitmap->GetWidth () );
INT32 Height = static_cast<INT32> ( pBitmap->GetHeight () );
INT32 Count = 0;
// Write the initial %.
- pDC->OutputToken ( "%" );
+ pDC->OutputToken ( _T("%") );
// Write out the bitmap data. It's necessary to go backwards through y
// otherwise the bitmap is rendered upside down.
@@ -1949,7 +1951,7 @@
{
UINT32 Index = pBitmap->ReadPixelGreyscale ( x, y );
DocColour PixelColour = pBitmap->GetContonePaletteEntry ( Index );
- char Output [7];
+ TCHAR Output [7];
INT32 lRed;
INT32 lGreen;
INT32 lBlue;
@@ -1961,12 +1963,12 @@
if ( Count >= 10 )
{
pDC->OutputNewLine ();
- pDC->OutputToken ( "%" );
+ pDC->OutputToken ( _T("%") );
Count = 0;
}
// Translate the RGB values into an ASCII string.
- sprintf ( Output, "%.2X%.2X%.2X", lRed, lGreen, lBlue );
+ camSprintf ( Output, _T("%.2X%.2X%.2X"), lRed, lGreen, lBlue );
// And output them. I'm writing directly to the file because the OutputToken ()
// function introduces spaces between the values, which is not a good thing for
@@ -2004,14 +2006,14 @@
BOOL AIEPSRenderRegion::WriteBitmapTail ( void )
{
// Set up kernel DC up in an appropriate form.
- KernelDC *pDC = static_cast<KernelDC *> ( RenderDC );
+ KernelDC *pDC = static_cast<KernelDC *> ( CCDC::ConvertFromNativeDC(RenderDC) );
// Wrap up the bitmap record.
- pDC->OutputToken ( "%%EndData" );
+ pDC->OutputToken ( _T("%%EndData") );
pDC->OutputNewLine ();
- pDC->OutputToken ( "XH" );
+ pDC->OutputToken ( _T("XH") );
pDC->OutputNewLine ();
- pDC->OutputToken ( "%AI5_EndRaster" );
+ pDC->OutputToken ( _T("%AI5_EndRaster") );
pDC->OutputNewLine ();
// ChrisG (27/10/00).
@@ -2020,7 +2022,7 @@
// etc... Whereas the 'N' token clears all this info, so any text objects or paths which
// follow the bitmap were picking up colour and line info for an unfilled/unstroked path,
// rather than the current attributes.
- pDC->OutputToken ( "F" );
+ pDC->OutputToken ( _T("F") );
pDC->OutputNewLine ();
// The colours are no longer valid, as the bitmap definition has invalidated them.
@@ -2044,26 +2046,26 @@
void AIEPSRenderRegion::OutputWindingRule ()
{
// Set up kernel DC up in an appropriate form.
- KernelDC *pDC = static_cast<KernelDC *> ( RenderDC );
+ KernelDC *pDC = static_cast<KernelDC *> ( CCDC::ConvertFromNativeDC(RenderDC) );
if (RR_WINDINGRULE() == EvenOddWinding)
{
// Even-Odd winding (Camelot's default)
- pDC->OutputValue (1l);
+ pDC->OutputValue ((INT32)1);
}
else if (RR_WINDINGRULE() == NonZeroWinding)
{
// Non-Zero winding (EPS's default)
- pDC->OutputValue (0l);
+ pDC->OutputValue ((INT32)0);
}
else
{
// Positive or negative winding (only Even-Odd and Non-Zero are supported in AI7),
// so assume that we're using camelot's default rule.
- pDC->OutputValue (1l);
+ pDC->OutputValue ((INT32)1);
}
- pDC->OutputToken ("XR");
+ pDC->OutputToken (_T("XR"));
pDC->OutputNewLine ();
}
@@ -2087,7 +2089,7 @@
if (ExportingOnPath ())
{
OverflowTextStartGap ();
- sprintf (buf, "%.2f w
", ((double) RR_LINEWIDTH())/1000);
+ camSprintf (buf, _T("%.2f w
"), ((double) RR_LINEWIDTH())/1000);
OverflowTextWrite (buf);
}
@@ -2113,7 +2115,7 @@
if (ExportingOnPath ())
{
OverflowTextStartGap ();
- sprintf (buf, "%d j
", (UINT32)RR_JOINTYPE());
+ camSprintf (buf, _T("%d j
"), (UINT32)RR_JOINTYPE());
OverflowTextWrite (buf);
}
@@ -2159,7 +2161,7 @@
if (ExportingOnPath ())
{
OverflowTextStartGap ();
- sprintf (buf, "%d J
", (UINT32)RR_STARTCAP());
+ camSprintf (buf, _T("%d J
"), (UINT32)RR_STARTCAP());
OverflowTextWrite (buf);
}
@@ -2239,7 +2241,7 @@
String_64 FontName;
String_64 EncodedFontName;
- String_64 Append("/_");
+ String_64 Append(_T("/_"));
// get information about the current font
FONTMANAGER->GetFontName(RR_TXTFONTTYPEFACE(), FontName);
@@ -2248,13 +2250,13 @@
// appears to map an existing, encoded font name onto its Postscript counterpart.
FONTMANAGER->EncodeAndMapFontName(FontName, EncodedFontName, GetFontStyle());
- EncodedFontName.Insert(&Append,0);
+ EncodedFontName.Insert(Append,0);
// Output the fontsize next
double PointSize = ((double)RR_TXTFONTSIZE())/1000;
// finally do output the font token
- sprintf (buffer, "%s %.1f Tf
", (TCHAR *)EncodedFontName, PointSize);
+ camSprintf (buffer, _T("%s %.1f Tf
"), (TCHAR *)EncodedFontName, PointSize);
OverflowTextWrite (buffer);
}
EPSRenderRegion::OutputFontName ();
@@ -2291,13 +2293,13 @@
switch (Style)
{
- case 0: OverflowTextWrite ("3 Tr
"); // Invisible
+ case 0: OverflowTextWrite (_T("3 Tr
")); // Invisible
break;
- case 1: OverflowTextWrite ("0 Tr
"); // filled only
+ case 1: OverflowTextWrite (_T("0 Tr
")); // filled only
break;
- case 2: OverflowTextWrite ("1 Tr
"); // stroked only
+ case 2: OverflowTextWrite (_T("1 Tr
")); // stroked only
break;
- case 3: OverflowTextWrite ("2 Tr"); // filled and stroked
+ case 3: OverflowTextWrite (_T("2 Tr")); // filled and stroked
break;
}
}
@@ -2324,7 +2326,7 @@
if (ExportingOnPath ())
{
OverflowTextStartGap ();
- sprintf (buf, "%.0f Tz
", (RR_TXTASPECTRATIO().MakeDouble()*100.0)); // convert from ratio to %
+ camSprintf (buf, _T("%.0f Tz
"), (RR_TXTASPECTRATIO().MakeDouble()*100.0)); // convert from ratio to %
OverflowTextWrite (buf);
}
@@ -2353,7 +2355,7 @@
if (ExportingOnPath ())
{
OverflowTextStartGap ();
- sprintf (buf, "%d Tt
", RR_TXTTRACKING());
+ camSprintf (buf, _T("%d Tt
"), RR_TXTTRACKING());
OverflowTextWrite (buf);
}
@@ -2383,16 +2385,16 @@
switch (RR_TXTJUSTIFICATION())
{
case JLEFT:
- sprintf (buf, "%d Ta
", ((INT32)0));
+ camSprintf (buf, _T("%d Ta
"), ((INT32)0));
break;
case JRIGHT:
- sprintf (buf, "%d Ta
", ((INT32)2));
+ camSprintf (buf, _T("%d Ta
"), ((INT32)2));
break;
case JCENTRE:
- sprintf (buf, "%d Ta
", ((INT32)1));
+ camSprintf (buf, _T("%d Ta
"), ((INT32)1));
break;
case JFULL:
- sprintf (buf, "%d Ta
", ((INT32)3));
+ camSprintf (buf, _T("%d Ta
"), ((INT32)3));
break;
}
OverflowTextWrite (buf);
@@ -2452,7 +2454,7 @@
else
ptLineSpace = absLineSpace/1000;
- sprintf (buf, "%.0f %.0f Tl
", ptLineSpace, ptParaSpace);
+ camSprintf (buf, _T("%.0f %.0f Tl
"), ptLineSpace, ptParaSpace);
OverflowTextWrite (buf);
}
@@ -2480,7 +2482,7 @@
{
OverflowTextStartGap ();
double BaseLine = ((double)RR_TXTBASELINE())/1000;
- sprintf (buf, "%.1f Ts
", BaseLine);
+ camSprintf (buf, _T("%.1f Ts
"), BaseLine);
OverflowTextWrite (buf);
}
@@ -2514,17 +2516,17 @@
double offset = (pScript->Offset).MakeDouble();
double size = (pScript->Size).MakeDouble();
- OverflowTextWrite ("%%XSScript
");
+ OverflowTextWrite (_T("%%XSScript
"));
double rise = FontSize*offset;
- sprintf (buf, "%.1f Ts
", rise);
+ camSprintf (buf, _T("%.1f Ts
"), rise);
OverflowTextWrite (buf);
double ptsize = FontSize*size;
String_64 MappedFont;
- String_64 Append("/_");
+ String_64 Append(_T("/_"));
String_64 FontName;
FONTMANAGER->GetFontName(RR_TXTFONTTYPEFACE(), FontName);
@@ -2534,9 +2536,9 @@
// Graeme (14-6-00) - I should add ascent and descent values, but Camelot doesn't
// seem to store them anywhere.
- MappedFont.Insert(&Append,0);
+ MappedFont.Insert(Append,0);
- sprintf (buf, "%s %.1f Tf
",(TCHAR *)MappedFont, ptsize);
+ camSprintf (buf, _T("%s %.1f Tf
"),(TCHAR *)MappedFont, ptsize);
// Output the ascent.
// Output the descent.
OverflowTextWrite (buf);
@@ -2626,17 +2628,28 @@
fclose (m_fpOverflowText);
m_fpOverflowText = NULL;
- // copy info into actual EPS file.
- char buffer [1025];
+ // copy info into actual EPS file.
+ char cbuffer [1025];
+ TCHAR buffer [1025];
KernelDC *pDC = (KernelDC *) RenderDC;
FILE * fp;
// Write out the Extra info.
fp = fopen ("OverFlow.txt", "r+t");
- while (fgets (buffer, 1024, fp) != NULL)
+ while (fgets (cbuffer, 1024, fp) != NULL)
{
- // deal with newlines.
+ char c;
+ INT32 i;
+ cbuffer[1024]=0;
+ do
+ {
+ c=cbuffer[i];
+ buffer[i]=c; // 1:1 CHAR->TCHAR conversion
+ i++;
+ } while (c);
+
+ // deal with newlines.
pDC->OutputToken (buffer);
pDC->OutputNewLine ();
}
@@ -2666,7 +2679,7 @@
// if we're not in a gap, finish writing the old TX block and start a new gap,
if (m_bInTextGap == FALSE)
{
- OverflowTextWrite (") TX
");
+ OverflowTextWrite (_T(") TX
"));
m_bInTextGap = TRUE;
}
}
@@ -2690,7 +2703,7 @@
// if we're in a text gap (for changing the attributes), start writing a new TX block.
if (m_bInTextGap == TRUE)
{
- OverflowTextWrite ("(");
+ OverflowTextWrite (_T("("));
m_bInTextGap = FALSE;
}
}
@@ -2711,8 +2724,10 @@
void AIEPSRenderRegion::OverflowTextWrite (TCHAR * text)
{
ASSERT (ExportingOnPath ());
-
- fprintf (m_fpOverflowText, "%s", text);
+ while (*text)
+ {
+ fprintf (m_fpOverflowText, "%c", *text++);
+ }
}
@@ -2736,7 +2751,7 @@
TCHAR buf[20];
// Convert to points, getting integer and fractional parts
- sprintf (buf, "%.2f ", ((double) n) / 255);
+ camSprintf (buf, _T("%.2f "), ((double) n) / 255);
OverflowTextWrite (buf);
}
@@ -2821,9 +2836,9 @@
else
{
// Otherwise make up a colour name (see epsfiltr.h).
- OverflowTextWrite ("(");
+ OverflowTextWrite (_T("("));
OverflowTextWrite (ImmediateColourFudgeyBodgeName);
- OverflowTextWrite (")");
+ OverflowTextWrite (_T(")"));
}
}
else
@@ -2831,13 +2846,13 @@
// Got an indexed colour - output its name
// (Pass in TRUE to get a unique-identifier for local colours rather than "Local colour")
String_64 *ColName = pIndCol->GetName(TRUE);
- OverflowTextWrite ("(");
+ OverflowTextWrite (_T("("));
OverflowTextWrite ((TCHAR *) (*ColName));
- OverflowTextWrite (")");
+ OverflowTextWrite (_T(")"));
}
// Always tint 0
- OverflowTextWrite (" 0 ");
+ OverflowTextWrite (_T(" 0 "));
}
/********************************************************************************************
@@ -2868,14 +2883,14 @@
{
// This is a 'no colour' type colour, so output a zero-length colour name,
// as this is the only way we can handle this at the moment.
- OverflowTextWrite ("()");
+ OverflowTextWrite (_T("()"));
}
else
{
// Otherwise make up a colour name (see epsfiltr.h).
- OverflowTextWrite ("(");
+ OverflowTextWrite (_T("("));
OverflowTextWrite (ImmediateColourFudgeyBodgeName);
- OverflowTextWrite (")");
+ OverflowTextWrite (_T(")"));
}
}
else
@@ -2883,9 +2898,9 @@
// Got an indexed colour - output its name
// (Pass in TRUE to get a unique-identifier for local colours rather than "Local colour")
String_64 *ColName = pIndCol->GetName(TRUE);
- OverflowTextWrite ("(");
+ OverflowTextWrite (_T("("));
OverflowTextWrite ((TCHAR *) (*ColName));
- OverflowTextWrite (")");
+ OverflowTextWrite (_T(")"));
}
}
@@ -3103,13 +3118,13 @@
if (RR_FILLCOLOUR().FindParentIndexedColour() == NULL)
{
// Unnamed colour - just add 'Xa' token
- OverflowTextWrite ("Xa
");
+ OverflowTextWrite (_T("Xa
"));
}
else
{
// Named colour - add Name, tint value, RGB flag and 'Xx' token
OverflowTextWriteColourName (&(RR_FILLCOLOUR()));
- OverflowTextWrite (" 0 1 Xx
");
+ OverflowTextWrite (_T(" 0 1 Xx
"));
}
}
else
@@ -3123,13 +3138,13 @@
RR_FILLCOLOUR().GetCMYKValue(pContext, &CMYK);
BYTE c = 0xFF - CMYK.Key;
OverflowTextWriteSingleColour (c);
- OverflowTextWrite ("g
");
+ OverflowTextWrite (_T("g
"));
}
else
{
RR_FILLCOLOUR().GetCMYKValue(pContext, &CMYK);
OverflowTextWriteColour (&CMYK);
- OverflowTextWrite ("x
");
+ OverflowTextWrite (_T("x
"));
}
}
}
@@ -3174,13 +3189,13 @@
// retrieve the colour value
RR_FILLCOLOUR().GetCMYKValue(pContext, &CMYK);
OverflowTextWriteColour (&CMYK);
- OverflowTextWrite ("k
");
+ OverflowTextWrite (_T("k
"));
}
else
{
// Named colour
OverflowTextWriteNamedColour (&(RR_FILLCOLOUR()), pContext);
- OverflowTextWrite ("x
");
+ OverflowTextWrite (_T("x
"));
}
}
else
@@ -3192,13 +3207,13 @@
RR_FILLCOLOUR().GetCMYKValue(pContext, &CMYK);
BYTE c = 0xFF - CMYK.Key;
OverflowTextWriteSingleColour (c);
- OverflowTextWrite ("g
");
+ OverflowTextWrite (_T("g
"));
}
else
{
RR_FILLCOLOUR().GetCMYKValue(pContext, &CMYK);
OverflowTextWriteColour (&CMYK);
- OverflowTextWrite ("x
");
+ OverflowTextWrite (_T("x
"));
}
}
}
@@ -3251,13 +3266,13 @@
if (RR_STROKECOLOUR().FindParentIndexedColour() == NULL)
{
// Unnamed colour - just add 'XA' token
- OverflowTextWrite ("XA
");
+ OverflowTextWrite (_T("XA
"));
}
else
{
// Named colour - add Name, tint value, RGB flag and 'XX' token
OverflowTextWriteColourName (&(RR_STROKECOLOUR()));
- OverflowTextWrite (" 0 1 XX
");
+ OverflowTextWrite (_T(" 0 1 XX
"));
}
}
else
@@ -3271,13 +3286,13 @@
RR_STROKECOLOUR().GetCMYKValue(pContext, &CMYK);
BYTE c = 0xFF - CMYK.Key;
OverflowTextWriteSingleColour (c);
- OverflowTextWrite ("G
");
+ OverflowTextWrite (_T("G
"));
}
else
{
RR_STROKECOLOUR().GetCMYKValue(pContext, &CMYK);
OverflowTextWriteColour (&CMYK);
- OverflowTextWrite ("X
");
+ OverflowTextWrite (_T("X
"));
}
}
}
@@ -3321,13 +3336,13 @@
// retrieve the colour value
RR_STROKECOLOUR().GetCMYKValue(pContext, &CMYK);
OverflowTextWriteColour (&CMYK);
- OverflowTextWrite ("K
");
+ OverflowTextWrite (_T("K
"));
}
else
{
// Named colour
OverflowTextWriteNamedColour (&(RR_STROKECOLOUR()), pContext);
- OverflowTextWrite ("X
");
+ OverflowTextWrite (_T("X
"));
}
}
else
@@ -3339,13 +3354,13 @@
RR_STROKECOLOUR().GetCMYKValue(pContext, &CMYK);
BYTE c = 0xFF - CMYK.Key;
OverflowTextWriteSingleColour (c);
- OverflowTextWrite ("G
");
+ OverflowTextWrite (_T("G
"));
}
else
{
RR_STROKECOLOUR().GetCMYKValue(pContext, &CMYK);
OverflowTextWriteColour (&CMYK);
- OverflowTextWrite ("X
");
+ OverflowTextWrite (_T("X
"));
}
}
}
@@ -3585,7 +3600,7 @@
********************************************************************************************/
void AIEPSRenderRegion::BuildGradientCache (Node * pStartNode)
{
- Node * pChild = NULL;
+// Node * pChild = NULL;
// Set up the gradient searching system
AIEPSGradientScanRenderRegion scanRR (this);
@@ -3673,7 +3688,7 @@
if (numFills)
{
pDC->OutputValue (numFills);
- pDC->OutputToken ("Bn");
+ pDC->OutputToken (_T("Bn"));
pDC->OutputNewLine ();
}
}
Index: Trunk/XaraLX/Kernel/ai5_eps.h
===================================================================
--- Trunk/XaraLX/Kernel/ai5_eps.h (revision 1311)
+++ Trunk/XaraLX/Kernel/ai5_eps.h (revision 1312)
@@ -180,7 +180,7 @@
public:
AI5EPSFilter();
BOOL Init();
- char* GetEPSCommand(EPSCommand Cmd);
+ TCHAR* GetEPSCommand(EPSCommand Cmd);
// Allow a layer to be set with property flags.
BOOL CreateLayer ( String_256 &LayerName,
@@ -191,7 +191,7 @@
// data access
EPSStack& GetStack() { return Stack; }
CCLexFile* GetEPSFile() { return EPSFile; }
- const char* GetTokenBuf() { return TokenBuf; }
+ const TCHAR* GetTokenBuf() { return TokenBuf; }
INT32& GetLastProgressUpdate() { return LastProgressUpdate; }
protected:
Index: Trunk/XaraLX/Kernel/coreleps.cpp
===================================================================
--- Trunk/XaraLX/Kernel/coreleps.cpp (revision 1311)
+++ Trunk/XaraLX/Kernel/coreleps.cpp (revision 1312)
@@ -105,14 +105,14 @@
#include "coreleps.h"
-#include <strstrea.h>
+#include <sstream>
#include "nodepath.h"
//#include "paths.h" - in camtypes.h [AUTOMATICALLY REMOVED]
//#include "tim.h"
//#include "oilfltrs.h" - in camtypes.h [AUTOMATICALLY REMOVED]
//#include "fillattr.h" - in camtypes.h [AUTOMATICALLY REMOVED]
-#include "cdrfiltr.h"
+//#include "cdrfiltr.h"
DECLARE_SOURCE("$Revision$");
Index: Trunk/XaraLX/Kernel/ai5_eps.cpp
===================================================================
--- Trunk/XaraLX/Kernel/ai5_eps.cpp (revision 1311)
+++ Trunk/XaraLX/Kernel/ai5_eps.cpp (revision 1312)
@@ -102,7 +102,7 @@
#include "ai_eps.h"
#include "ai5_eps.h"
#include "ai_epsrr.h"
-#include <strstrea.h>
+#include <sstream>
#include <stdio.h>
#include "nodepath.h"
@@ -121,6 +121,7 @@
#include "ai_bmp.h"
#include "ai_layer.h"
#include "swffiltr.h"
+#include "layer.h"
DECLARE_SOURCE("$Revision");
@@ -132,54 +133,54 @@
CommandMap AI5EPSFilter::AI5Commands[] =
{
// Graduated fills
- EPSC_Bd, "Bd",
- EPSC_Bm, "Bm",
- EPSC_Bc, "Bc",
- EPSC__Bs, "%_Bs",
- EPSC__BS, "%_BS",
- EPSC__Br, "%_Br",
- EPSC_BD, "BD",
- EPSC_Bg, "Bg",
- EPSC_Bb, "Bb",
- EPSC_BB, "BB",
- EPSC_Bh, "Bh",
- EPSC_HexStart, "<",
- EPSC_HexEnd, ">",
+ { EPSC_Bd, _T("Bd")},
+ { EPSC_Bm, _T("Bm")},
+ { EPSC_Bc, _T("Bc")},
+ { EPSC__Bs, _T("%_Bs")},
+ { EPSC__BS, _T("%_BS")},
+ { EPSC__Br, _T("%_Br")},
+ { EPSC_BD, _T("BD")},
+ { EPSC_Bg, _T("Bg")},
+ { EPSC_Bb, _T("Bb")},
+ { EPSC_BB, _T("BB")},
+ { EPSC_Bh, _T("Bh")},
+ { EPSC_HexStart, _T("<")},
+ { EPSC_HexEnd, _T(">")},
// Layer stuff
- EPSC_Lb, "Lb",
- EPSC_LB, "LB",
- EPSC_Ln, "Ln",
+ { EPSC_Lb, _T("Lb")},
+ { EPSC_LB, _T("LB")},
+ { EPSC_Ln, _T("Ln")},
// Path tweaks
- EPSC_Ap, "Ap",
- EPSC_Ar, "Ar",
- EPSC_XR, "XR",
+ { EPSC_Ap, _T("Ap")},
+ { EPSC_Ar, _T("Ar")},
+ { EPSC_XR, _T("XR")},
// bitmaps
- EPSC_XI, "XI",
- EPSC_XF, "XF",
- EPSC_XG, "XG",
- EPSC_Xh, "Xh",
- EPSC_XH, "XH",
+ { EPSC_XI, _T("XI")},
+ { EPSC_XF, _T("XF")},
+ { EPSC_XG, _T("XG")},
+ { EPSC_Xh, _T("Xh")},
+ { EPSC_XH, _T("XH")},
// unknown
- EPSC_XP, "XP",
+ { EPSC_XP, _T("XP")},
// object tags
- EPSC_XT, "XT",
+ { EPSC_XT, _T("XT")},
// spurious
- EPSC_Xm, "Xm",
+ { EPSC_Xm, _T("Xm")},
// RGB Colours
- EPSC_Xa, "Xa",
- EPSC_XA, "XA",
- EPSC_Xx, "Xx",
- EPSC_XX, "XX",
+ { EPSC_Xa, _T("Xa")},
+ { EPSC_XA, _T("XA")},
+ { EPSC_Xx, _T("Xx")},
+ { EPSC_XX, _T("XX")},
// Sentinel
- EPSC_Invalid, "Invalid"
+ { EPSC_Invalid, _T("Invalid")}
};
/********************************************************************************************
@@ -256,7 +257,7 @@
INT32 AI5EPSFilter::EPSHeaderIsOk(ADDR pFileHeader, UINT32 HeaderSize)
{
UINT32 Lines = 0;
- char *Buffer = NULL;
+ TCHAR *Buffer = NULL;
// !PS-Adobe line is ok - check creator line...
CCMemTextFile HeaderFile ( reinterpret_cast<char *> ( pFileHeader ), HeaderSize );
@@ -274,7 +275,7 @@
{
// Get the current line from the file.
HeaderFile.GetLineToken();
- Buffer = const_cast<char *> ( HeaderFile.GetTokenBuf () );
+ Buffer = const_cast<TCHAR *> ( HeaderFile.GetTokenBuf () );
// Ensure that it's OK.
ERROR2IF(Buffer == 0, 0, "Returned buffer from lex file == 0");
@@ -282,42 +283,42 @@
// Increment the line counter.
Lines++;
- if (camStrncmp(Buffer, "%!PS-Adobe", 10) == 0)
+ if (camStrncmp(Buffer, _T("%!PS-Adobe"), 10) == 0)
{
// Now find the %%Creator string.
while ((Lines < 100) && !HeaderFile.eof())
{
HeaderFile.GetLineToken();
- Buffer = const_cast<char *> ( HeaderFile.GetTokenBuf() );
+ Buffer = const_cast<TCHAR *> ( HeaderFile.GetTokenBuf() );
ERROR2IF(Buffer == 0, 0, "Returned buffer from lex file == 0");
Lines++;
// Return TRUE if this file was created by Illustrator, or has been exported
// in Illustrator format.
- if (camStrncmp(Buffer, "%%Creator: Adobe Illustrator(TM) 5", 34) == 0)
+ if (camStrncmp(Buffer, _T("%%Creator: Adobe Illustrator(TM) 5"), 34) == 0)
{
// We definitely want this.
HeaderFile.close();
return 10;
}
- if (camStrncmp(Buffer, "%%Creator:", 10) == 0)
+ if (camStrncmp(Buffer, _T("%%Creator:"), 10) == 0)
{
// Found the creator line - does it contain the word Illustrator?
- if (camStrstr(Buffer, "Illustrator(TM) 5") != NULL)
+ if (camStrstr(Buffer, _T("Illustrator(TM) 5")) != NULL)
{
HeaderFile.close();
return 10;
}
// we'll accept version 7.0 as well
- else if ((camStrstr(Buffer, "Illustrator(TM) 7") != NULL) ||
- (camStrstr(Buffer, "Illustrator(R) 7") != NULL))
+ else if ((camStrstr(Buffer, _T("Illustrator(TM) 7")) != NULL) ||
+ (camStrstr(Buffer, _T("Illustrator(R) 7")) != NULL))
{
HeaderFile.close();
return 10;
}
// Catch FreeHand generated EPS files.
- else if (camStrstr(Buffer, "FreeHand") != NULL)
+ else if (camStrstr(Buffer, _T("FreeHand")) != NULL)
{
HeaderFile.close();
return 8;
@@ -328,7 +329,7 @@
// If we find the compression token then stop the search as we don't want to
// start looking in the compressed data!
- if (camStrncmp(Buffer, "%%Compression:", 14)==0)
+ if (camStrncmp(Buffer, _T("%%Compression:"), 14)==0)
break;
}
@@ -342,7 +343,7 @@
// If we find the compression token then stop the search as we don't want to start
// looking in the compressed data!
- if (camStrncmp(Buffer, "%%Compression:", 14)==0)
+ if (camStrncmp(Buffer, _T("%%Compression:"), 14)==0)
break;
}
@@ -940,7 +941,7 @@
{
BOOL ok = TRUE;
- if (camStrncmp(TokenBuf, "%AI5_BeginGradient", 18) == 0)
+ if (camStrncmp(TokenBuf, _T("%AI5_BeginGradient"), 18) == 0)
{
ENSURE(!mbReadingGradFill, "Already reading a grad fill!");
@@ -969,7 +970,7 @@
// Put the token back onto the input stream to allow the caller to use it.
EPSFile->UngetToken();
}
- else if (camStrncmp(TokenBuf, "%AI5_EndGradient", 16) == 0)
+ else if (camStrncmp(TokenBuf, _T("%AI5_EndGradient"), 16) == 0)
{
ENSURE(mbReadingGradFill, "Not reading a grad fill!");
@@ -1054,19 +1055,19 @@
else if ( camStrncmp ( TokenBuf, _T( "%AI3_EndPattern" ), 15 ) == 0 )
{
// NOP for now.
- INT32 NOP = 0;
+// INT32 NOP = 0;
return TRUE;
}
else if ( camStrncmp ( TokenBuf, _T ( "%AI6_BeginPatternLayer" ), 22 ) == 0 )
{
// NOP for now.
- INT32 NOP = 0;
+// INT32 NOP = 0;
return TRUE;
}
else if (camStrncmp(TokenBuf, _T("%AI6_EndPatternLayer"), 20) == 0)
{
// NOP for now.
- INT32 NOP = 0;
+// INT32 NOP = 0;
return TRUE;
}
@@ -1076,7 +1077,7 @@
/********************************************************************************************
-> char *AI5EPSFilter::GetEPSCommand(EPSCommand Cmd)
+> TCHAR *AI5EPSFilter::GetEPSCommand(EPSCommand Cmd)
Author: Tim_Browse (Xara Group Ltd) <camelotdev@xxxxxxxx>
Created: 28/02/94
@@ -1087,7 +1088,7 @@
********************************************************************************************/
-char *AI5EPSFilter::GetEPSCommand(EPSCommand Cmd)
+TCHAR *AI5EPSFilter::GetEPSCommand(EPSCommand Cmd)
{
INT32 i = 0;
while (AI5Commands[i].Cmd != EPSC_Invalid)
Index: Trunk/XaraLX/wxOil/riffdata.h
===================================================================
--- Trunk/XaraLX/wxOil/riffdata.h (revision 0)
+++ Trunk/XaraLX/wxOil/riffdata.h (revision 1312)
@@ -0,0 +1,115 @@
+// $Id: wxOil/riffdata.h, 1, 01-Jan-2006, Anonymous $
+/* @@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============================
+ */
+// Macros for access to data in RIFF files to aid portability
+
+#ifndef INC_RIFFDATA
+#define INC_RIFFDATA
+
+
+// rules for use:
+// data from structures defined in winoil
iffform.h should alway be access via these macros
+// If the same bit of data is to be used repeatedly, the result should be cached.
+
+// bytes don't have their own macro
+
+#define RIFFDATA_WORD(x) (x)
+#define RIFFDATA_DWORD(x) (x)
+#define RIFFDATA_FOURCC(x) (x)
+
+
+#endif // INC_RIFFDATA
Property changes on: Trunk/XaraLX/wxOil/riffdata.h
___________________________________________________________________
Name: svn:executable
+ *
Index: Trunk/XaraLX/wxOil/xrc/spotfunc.ps
===================================================================
--- Trunk/XaraLX/wxOil/xrc/spotfunc.ps (revision 0)
+++ Trunk/XaraLX/wxOil/xrc/spotfunc.ps (revision 1312)
@@ -0,0 +1,23 @@
+/Spot1{abs exch abs 2 copy add 1 gt{1 sub dup mul exch 1 sub dup mul
+add 1}{dup mul exch dup mul add 1 exch}ifelse sub}bd/Spot2{dup mul
+exch dup mul add 1 exch sub 0 1 clamp}bd/TripleSpot1{2{1 add 2 div
+3 mul dup floor sub 2 mul 1 sub exch}repeat abs exch abs 2 copy add
+1 gt{1 sub dup mul exch 1 sub dup mul add 1}{dup mul exch dup mul add
+1 exch}ifelse sub}def/TripleSpot2{2{1 add 2 div 3 mul dup floor sub
+2 mul 1 sub exch}repeat dup mul exch dup mul add 1 exch sub}def/EllipticalSpot{dup
+5 mul 8 div mul exch dup mul exch add sqrt 1 exch sub}def/Line{pop
+dup mul}def/Square{dup mul exch dup mul 2 copy gt{exch}if pop}bd/Crosshatch{dup
+mul exch dup mul 2 copy lt{exch}if pop 0 1 clamp}bd/Mezzotint{pop pop
+rand 16#3FFFFFFF div 1 sub}bd/Dither{1 add 7.9999 mul cvi exch 1 add
+7.9999 mul cvi 16 mul add <0E 8E 2E AE 06 86 26 A6 0C 8C 2C AC 04 84
+24 A4 CE 4E EE 6E C6 46 E6 66 CC 4C EC 6C C4 44 E4 64 3E BE 1E 9E 36
+B6 16 96 3C BC 1C 9C 34 B4 14 94 FE 7E DE 5E F6 76 D6 56 FC 7C DC 5C
+F4 74 D4 54 01 81 21 A1 09 89 29 A9 03 83 23 A3 0B 8B 2B AB C1 41 E1
+61 C9 49 E9 69 C3 43 E3 63 CB 4B EB 6B 31 B1 11 91 39 B9 19 99 33 B3
+13 93 3B BB 1B 9B F1 71 D1 51 F9 79 D9 59 F3 73 D3 53 FB 7B DB 5B 0D
+8D 2D AD 05 85 25 A5 0F 8F 2F AF 07 87 27 A7 CD 4D ED 6D C5 45 E5 65
+CF 4F EF 6F C7 47 E7 67 3D BD 1D 9D 35 B5 15 95 3F BF 1F 9F 37 B7 17
+97 FD 7D DD 5D F5 75 D5 55 FF 7F DF 5F F7 77 D7 57 02 82 22 A2 0A 8A
+2A AA 00 80 20 A0 08 88 28 A8 C2 42 E2 62 CA 4A EA 6A C0 40 E0 60 C8
+48 E8 68 32 B2 12 92 3A BA 1A 9A 30 B0 10 90 38 B8 18 98 F2 72 D2 52
+FA 7A DA 5A F0 70 D0 50 F8 78 D8 58 > exch get 255 div}bd
Index: Trunk/XaraLX/wxOil/xrc/setup.ps
===================================================================
--- Trunk/XaraLX/wxOil/xrc/setup.ps (revision 0)
+++ Trunk/XaraLX/wxOil/xrc/setup.ps (revision 1312)
@@ -0,0 +1 @@
+
Index: Trunk/XaraLX/wxOil/xrc/prolog.ps
===================================================================
--- Trunk/XaraLX/wxOil/xrc/prolog.ps (revision 0)
+++ Trunk/XaraLX/wxOil/xrc/prolog.ps (revision 1312)
@@ -0,0 +1,361 @@
+/bd{bind def}bind def/ld{load def}bind def/xd{exch def}bind def/sv{save}bd
+/rs{restore}bd/gs{gsave}bd/gr{grestore}bd/bg{begin}bd/en{end}bd/level2
+/languagelevel where{pop languagelevel 2 ge}{false}ifelse def/setseps{
+/v_gseps xd}bd/setplate{/v_plate xd}bd/setkgray{/v_keyg xd}bd/setmono{
+/v_mono xd}bd/rgb2gray{0.109 mul exch 0.586 mul add exch 0.305 mul
+add}bd/cmyk2rgb{3{dup 5 -1 roll add dup 1 gt{pop 1}if 1 exch sub exch}repeat
+pop}bd/rgb2cmyk{3{1.0 exch sub 3 1 roll}repeat 3 copy 2 copy gt{exch}if
+pop 2 copy gt{exch}if pop dup 0.5 gt{0.5 sub dup 3{5 1 roll dup 3 1
+roll sub}repeat 5 1 roll pop}{pop 0}ifelse}bd/cmyk2hsb{3{dup 5 -1 roll
+add 1 exch sub dup 0 lt{pop 0}if exch}repeat pop rgb2hsb}bd/rgb2hsb{setrgbcolor
+currenthsbcolor}bd/readcurve{exch 255.0 mul 0.5 add cvi get 255.0 div}bd
+/rgb2devcmyk{3 copy dup 3 1 roll eq 3 1 roll eq v_keyg 1 eq and and{pop
+pop 1 exch sub 0 0 0 4 -1 roll}{/ucurve where{pop 3{1.0 exch sub 3
+1 roll}repeat 3 copy 2 copy gt{exch}if pop 2 copy gt{exch}if pop dup
+ucurve readcurve exch bcurve readcurve clamp01 3{5 1 roll dup 3 1 roll
+sub clamp01}repeat 5 1 roll pop 4 1 roll ycurve readcurve 4 1 roll
+mcurve readcurve 4 1 roll ccurve readcurve 4 1 roll}{rgb2cmyk}ifelse}ifelse}def
+/rgb2keyG{3 copy dup 3 1 roll eq 3 1 roll eq and{pop pop}{Max3}ifelse
+1 exch sub bcurve readcurve clamp01}bd/rgb2key{Max3 1 exch sub bcurve
+readcurve clamp01}bd/rgb2cyanG{3 copy dup 3 1 roll eq 3 1 roll eq and{pop
+pop pop 0}{rgb2cyan}ifelse}bd/rgb2cyan{3 copy Max3 1 exch sub ucurve
+readcurve 4 1 roll pop pop 1 exch sub exch sub ccurve readcurve clamp01}bd
+/rgb2magentaG{3 copy dup 3 1 roll eq 3 1 roll eq and{pop pop pop 0}{rgb2magenta}ifelse}bd
+/rgb2magenta{3 copy Max3 1 exch sub ucurve readcurve 4 1 roll pop
+1 exch sub 3 1 roll pop sub mcurve readcurve clamp01}bd/rgb2yellowG{3
+copy dup 3 1 roll eq 3 1 roll eq and{pop pop pop 0}{rgb2yellow}ifelse}bd
+/rgb2yellow{3 copy Max3 1 exch sub ucurve readcurve 4 1 roll 1 exch
+sub 4 1 roll pop pop sub ycurve readcurve clamp01}bd/rgb2plategray{v_keyg
+0 eq v_plate v_cpky eq{{rgb2key}{rgb2keyG}ifelse}{v_plate v_cpyl eq{{rgb2yellow}{rgb2yellowG}ifelse}{v_plate
+v_cpmg eq{{rgb2magenta}{rgb2magentaG}ifelse}{v_plate v_cpcy eq{{rgb2cyan}{rgb2cyanG}ifelse}{{rgb2key}{rgb2keyG}ifelse}ifelse}ifelse}ifelse}ifelse
+1 exch sub setgray}bd/dc{0 def}bd/aca{/v_cpnone 0 def/v_cpcy 1 def
+/v_cpyl 2 def/v_cpmg 3 def/v_cpky 4 def/v_gseps 0 def/v_keyg 0 def
+/v_plate v_cpnone def/v_mono 0 def/v_wr dc/v_fc dc/v_fm dc/v_fy dc
+/v_fk dc/v_fg dc/v_fr dc/v_fg dc/v_fb dc/v_sc dc/v_sm dc/v_sy dc/v_sk
+dc/v_sg dc/v_sr dc/v_sg dc/v_sb dc/v_sct 0 def/v_fct 0 def/v_ft 0 def
+/v_cxe 0 def/v_cxm 0 def/v_sa -1 def/v_ea -1 def/sR dc/sG dc/sB dc
+/mR dc/mG dc/mB dc/eR dc/eG dc/eB dc/sC dc/sM dc/sY dc/sK dc/eC dc
+/eM dc/eY dc/eK dc/sH dc/sS dc/sV dc/eH dc/eS dc/eV dc/sGy dc/eGy
+dc/mGy dc/ci_datasrc dc/ci_matrix dc/ci_dataleft dc/ci_buf dc/ci_dataofs
+dc/ci_y dc/rciBuf dc/cbslw dc/cmiBuf dc/cPalette dc/cpci_datasrc dc
+/cpci_matrix dc/cpci_bpp dc/cpci_y dc/cpci_sampsleft dc/cpci_nextcol
+dc/cpci_buf dc/startX dc/startY dc/endX dc/endY dc/endX2 dc/endY2 dc
+/fillX dc/urx dc/ury dc/llx dc/lly dc/incD dc/distance dc/slice dc
+/startangle dc/Steps dc/incH dc/incS dc/incV dc/incR dc/incG dc/incB
+dc/incGy dc 0.25 setlinewidth [] 0 setdash 0 setlinejoin 0 setlinecap}bd
+aca/setplategray{v_plate v_cpky eq{1 exch sub setgray pop pop pop}{v_plate
+v_cpyl eq{pop 1 exch sub setgray pop pop}{v_plate v_cpmg eq{pop pop
+1 exch sub setgray pop}{v_plate v_cpcy eq{pop pop pop 1 exch sub setgray}{1
+exch sub setgray pop pop pop}ifelse}ifelse}ifelse}ifelse}bd/setplatecolor{v_plate
+v_cpky eq{1 exch sub 0 0 0 4 -1 roll setcmykcolor pop pop pop}{v_plate
+v_cpyl eq{pop 1 exch sub 0 0 0 4 2 roll setcmykcolor pop pop}{v_plate
+v_cpmg eq{pop pop 1 exch sub 0 0 0 4 1 roll setcmykcolor pop}{v_plate
+v_cpcy eq{pop pop pop 1 exch sub 0 0 0 setcmykcolor}{1 exch sub 0 0
+0 4 -1 roll setcmykcolor pop pop pop}ifelse}ifelse}ifelse}ifelse}bd
+/setcmykcolor where{pop}{/setcmykcolor{cmyk2rgb setrgbcolor}bd}ifelse
+/setlogcmykcolor{v_gseps 1 eq{v_mono 1 eq{1 exch sub setgray pop pop
+pop}{setcmykcolor}ifelse}{v_mono 1 eq{cmyk2rgb rgb2gray setgray}{setcmykcolor}ifelse}ifelse}bd
+/setlogrgbcolor{v_gseps 1 eq{v_mono 1 eq{rgbtoplategray}{rgb2devcmyk
+setplatecolor}ifelse}{v_mono 1 eq{rgb2gray setgray}{systemdict begin
+setrgbcolor end}ifelse}ifelse}bd/setfillcolor{v_fct 0 eq{v_fc v_fm
+v_fy v_fk setlogcmykcolor}{v_fr v_fg v_fb setlogrgbcolor}ifelse}bd
+/setstrokecolor{v_sct 0 eq{v_sc v_sm v_sy v_sk setlogcmykcolor}{v_sr
+v_sg v_sb setlogrgbcolor}ifelse}bd/setgfillcmyk{v_gseps 1 eq{v_mono
+1 eq{cmyk2rgb rgb2plategray}{cmyk2rgb rgb2devcmyk setplatecolor}ifelse}{v_mono
+1 eq{cmyk2rgb rgb2gray setgray}{setcmykcolor}ifelse}ifelse}bd/setgfillrgb{v_gseps
+1 eq{v_mono 1 eq{rgb2plategray}{rgb2devcmyk setplatecolor}ifelse}{v_mono
+1 eq{rgb2gray setgray}{systemdict begin setrgbcolor end}ifelse}ifelse}bd
+/setgfillhsb{v_gseps 1 eq{v_mono 1 eq{systemdict begin sethsbcolor
+currentrgbcolor end rgb2plategray}{systemdict begin sethsbcolor currentrgbcolor
+end rgb2devcmyk setplatecolor}ifelse}{v_mono 1 eq{systemdict begin
+sethsbcolor currentgray end setgray}{systemdict begin sethsbcolor end}ifelse}ifelse}bd
+/Max{2 copy lt{exch}if pop}bd/Max3{2 copy lt{exch}if pop 2 copy lt{exch}if
+pop}bd/Min{2 copy gt{exch}if pop}bd/Min3{2 copy gt{exch}if pop 2 copy
+gt{exch}if pop}bd/clamp{3 1 roll Max 2 1 roll Min}bd/clamp01{0 Max
+1 Min}bd/Pythag{dup mul exch dup mul add sqrt}bd/ssc{DeviceRGB setcolorspace
+setcolor}bd/ssg{setgray}bd/p_render{}def/p_count 0 def/vis_flag true
+def/DataString 3 string def/DataSrc{currentfile DataString readhexstring
+pop}bd/DataStr1 1 string def/DataStr2 1 string def/DataStr3 1 string
+def/DataSrc1{DataStr1}bd/DataSrc2{DataStr2}bd/DataSrc3{DataStr3}bd
+/colorimage where{pop/ci{colorimage}bd}{/ci{pop pop/ci_datasrc exch
+def matrix invertmatrix/ci_matrix exch def pop/ci_dataleft 0 def/ci_buf()def
+/ci_dataofs 0 def 0 1 3 -1 roll 1 sub{/ci_y exch def dup 0 1 3 -1
+roll 1 sub{0 1 2{pop ci_dataleft 0 eq{ci_datasrc dup length/ci_dataleft
+exch def/ci_buf exch def/ci_dataofs 0 def}if ci_buf ci_dataofs get
+255 div/ci_dataofs ci_dataofs 1 add def/ci_dataleft ci_dataleft 1 sub
+def}for setrgbcolor dup ci_y 3 -1 roll 1 add ci_y 1 add 4 copy 5 1
+roll 4 2 roll 5 -1 roll 1 1 4{pop ci_matrix transform 8 2 roll}for
+m l l l closepath fill}for}for pop}bd}ifelse/rci{/rciBuf 4 index 3
+index mul 7 add 8 div floor cvi string def{currentfile rciBuf readhexstring
+pop}bind false 3 ci}bd/cbsl{2 eq/cbslL2 xd 5 index/cbslw xd translate
+scale 8 [ 3 index 0 0 5 index 0 0 ] cbslL2{/DataStr1 cbslw string def
+currentfile/ASCII85Decode filter/RunLengthDecode filter DataStr1 readstring
+pop pop/DataStr2 cbslw string def currentfile/ASCII85Decode filter
+/RunLengthDecode filter DataStr2 readstring pop pop/DataStr3 cbslw
+string def currentfile/ASCII85Decode filter/RunLengthDecode filter
+DataStr3 readstring pop pop{DataStr1}bind{DataStr2}bind{DataStr3}bind
+true}{/DataSrc load false}ifelse 3 ci}bd/gbsl{2 eq/gbslL2 xd 5 index
+/gbslw xd translate scale 8 [ 3 index 0 0 5 index 0 0 ] gbslL2{/DataStr1
+gbslw string def currentfile/ASCII85Decode filter/RunLengthDecode filter
+DataStr1 readstring pop pop{DataStr1}bind}{/DataStr1 gbslw string def
+currentfile DataSrc1 readhexstring pop pop{DataStr1}bind}ifelse image}bd
+/cmi{/cmiBuf 4 index 3 index mul 7 add 8 div floor cvi string def{currentfile
+cmiBuf readhexstring pop}bind image}bd/cpal{4 mul string/cPalette exch
+def currentfile cPalette readhexstring pop}bd/cpci{/cpci_datasrc exch
+def matrix invertmatrix/cpci_matrix exch def/cpci_bpp exch def cpci_init
+0 1 3 -1 roll 1 sub{/cpci_y exch def dup cpci_bpp 4 eq{cpci_sampsleft
+1 eq{/cpci_sampsleft 0 def}if}if 0 1 3 -1 roll 1 sub{cpci_nextcol dup
+cpci_y 3 -1 roll 1 add cpci_y 1 add 4 copy 5 1 roll 4 2 roll 5 -1 roll
+1 1 4{pop cpci_matrix transform 8 2 roll}for m l l l closepath fill}for}for
+pop}bd/cpci_init{/cpci_sampsleft 0 def}bd/cpci_buf 1 string def/cpci_nextcol{cpci_bpp
+1 eq{cpci_sampsleft 0 eq{currentfile cpci_buf readhexstring pop pop
+/cpci_sampsleft 8 def}if cpci_buf dup 0 get dup 1 and setgray -1 bitshift
+1 exch put/cpci_sampsleft cpci_sampsleft 1 sub def}{cpci_bpp 4 eq{cpci_sampsleft
+0 eq{currentfile cpci_buf readhexstring pop pop/cpci_sampsleft 2 def}if
+cpci_buf 0 get dup 15 and exch -4 bitshift cpci_buf 0 3 -1 roll put
+/cpci_sampsleft cpci_sampsleft 1 sub def}{currentfile cpci_buf readhexstring
+pop 0 get}ifelse 4 mul dup 2 add cPalette exch get 255 div exch dup
+1 add cPalette exch get 255 div exch cPalette exch get 255 div setrgbcolor}ifelse}bd
+/setup1asciiproc{[ currentfile mystring/readhexstring cvx/pop cvx
+] cvx bind}bd/setup1binaryproc{[ currentfile mystring/readstring cvx
+/pop cvx ] cvx bind}bd level2{save/dontloadlevel1 xd}if/iw 0 def/ih
+0 def/im_save 0 def/setupimageproc 0 def/polarity 0 def/smoothflag
+0 def/mystring 0 def/bpc 0 def/beginimage{/im_save save def dup 0 eq{pop
+/setup1binaryproc}{1 eq{/setup1asciiproc}{(error, can't use level2 data acquisition procs for level1)print
+flush}ifelse}ifelse/setupimageproc exch ld/polarity xd/smoothflag xd
+/imat xd/mystring exch string def/bpc xd/ih xd/iw xd}bd/endimage{im_save
+restore}bd/1bitbwcopyimage{1 setgray 0 0 moveto 0 1 rlineto 1 0 rlineto
+0 -1 rlineto closepath fill 0 setgray iw ih polarity imat setupimageproc
+imagemask}bd/1bitcopyimage{setrgbcolor 0 0 moveto 0 1 rlineto 1 0 rlineto
+0 -1 rlineto closepath fill setrgbcolor iw ih polarity imat setupimageproc
+imagemask}bd/1bitmaskimage{setrgbcolor iw ih polarity [iw 0 0 ih 0
+0] setupimageproc imagemask}bd level2{dontloadlevel1 restore}if level2
+not{save/dontloadlevel2 xd}if/setup2asciiproc{currentfile/ASCII85Decode
+filter/RunLengthDecode filter}bd/setup2binaryproc{currentfile/RunLengthDecode
+filter}bd/myimagedict 9 dict dup begin/ImageType 1 def/MultipleDataSource
+false def end def/im_save 0 def/setupimageproc 0 def/polarity 0 def
+/smoothflag 0 def/mystring 0 def/bpc 0 def/ih 0 def/iw 0 def/beginimage{
+/im_save save def dup 2 eq{pop/setup2binaryproc}{dup 3 eq{pop/setup2asciiproc}{0
+eq{/setup1binaryproc}{/setup1asciiproc}ifelse}ifelse}ifelse/setupimageproc
+exch ld{[ 1 0 ]}{[ 0 1 ]}ifelse/polarity xd/smoothflag xd/imat xd/mystring
+exch string def/bpc xd/ih xd/iw xd}bd/endimage{im_save restore}bd/1bitbwcopyimage{1
+ssg 0 0 moveto 0 1 rlineto 1 0 rlineto 0 -1 rlineto closepath fill
+0 ssg myimagedict dup begin/Width iw def/Height ih def/Decode polarity
+def/ImageMatrix imat def/DataSource setupimageproc def/BitsPerComponent
+1 def/Interpolate smoothflag def end imagemask}bd/1bitcopyimage{ssc
+0 0 moveto 0 1 rlineto 1 0 rlineto 0 -1 rlineto closepath fill ssc
+myimagedict dup begin/Width iw def/Height ih def/Decode polarity def
+/ImageMatrix imat def/DataSource setupimageproc def/BitsPerComponent
+1 def/Interpolate smoothflag def end imagemask}bd/1bitmaskimage{ssc
+myimagedict dup begin/Width iw def/Height ih def/Decode polarity def
+/ImageMatrix imat def/DataSource setupimageproc def/BitsPerComponent
+1 def/Interpolate smoothflag def end imagemask}bd level2 not{dontloadlevel2
+restore}if
+level2{save/dontloadlevel1 xd}if/startnoload{{/noload save def}if}bd
+/endnoload{{noload restore}if}bd/testsystemdict{where{systemdict eq{true}{false}ifelse}{false}ifelse}bd
+/ncolors 1 def/colorimage where{pop true}{false}ifelse{/ncolors 0
+statusdict begin/processcolors where{pop pop processcolors}{/deviceinfo
+where{pop deviceinfo/Colors known{pop{deviceinfo/Colors get}}if}if}ifelse
+end def ncolors 0 ne{/colorimage testsystemdict/setcolortransfer testsystemdict
+/currentcolortransfer testsystemdict/currentcmykcolor testsystemdict
+and and and not{/ncolors 0 def}if}if}if ncolors dup 1 ne exch dup 3
+ne exch 4 ne and and{/ncolors 0 def}if ncolors 1 eq dup dup not startnoload{
+/expandbw{expandfactor mul round cvi bwclut exch get 255 div}bd/doclutimage{bwclut
+colorclut pop/bwclut xd bpc dup 8 eq{pop 255}{4 eq{15}{3}ifelse}ifelse
+/expandfactor xd [/expandbw load/exec load dup currenttransfer exch
+] cvx bind settransfer iw ih bpc imat setupimageproc image}bd}if not
+endnoload ncolors dup 3 eq exch 4 eq or dup dup not startnoload{/nullproc{{}}def
+/concatutil{/exec load 7 -1 roll/exec load}bd/defsubclut{1 add getinterval
+def}bd/spconcattransfer{/Dclut exch def/Cclut exch def/Bclut exch def
+/Aclut exch def/ncompute exch ld currentcolortransfer [{Aclut ncompute}concatutil
+] cvx [{Bclut ncompute}concatutil ] cvx [{Cclut ncompute}concatutil
+] cvx [{Dclut ncompute}concatutil ] cvx setcolortransfer}bd/setuprgbcluts{
+/bit3x rgbclut length 3 sub def/bit1x bit3x 3 idiv def/rclut rgbclut
+def/gclut rclut 1 bit3x defsubclut/bclut rclut 2 bit3x defsubclut}bd}if
+not endnoload ncolors 3 eq dup dup not startnoload{/3compute{exch bit3x
+mul round cvi get 255 div}bd/doclutimage{/rgbclut xd pop setuprgbcluts
+/3compute rclut gclut bclut dup spconcattransfer iw ih bpc imat [
+setupimageproc/exec load/dup load dup ] cvx nullproc nullproc true
+3 colorimage}bd}if not endnoload ncolors 4 eq dup dup not startnoload{
+/stuffclut{cmykindex 3 -1 roll put}bd/ftoint{1 exch sub 255 mul round
+cvi}bd/4compute{exch bit4x mul round cvi get 255 div}bd/computecmykclut{setuprgbcluts
+/bit4x rgbclut length 3 idiv 4 mul 4 sub def/cmykclut bit4x 4 add
+string def/cclut cmykclut def/mclut cclut 1 bit4x defsubclut/yclut
+cclut 2 bit4x defsubclut/kclut cclut 3 bit4x defsubclut/cmykindex 0
+def 0 1 bit1x{dup/cmykindex exch bit1x exch sub 4 mul def 3 mul dup
+rclut exch get 255 div exch dup gclut exch get 255 div exch bclut exch
+get 255 div setrgbcolor currentcmykcolor ftoint kclut stuffclut ftoint
+yclut stuffclut ftoint mclut stuffclut ftoint cclut stuffclut}for}bd
+/doclutimage{/rgbclut xd pop invalidcolortable?{computecmykclut}if
+/4compute cclut mclut yclut kclut spconcattransfer iw ih bpc imat
+[ setupimageproc/exec load/dup load dup dup ] cvx nullproc nullproc
+nullproc true 4 colorimage}bd}if not endnoload ncolors 0 eq dup dup
+not startnoload{/lookupandstore{3 mul 3 getinterval putinterval exch
+3 add exch 3 copy}bd/8lookup/lookupandstore ld/4lookup{/byte 1 index
+def -4 bitshift lookupandstore byte 15 and lookupandstore}bd/2lookup{
+/byte 1 index def -6 bitshift lookupandstore byte -4 bitshift 3 and
+lookupandstore byte -2 bitshift 3 and lookupandstore byte 3 and lookupandstore}bd
+/colorexpand{mystringexp 0 rgbclut 3 copy 7 -1 roll/mylookup load
+forall pop pop pop pop pop}bd/createexpandstr{/mystringexp exch mystring
+length mul string def}bd/doclutimage{/rgbclut xd pop/mylookup bpc 8
+eq{3 createexpandstr/8lookup}{bpc 4 eq{6 createexpandstr/4lookup}{12
+createexpandstr/2lookup}ifelse}ifelse ld iw ih bpc imat [ setupimageproc
+/exec load/colorexpand load/exec load] cvx false 3 colorimage}bd}if
+not endnoload/colorimage where{pop true}{false}ifelse dup{/do24image{iw
+ih 8 imat setupimageproc false 3 colorimage}bd}if dup dup startnoload
+not{/rgbtogray{/str xd/len str length def/smlen len 3 idiv def/rstr
+str def/gstr str 1 len 1 sub getinterval def/bstr str 2 len 2 sub getinterval
+def str dup 0 1 smlen 1 sub{dup 3 mul rstr 1 index get .3 mul gstr
+2 index get .59 mul add bstr 3 -1 roll get .11 mul add round cvi put
+dup}for pop 0 smlen getinterval}bd/do24image{iw ih 8 imat [ setupimageproc
+/exec load/rgbtogray load/exec load ] cvx bind image}bd}if endnoload
+/doimage{iw ih 8 imat setupimageproc image}bd level2{dontloadlevel1
+restore}if level2 not{save/dontloadlevel2 xd}if/myappcolorspace/DeviceRGB
+def/rgbclut 0 def/doclutimage{/rgbclut xd pop bpc dup 8 eq{pop 255}{4
+eq{15}{3}ifelse}ifelse/hival xd [/Indexed myappcolorspace hival rgbclut]
+setcolorspace myimagedict dup begin/Width iw def/Height ih def/Decode
+[0 hival] def/ImageMatrix imat def/DataSource setupimageproc def/BitsPerComponent
+bpc def/Interpolate smoothflag def end image}bd/do24image{myappcolorspace
+setcolorspace myimagedict dup begin/Width iw def/Height ih def/Decode
+[0 1 0 1 0 1] def/ImageMatrix imat def/DataSource setupimageproc def
+/BitsPerComponent 8 def/Interpolate smoothflag def end image}bd level2
+not{dontloadlevel2 restore}if
+/NumSteps{dtransform matrix defaultmatrix idtransform Pythag currentscreen
+pop pop 72 exch div div}bd/FindMinSteps{v_ft 4 eq{urx startX sub abs
+llx startX sub abs Max ury startY sub abs lly startY sub abs Max Pythag
+2 3.14159265 mul mul 0}{v_ft 2 eq{endY startY sub endX startX sub Pythag
+endY2 startY sub endX2 startX sub Pythag gt{endY startY sub endX startX
+sub}{endY2 startY sub endX2 startX sub}ifelse}{endY startY sub endX
+startX sub}ifelse}ifelse NumSteps}bd/cxe{/v_cxe exch def}bd/cxm{pop
+/v_cxm exch def}bd/cxmt{pop pop}bd/cxt{pop}bd/S_eoclip{currentflat{{eoclip}stopped{dup
+currentflat exch sub 20 gt{([Error: PathTooComplex; OffendingCommand: eoclip]
)print
+flush exit}{currentflat 2 add setflat}ifelse}{exit}ifelse}loop setflat}bd
+/S_clip{currentflat{{clip}stopped{dup currentflat exch sub 20 gt{([Error: PathTooComplex; OffendingCommand: clip]
)print
+flush exit}{currentflat 2 add setflat}ifelse}{exit}ifelse}loop setflat}bd
+/S_eofill{currentflat{{eofill}stopped{dup currentflat exch sub 20
+gt{([Error: PathTooComplex; OffendingCommand: eofill]
)print flush
+exit}{currentflat 2 add setflat}ifelse}{exit}ifelse}loop setflat}bd
+/gpbbx{pathbbox/ury exch def/urx exch def/lly exch def/llx exch def}bd
+/lineargfill{initgfill{false initgfx/distance endX startX sub endY
+startY sub Pythag def/incD distance Steps div def endY startY sub endX
+startX sub atan newpath llx lly urx ury Bx startX startY translate
+rotate gpbbx eGy ssg newpath llx lly urx ury Bx S_eofill sGy ssg newpath
+llx lly 0 ury Bx S_eofill/fillX 0 def 0 1 Steps 1 sub{stepgfx newpath
+fillX lly fillX incD add dup/fillX exch def ury Bx S_eofill pop}for}if}bd
+/radialgfill{initgfill{false initgfx/distance endX startX sub endY
+startY sub Pythag def/incD distance Steps div def eGy ssg newpath llx
+lly urx ury Bx S_eofill/distance 0 def 0 1 Steps 1 sub{stepgfx newpath
+startX startY distance 0 360 arc closepath distance incD add dup/distance
+exch def 0 rmoveto startX startY distance 0 360 arc closepath S_eofill
+pop}for}if}bd/ellipticgfill{initgfill{true initgfx sGy ssg newpath
+llx lly urx ury Bx S_eofill [ endX startX sub endY startY sub endX2
+startX sub endY2 startY sub startX startY ] concat Steps 1 sub -1 0{stepgfx
+/i exch def 0 0 moveto 0 0 i Steps div 0 360 arc fill}for}if}bd/conicalgfill{initgfill{urx
+startX sub abs llx startX sub abs Max ury startY sub abs lly startY
+sub abs Max Pythag startY endY sub startX endX sub Pythag div/radius
+exch def true initgfx [ endX startX sub endY startY sub startY endY
+sub endX startX sub startX startY ] concat/slice 180 Steps div def
+/startangle 0 def Steps -1 0{pop stepgfx 0 0 moveto 0 0 radius startangle
+neg dup slice add arc fill 0 0 moveto 0 0 radius startangle dup slice
+add dup/startangle exch def arc fill}for}if}bd/initgfill{gpbbx{S_eoclip}{S_clip}ifelse
+startX endX eq startY endY eq and sGy eGy eq or dup{sGy ssg newpath
+llx lly urx ury Bx S_eofill}if not}bd/initgfx{/flag exch def flag{sGy
+eGy/sGy exch def/eGy exch def}if eGy sGy sub abs 256 mul FindMinSteps
+Min 256 Min ceiling 1 Max/Steps exch def eGy sGy sub Steps div/incGy
+exch def sGy/mGy exch def}bd/stepgfx{mGy ssg mGy incGy add/mGy exch
+def}bd/linearfill{initfill{false initfx endX startX sub endY startY
+sub Pythag/distance exch def/incD distance Steps div def endY startY
+sub endX startX sub atan newpath llx lly urx ury Bx startX startY translate
+rotate gpbbx v_cxe 0 eq{eR eG eB setgfillrgb}{eH eS eV setgfillhsb}ifelse
+newpath llx lly urx ury Bx S_eofill v_cxe 0 eq{sR sG sB setgfillrgb}{sH
+sS sV setgfillhsb}ifelse newpath llx lly 0 ury Bx S_eofill/fillX 0
+def 0 1 Steps 1 sub{stepfx newpath fillX lly fillX incD add dup/fillX
+exch def ury Bx S_eofill pop}for}if}bd/radialfill{initfill{false initfx
+endX startX sub endY startY sub Pythag/distance exch def/incD distance
+Steps div def v_cxe 0 eq{eR eG eB setgfillrgb}{eH eS eV setgfillhsb}ifelse
+newpath llx lly urx ury Bx S_eofill/distance 0 def 0 1 Steps 1 sub{stepfx
+newpath startX startY distance 0 360 arc closepath distance incD add
+dup/distance exch def 0 rmoveto startX startY distance 0 360 arc closepath
+S_eofill pop}for}if}bind def/ellipticalfill{initfill{true initfx v_cxe
+0 eq{sR sG sB setgfillrgb}{sH sS sV setgfillhsb}ifelse newpath llx
+lly urx ury Bx S_eofill [ endX startX sub endY startY sub endX2 startX
+sub endY2 startY sub startX startY ] concat Steps 1 sub -1 0{stepfx
+/i exch def 0 0 moveto 0 0 i Steps div 0 360 arc fill}for v_cxe 0
+eq{sR sG sB eR eG eB/sB exch def/sG exch def/sR exch def/eB exch def
+/eG exch def/eR exch def}if}if}bd/conicalfill{initfill{urx startX
+sub abs llx startX sub abs Max ury startY sub abs lly startY sub abs
+Max Pythag startY endY sub startX endX sub Pythag div/radius exch def
+true initfx [ endX startX sub endY startY sub startY endY sub endX
+startX sub startX startY ] concat/slice 180 Steps div def/startangle
+0 def Steps -1 0{pop stepfx 0 0 moveto 0 0 radius startangle neg dup
+slice add arc fill 0 0 moveto 0 0 radius startangle dup slice add dup
+/startangle exch def arc fill}for}if}bd/initfill{gpbbx{S_eoclip}{S_clip}ifelse
+startX endX eq startY endY eq and v_cxe 2 ne sR eR eq sG eG eq and
+sB eB eq and and or dup{sR sG sB setgfillrgb newpath llx lly urx ury
+Bx S_eofill}if not}bd/initfx{/flag exch def v_cxe 0 eq{flag{sR sG sB
+eR eG eB/sB exch def/sG exch def/sR exch def/eB exch def/eG exch def
+/eR exch def}if eR sR sub abs 256 mul eG sG sub abs 256 mul Max eB
+sB sub abs 256 mul Max FindMinSteps Min 256 Min ceiling 1 Max/Steps
+exch def/incR eR sR sub Steps div def/incG eG sG sub Steps div def
+/incB eB sB sub Steps div def sR/mR exch def sG/mG exch def sB/mB
+exch def}{sR sG sB rgb2hsb/sV exch def/sS exch def/sH exch def eR eG
+eB rgb2hsb/eV exch def/eS exch def/eH exch def eH sH sub abs v_cxe
+1 eq{dup 0.5 gt{1 exch sub}if}{dup 0.5 lt{1 exch sub}if}ifelse 256
+mul eS sS sub abs 256 mul Max eV sV sub abs 256 mul Max FindMinSteps
+Min 256 Min ceiling 1 Max/Steps exch def v_cxe 1 eq{/incH eH sH sub
+dup abs 0.5 gt{dup 0 ge{1 sub}{1 add}ifelse}if Steps div def/incS eS
+sS sub Steps div def/incV eV sV sub Steps div def}{/incH eH sH sub
+dup abs 0.5 le{dup 0 ge{1 sub}{1 add}ifelse}if Steps div def/incS eS
+sS sub Steps div def/incV eV sV sub Steps div def}ifelse flag{/sH eH
+/eH sH def def/sS eS/eS sS def def/sV eV/eV sV def def/incH incH neg
+def/incS incS neg def/incV incV neg def}if}ifelse}bd/stepfx{v_cxe 0
+eq{mR mG mB setgfillrgb mR incR add/mR exch def mG incG add/mG exch
+def mB incB add/mB exch def}{sH sS sV setgfillhsb sH incH add dup 0
+le{1 add}{dup 1 ge{1 sub}if}ifelse/sH exch def sS incS add/sS exch
+def sV incV add/sV exch def}ifelse}bd
+/ar{}bd/arr{pop pop pop pop pop pop pop}bd/ae{pop pop pop pop pop
+pop}bd/aoa{pop}bd/apl{pop}bd/apc{}bd/aof{pop pop}bd/aafs{pop pop pop}bd
+/O{pop}bd/R{pop}bd/axop{pop pop pop pop}bd/g{/v_ft 0 def/v_fc 0 def
+/v_fm 0 def/v_fy 0 def 1 exch sub/v_fk exch def/v_fct 0 def}bd/G{
+/v_sc 0 def/v_sm 0 def/v_sy 0 def 1 exch sub/v_sk exch def/v_sct 0
+def}bd/k{/v_fk exch def/v_fy exch def/v_fm exch def/v_fc exch def/v_ft
+0 def/v_fct 0 def}bd/K{/v_sk exch def/v_sy exch def/v_sm exch def/v_sc
+exch def/v_sct 0 def}bd/Xa{/v_fb exch def/v_fg exch def/v_fr exch def
+/v_ft 0 def/v_fct 1 def}bd/XA{/v_sb exch def/v_sg exch def/v_sr exch
+def/v_sct 1 def}bd/a_tc{exch pop 1 exch sub dup 3 -1 roll exch div
+exch dup 4 -1 roll exch div 3 1 roll dup 5 -1 roll exch div 4 1 roll
+5 -1 roll exch div 4 1 roll}bd/x{a_tc k}bd/X{a_tc K}bd/Xx{0 eq{x}{pop
+pop Xa}ifelse}bd/XX{0 eq{X}{pop pop XA}ifelse}bd/awr{/v_wr exch def}bd
+/w{setlinewidth}bd/j{setlinejoin}bd/J{setlinecap}bd/d{setdash}bd/asc{pop
+pop J}bd/aec{pop pop J}bd/csah{pop pop pop}bd/ceah{pop pop pop}bd/cst{pop
+pop}bd/cdp{pop}bd/m{moveto}bd/l{lineto}bd/c{curveto}bd/Bx{4 copy 5
+1 roll 4 2 roll 5 -1 roll m l l l closepath}bd/Cp{Bx clip newpath}bd
+/a_fp{gsave v_wr 0 ne v_ft 0 eq{setfillcolor{eofill}{fill}ifelse}{v_ft
+1 eq{linearfill}{v_ft 2 eq{ellipticalfill}{v_ft 3 eq{radialfill}{v_ft
+4 eq{conicalfill}{v_ft 8 eq{lineargfill}{v_ft 9 eq{ellipticgfill}{v_ft
+10 eq{radialgfill}{conicalgfill}ifelse}ifelse}ifelse}ifelse}ifelse}ifelse}ifelse}ifelse
+grestore}bd/*u{/p_count p_count 1 add def}bd/*U{/p_count p_count 1
+sub def p_count 0 eq{vis_flag{p_render}{newpath}ifelse}if}bd/B{/p_render{a_fp
+setstrokecolor stroke}bd p_count 0 eq{vis_flag{p_render}{newpath}ifelse}if}bd
+/b{closepath B}bd/F{/p_render{a_fp newpath}bd p_count 0 eq{vis_flag{p_render}{newpath}ifelse}if}bd
+/f{closepath F}bd/S{/p_render{setstrokecolor stroke}bd p_count 0 eq{vis_flag{p_render}{newpath}ifelse}if}bd
+/s{closepath S}bd/H{/p_render{newpath}bd p_count 0 eq{vis_flag{p_render}{newpath}ifelse}if}bd
+/h{closepath H}bd/N{H}bd/n{h}bd/cag{dup 7 add/v_ft exch def dup 2
+eq{pop/endY2 exch def/endX2 exch def}{7 eq{pop pop/v_ft 8 def}if}ifelse
+/endY exch def/endX exch def/startY exch def/startX exch def/eGy exch
+def/sGy exch def}bd/caz{dup/v_ft exch def dup 2 eq{pop/endY2 exch def
+/endX2 exch def}{7 eq{pop pop/v_ft 1 def}if}ifelse/endY exch def/endX
+exch def/startY exch def/startX exch def/eB exch def/eG exch def/eR
+exch def/sB exch def/sG exch def/sR exch def}bd/cax{dup/v_ft exch def
+dup 2 eq{pop/endY2 exch def/endX2 exch def}{7 eq{pop pop/v_ft 1 def}if}ifelse
+/endY exch def/endX exch def/startY exch def/startX exch def pop pop
+8 3 roll pop pop/sB exch def/sG exch def/sR exch def/eB exch def/eG
+exch def/eR exch def}bd/axm{/endY exch def/endX exch def/startY exch
+def/startX exch def}bd/alyr{pop pop 1 eq{true}{false}ifelse/vis_flag
+exch def pop pop}bd
+/t{moveto show}bd/ts{moveto false charpath S}bd/tf{moveto true charpath
+F}bd/tb{3 copy moveto true charpath F moveto false charpath S}bd/selectfont
+where{pop}{/selectfont{dup type/integertype eq{exch findfont exch scalefont
+setfont}{exch findfont exch makefont setfont}ifelse}bd}ifelse/sf{selectfont}bd
+/u{}bd/U{}bd/anu{pop}bd
+/csbd{8{pop}repeat}bd/cebd{}bd/csbr{8{pop}repeat}bd/cebr{}bd
Xara