r15548 by fschmid - Better fix for Bug #9397: "Wrong order of xmax and ymax in eps bounding box"

scribus-commit scribus-commit at lists.scribus.net
Sat Oct 16 12:03:31 CEST 2010


Author: fschmid
Date: Sat Oct 16 10:03:31 2010
New Revision: 15548

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=15548
Log:
Better fix for Bug #9397: "Wrong order of xmax and ymax in eps bounding box"

Modified:
    trunk/Scribus/scribus/pslib.cpp
    trunk/Scribus/scribus/pslib.h

Modified: trunk/Scribus/scribus/pslib.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15548&path=/trunk/Scribus/scribus/pslib.cpp
==============================================================================
--- trunk/Scribus/scribus/pslib.cpp (original)
+++ trunk/Scribus/scribus/pslib.cpp Sat Oct 16 10:03:31 2010
@@ -77,7 +77,7 @@
 	Header = psart ? "%!PS-Adobe-3.0\n" : "%!PS-Adobe-3.0 EPSF-3.0\n";
 	BBox = "";
 	BBoxH = "";
-	Art = psart;
+	psExport = psart;
 	isPDF = pdf;
 	UsedFonts.clear();
 	Fonts = "";
@@ -427,17 +427,17 @@
 	PutStream("%%Title: " + Titel + "\n");
 	PutStream("%%Creator: " + Creator + "\n");
 	PutStream("%%Pages: " + IToStr(numpage) + "\n");
-//	if(breite<hoehe)
-//	{
+	if(breite < hoehe || !psExport)
+	{
 		BBox = "%%BoundingBox: " + IToStr(qRound(x)) + " " + IToStr(qRound(y)) + " " + IToStr(qRound(breite)) + " " + IToStr(qRound(hoehe)) + "\n";
 		BBoxH = "%%HiResBoundingBox: " + ToStr(x) + " " + ToStr(y) + " " + ToStr(breite) + " " + ToStr(hoehe) + "\n";
-//	}
-/*	else
+	}
+	else
 	{
 		
 		BBox = "%%BoundingBox: " + IToStr(qRound(x)) + " " + IToStr(qRound(y)) + " " + IToStr(qRound(hoehe)) + " " + IToStr(qRound(breite)) + "\n";
 		BBoxH = "%%HiResBoundingBox: " + ToStr(x) + " " + ToStr(y) + " " + ToStr(hoehe) + " " + ToStr(breite) + "\n";
-	} */
+	}
  // 	if (!Art)
 //	{
 		PutStream(BBox);
@@ -624,7 +624,7 @@
 	PutStream("%%Page: " + IToStr(Seiten) + " " + IToStr(Seiten) + "\n");
 	PutStream("%%PageOrientation: ");
 // when creating EPS files determine the orientation from the bounding box
-  	if (!Art)
+  	if (!psExport)
 	{
 		if ((pg->width() - Ma->Left - Ma->Right) <= (pg->height() - Ma->Bottom - Ma->Top))
 			PutStream("Portrait\n");
@@ -647,13 +647,13 @@
 		}
 	}
 	PutStream("Scribusdict begin\n");
-	if ((Art) && (Options.setDevParam))
+	if ((psExport) && (Options.setDevParam))
   	{
 		PutStream("<< /PageSize [ "+ToStr(maxBoxX)+" "+ToStr(maxBoxY)+" ]\n");
 		PutStream(">> setpagedevice\n");
 	}
 	PutStream("save\n");
-	if(pg->orientation() == 1)
+	if (pg->orientation() == 1 && psExport)
 		PutStream("90 rotate 0 "+IToStr(qRound(maxBoxY))+" neg translate\n");
   	PutStream("/DeviceCMYK setcolorspace\n");
 	PutStream(ToStr(bleedLeft+markOffs)+" "+ToStr(Options.bleeds.Bottom+markOffs)+" tr\n");
@@ -1498,7 +1498,7 @@
 	if (usingGUI)
 	{
 		QString title=QObject::tr("Exporting PostScript File");
-		if (Art)
+		if (psExport)
 			title=QObject::tr("Printing File");
 		progressDialog=new MultiProgressDialog(title, CommonStrings::tr_Cancel, Doc->scMW());
 		if (progressDialog==0)
@@ -1524,7 +1524,7 @@
 	}
 	//if ((!Art) && (view->SelItem.count() != 0))
 	uint docSelectionCount=Doc->m_Selection->count();
-	if ((!Art) && (docSelectionCount != 0))
+	if ((!psExport) && (docSelectionCount != 0))
 	{
 		double minx = 999999.9;
 		double miny = 999999.9;
@@ -1650,7 +1650,7 @@
 		a = pageNs[aa]-1;
 		Page* page = Doc->Pages->at(a);
 		//if ((!Art) && (view->SelItem.count() != 0))
-		if ((!Art) && (Doc->m_Selection->count() != 0))
+		if ((!psExport) && (Doc->m_Selection->count() != 0))
 		{
 			MarginStruct Ma;
 			Ma.Left = gx;
@@ -2742,7 +2742,7 @@
 				if ((!a->pageName().isEmpty()) && (c->asImageFrame()) && ((sep) || (!farb)))
 					continue;
 				//if ((!Art) && (view->SelItem.count() != 0) && (!c->Select))
-				if ((!Art) && (!c->isSelected()) && (Doc->m_Selection->count() != 0))
+				if ((!psExport) && (!c->isSelected()) && (Doc->m_Selection->count() != 0))
 					continue;
 				double bLeft, bRight, bBottom, bTop;
 				GetBleeds(a, bLeft, bRight, bBottom, bTop);
@@ -3088,7 +3088,7 @@
 			if ((!page->pageName().isEmpty()) && (item->asImageFrame()) && ((sep) || (!farb)))
 				continue;
 			//if ((!Art) && (view->SelItem.count() != 0) && (!c->Select))
-			if ((!Art) && (!item->isSelected()) && (Doc->m_Selection->count() != 0))
+			if ((!psExport) && (!item->isSelected()) && (Doc->m_Selection->count() != 0))
 				continue;
 			double bLeft, bRight, bBottom, bTop;
 			GetBleeds(page, bLeft, bRight, bBottom, bTop);

Modified: trunk/Scribus/scribus/pslib.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15548&path=/trunk/Scribus/scribus/pslib.h
==============================================================================
--- trunk/Scribus/scribus/pslib.h (original)
+++ trunk/Scribus/scribus/pslib.h Sat Oct 16 10:03:31 2010
@@ -140,7 +140,7 @@
 		virtual void SetColor(const ScColor& color, double shade, int *h, int *s, int *v, int *k, bool gcr);
 		virtual void setTextSt(ScribusDoc* Doc, PageItem* ite, bool gcr, uint a, Page* pg, bool sep, bool farb, bool ic, bool master);
 		virtual void setTextCh(ScribusDoc* Doc, PageItem* ite, double x, double y, bool gcr, uint a, uint d, ScText *hl, const ParagraphStyle& pstyle, Page* pg, bool sep, bool farb, bool ic, bool master);
-		bool Art;
+		bool psExport;
 
 	private:
 




More information about the scribus-commit mailing list