r23007 by craig - Code cleanup

scribus-commit scribus-commit at lists.scribus.net
Fri Jun 7 21:29:40 UTC 2019


Author: craig
Date: Fri Jun  7 21:29:40 2019
New Revision: 23007

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23007
Log:
Code cleanup

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

Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23007&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp	(original)
+++ trunk/Scribus/scribus/pageitem.cpp	Fri Jun  7 21:29:40 2019
@@ -1777,7 +1777,7 @@
 		return;*/
 	if (cullingArea.isNull())
 	{
-		cullingArea = QRectF(QPointF(m_Doc->minCanvasCoordinate.x(), m_Doc->minCanvasCoordinate.y()), 
+		cullingArea = QRectF(QPointF(m_Doc->minCanvasCoordinate.x(), m_Doc->minCanvasCoordinate.y()),
 							 QPointF(m_Doc->maxCanvasCoordinate.x(), m_Doc->maxCanvasCoordinate.y())).toAlignedRect();
 	}
 
@@ -9252,7 +9252,7 @@
 	return extraSpace;
 }
 
-bool PageItem::pointWithinItem(const int x, const int y) const
+bool PageItem::pointWithinItem(int x, const int y) const
 {
 	const_cast<PageItem*>(this)-> setRedrawBounding();
 	// FIXME: We should be rounding or truncating here, not letting the compiler do it.

Modified: trunk/Scribus/scribus/pageitem.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23007&path=/trunk/Scribus/scribus/pageitem.h
==============================================================================
--- trunk/Scribus/scribus/pageitem.h	(original)
+++ trunk/Scribus/scribus/pageitem.h	Fri Jun  7 21:29:40 2019
@@ -231,7 +231,7 @@
 public: // Start public functions
 
 	PageItem(ScribusDoc *pa, ItemType newType, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline);
-	virtual ~PageItem();
+	~PageItem() override;
 
 	/* these do essentially the same as a dynamic cast but might be more readable */
 	virtual PageItem_Arc * asArc()							{ return nullptr; } ///< Return self if Arc item, otherwise null
@@ -279,14 +279,14 @@
 
 	//<< ********* Functions related to drawing the item *********
 
-	void DrawObj(ScPainter *p, QRectF e);
+	void DrawObj(ScPainter *p, QRectF cullingArea);
 	void DrawObj_Pre(ScPainter *p);
 	virtual void DrawObj_Post(ScPainter *p);
 	virtual void DrawObj_Decoration(ScPainter *p);
 	virtual void DrawObj_Item(ScPainter *p, QRectF e) = 0;
 	QImage DrawObj_toImage(double maxSize, int options = 0);
 	QImage DrawObj_toImage(QList<PageItem*> &emG, double scaling);
-	void DrawObj_Embedded(ScPainter *p, QRectF e, const CharStyle& style, PageItem* cembedded);
+	void DrawObj_Embedded(ScPainter *p, QRectF cullingArea, const CharStyle& style, PageItem* cembedded);
 	void DrawStrokePattern(ScPainter *p, QPainterPath &path);
 	void DrawSoftShadow(ScPainter *p);
 	/**
@@ -333,7 +333,7 @@
 		  @param y Y position
 	   * @return bool true if x, i in the item
 	   */
-	bool pointWithinItem(const int x, const int y) const;
+	bool pointWithinItem(int x, int y) const;
 	/**
 	   * @brief Check if the mouse is within the items boundaries
 	   * This method performs necessary page to device transformations




More information about the scribus-commit mailing list