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

[XaraXtreme-commits] Commit Complete



Commit by  : luke
Repository : xara
Revision   : 1493
Date       : Fri Jul 21 10:35:50 BST 2006

Changed paths:
   M /Trunk/XaraLX/Kernel/bmpexprw.cpp

Add text to empty preview boxes when format not suitable for preview


Diff:
Index: Trunk/XaraLX/Kernel/bmpexprw.cpp
===================================================================
--- Trunk/XaraLX/Kernel/bmpexprw.cpp	(revision 1492)
+++ Trunk/XaraLX/Kernel/bmpexprw.cpp	(revision 1493)
@@ -1855,6 +1855,14 @@
 								DocCoord(VirtualSize.lo.x + Width/2, VirtualSize.hi.y));
 			m_pRender->DrawLine(DocCoord(VirtualSize.lo.x, VirtualSize.lo.y + Height/2),
 								DocCoord(VirtualSize.hi.x, VirtualSize.lo.y + Height/2));
+
+			// Now display can't preview text
+			String_128		str( _T("Preview is not supported for this image format") );
+			DocRect			rect;
+			m_pRender->GetFixedSystemTextSize( &str, &rect );
+			rect.Translate( VirtualSize.lo.x + ( Width / 2 ) - ( rect.Width() / 2 ),
+						    VirtualSize.lo.y + ( Height / 2 ) - ( rect.Height() / 2 ) );
+			m_pRender->DrawFixedSystemText( &str, rect );
 		}
 
 		m_pRender->RestoreContext();


Xara