r23417 by jghali - Tighter and more precise clip for line items

scribus-commit scribus-commit at lists.scribus.net
Tue Dec 10 09:23:28 UTC 2019


Author: jghali
Date: Tue Dec 10 09:23:28 2019
New Revision: 23417

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23417
Log:
Tighter and more precise clip for line items

Modified:
    trunk/Scribus/scribus/pageitem_line.cpp

Modified: trunk/Scribus/scribus/pageitem_line.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23417&path=/trunk/Scribus/scribus/pageitem_line.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_line.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_line.cpp	Tue Dec 10 09:23:28 2019
@@ -176,11 +176,11 @@
 
 void PageItem_Line::setLineClip()
 {
-	int ph = static_cast<int>(qMax(1.0, m_lineWidth / 2.0));
-	Clip.setPoints(4, -ph,-ph,
-	                  static_cast<int>(width() + ph), -ph,
-	                  static_cast<int>(width() + ph), static_cast<int>(height() + ph),
-	                  -ph, static_cast<int>(height() + ph));
+	int ph = static_cast<int>(qMax(1.0, this->visualLineWidth() / 2.0));
+	Clip.setPoints(4, -1.0, -ph,
+	                  static_cast<int>(width() + 1.0), -ph,
+	                  static_cast<int>(width() + 1.0), ph,
+	                  -1.0, ph);
 }
 
 void PageItem_Line::getBoundingRect(double *x1, double *y1, double *x2, double *y2) const




More information about the scribus-commit mailing list