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

[XaraXtreme-commits] Commit Complete



Commit by  : luke
Repository : xara
Revision   : 1579
Date       : Thu Jul 27 19:50:10 BST 2006

Changed paths:
   M /Trunk/XaraLX/Kernel/bitfilt.h
   M /Trunk/XaraLX/Kernel/bmpexprw.cpp
   M /Trunk/XaraLX/libs/x86/libCDraw.a
   M /Trunk/XaraLX/wxOil/imgmgkft.h

Virtualised CanDoImportDPI and SetImportDPI


Diff:
Index: Trunk/XaraLX/Kernel/bitfilt.h
===================================================================
--- Trunk/XaraLX/Kernel/bitfilt.h	(revision 1578)
+++ Trunk/XaraLX/Kernel/bitfilt.h	(revision 1579)
@@ -304,6 +304,10 @@
 	//This function does the export
 	BOOL ExportImagemap(Operation*, PathName*, Document*);
 
+	// Base do-nothing DPI functions
+	virtual BOOL CanDoImportDPI()				{ return FALSE; }
+	virtual void SetImportDPI(DPI ImportDPI)	{}
+
 protected:
 	// Something to mark if this is a meant as a Preview Bitmap or not
 	BOOL IsPreviewBitmap;
Index: Trunk/XaraLX/Kernel/bmpexprw.cpp
===================================================================
--- Trunk/XaraLX/Kernel/bmpexprw.cpp	(revision 1578)
+++ Trunk/XaraLX/Kernel/bmpexprw.cpp	(revision 1579)
@@ -2830,9 +2830,8 @@
 			if (pImportFilter != NULL)
 			{
 				// Setup import DPI from export options (this means we get the same resolution bitmap from
-				// a PDF.
-				if( pImportFilter->IS_KIND_OF( ImageMagickFilter ) )
-					((ImageMagickFilter *)pImportFilter)->SetImportDPI( pOptions->GetDPI() );
+				// a PDF)
+				((ImageMagickFilter *)pImportFilter)->SetImportDPI( pOptions->GetDPI() );
 
 				// Set the preview bitmap flag to avoid adding the bitmap to the global bitmap list
 				((BaseBitmapFilter *)pImportFilter)->SetPreviewBitmap(TRUE);
Index: Trunk/XaraLX/libs/x86/libCDraw.a
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: Trunk/XaraLX/wxOil/imgmgkft.h
===================================================================
--- Trunk/XaraLX/wxOil/imgmgkft.h	(revision 1578)
+++ Trunk/XaraLX/wxOil/imgmgkft.h	(revision 1579)
@@ -229,14 +229,15 @@
 	virtual BOOL CanDoTransparency() { return HasFlag(IM_EX_MASK); }
 	virtual BOOL CanDoInterlace() { return HasFlag(IM_EX_INTERLACE); }
 	virtual BOOL CanDoAlpha() { return HasFlag(IM_EX_ALPHA); }
-	virtual BOOL CanDoImportDPI() { return HasFlag(IM_IM_DPI); }
 	virtual BOOL CanDoImport() { return HasFlag(IM_IMPORT); }
 	virtual BOOL CanDoExport() { return HasFlag(IM_EXPORT); }
 	virtual wxString GetTag() { return _T("mmif"); }
 	virtual TCHAR * GetExtension() { return _T("mmif"); }
 	virtual INT32 GetCompatibility() { return 10; }
 
-	virtual void SetImportDPI(INT32 ImportDPI) {m_ImportDPI = ImportDPI;}
+	// Overide the DPI functions
+	virtual BOOL CanDoImportDPI() { return HasFlag(IM_IM_DPI); }
+	virtual void SetImportDPI(DPI ImportDPI) {m_ImportDPI = ImportDPI;}
 
 	// Virtual overrides
 	virtual UINT32 GetExportMsgID();
@@ -303,7 +304,7 @@
 	UINT32 Export2ndStageMsgID;
 
 	ImageMagickFlags m_Capabilities;
-	INT32 m_ImportDPI;
+	DPI m_ImportDPI;
 
 	CCDiskFile * TempFile;
 	wxString TempFileName;


Xara