r22090 by jghali -
scribus-commit
scribus-commit at lists.scribus.net
Thu Jun 29 00:03:57 UTC 2017
Author: jghali
Date: Thu Jun 29 00:03:56 2017
New Revision: 22090
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22090
Log:
ScPainterExBase::setupPolygon(): use const qualifier on FPointArray argument
Modified:
trunk/Scribus/scribus/scpainterex_cairo.cpp
trunk/Scribus/scribus/scpainterex_cairo.h
trunk/Scribus/scribus/scpainterex_ps2.cpp
trunk/Scribus/scribus/scpainterex_ps2.h
trunk/Scribus/scribus/scpainterexbase.h
Modified: trunk/Scribus/scribus/scpainterex_cairo.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22090&path=/trunk/Scribus/scribus/scpainterex_cairo.cpp
==============================================================================
--- trunk/Scribus/scribus/scpainterex_cairo.cpp (original)
+++ trunk/Scribus/scribus/scpainterex_cairo.cpp Thu Jun 29 00:03:56 2017
@@ -493,9 +493,10 @@
void ScPainterEx_Cairo::strokePathHelper()
{
cairo_save( m_cr );
+ cairo_set_operator(m_cr, CAIRO_OPERATOR_OVER);
cairo_set_line_width( m_cr, m_lineWidth );
if( m_array.count() > 0 )
- cairo_set_dash( m_cr, m_array.data(), m_array.count(), static_cast<double>(m_offset));
+ cairo_set_dash( m_cr, m_array.data(), m_array.count(), m_offset);
else
cairo_set_dash( m_cr, NULL, 0, 0 );
cairo_set_operator(m_cr, CAIRO_OPERATOR_OVER);
@@ -528,8 +529,8 @@
setRasterOp(m_blendModeStroke);
cairo_stroke_preserve( m_cr );
}
+ cairo_restore( m_cr );
cairo_set_operator(m_cr, CAIRO_OPERATOR_OVER);
- cairo_restore( m_cr );
}
void ScPainterEx_Cairo::setClipPath()
@@ -551,7 +552,7 @@
cairo_restore(m_cr);
}
-void ScPainterEx_Cairo::setupPolygon(FPointArray *points, bool closed)
+void ScPainterEx_Cairo::setupPolygon(const FPointArray *points, bool closed)
{
bool nPath = true, first = true;
FPoint np, np1, np2, np3, np4, firstP;
Modified: trunk/Scribus/scribus/scpainterex_cairo.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22090&path=/trunk/Scribus/scribus/scpainterex_cairo.h
==============================================================================
--- trunk/Scribus/scribus/scpainterex_cairo.h (original)
+++ trunk/Scribus/scribus/scpainterex_cairo.h Thu Jun 29 00:03:56 2017
@@ -68,7 +68,7 @@
virtual void setClipPath();
virtual void drawImage( ScImage *image, ScPainterExBase::ImageMode mode );
- virtual void setupPolygon(FPointArray *points, bool closed = true);
+ virtual void setupPolygon(const FPointArray *points, bool closed = true);
virtual void drawPolygon();
virtual void drawPolyLine();
virtual void drawLine(FPoint start, FPoint end);
Modified: trunk/Scribus/scribus/scpainterex_ps2.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22090&path=/trunk/Scribus/scribus/scpainterex_ps2.cpp
==============================================================================
--- trunk/Scribus/scribus/scpainterex_ps2.cpp (original)
+++ trunk/Scribus/scribus/scpainterex_ps2.cpp Thu Jun 29 00:03:56 2017
@@ -882,7 +882,7 @@
m_stream << "\n>\n";
}
-void ScPainterEx_Ps2::setupPolygon(FPointArray *points, bool closed)
+void ScPainterEx_Ps2::setupPolygon(const FPointArray *points, bool closed)
{
bool nPath = true;
FPoint np, np1, np2, np3;
@@ -1367,7 +1367,7 @@
}
}
-void ScPainterEx_Ps2::getPathBoundingBox( FPointArray* points, QRect& r )
+void ScPainterEx_Ps2::getPathBoundingBox(const FPointArray* points, QRect& r )
{
FPoint point;
double bottom = DBL_MAX, top = DBL_MIN;
Modified: trunk/Scribus/scribus/scpainterex_ps2.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22090&path=/trunk/Scribus/scribus/scpainterex_ps2.h
==============================================================================
--- trunk/Scribus/scribus/scpainterex_ps2.h (original)
+++ trunk/Scribus/scribus/scpainterex_ps2.h Thu Jun 29 00:03:56 2017
@@ -129,7 +129,7 @@
virtual bool hasAlphaChannel( ScImage* image );
- virtual void setupPolygon(FPointArray *points, bool closed = true);
+ virtual void setupPolygon(const FPointArray *points, bool closed = true);
virtual void drawPolygon();
virtual void drawPolyLine();
virtual void drawLine(FPoint start, FPoint end);
@@ -194,7 +194,7 @@
void drawCircularGradient( VGradientEx& gradient, const QRect& rect );
void drawCircularGradient_RGB( VGradientEx& gradient, const QRect& rect );
void drawCircularGradient_CMYK( VGradientEx& gradient, const QRect& rect );
- void getPathBoundingBox( FPointArray* points, QRect& r );
+ void getPathBoundingBox(const FPointArray* points, QRect& r );
void transformPoint( const FPoint& in, FPoint& out );
void transformPoints( const FPoint* in, FPoint* out, uint length );
Modified: trunk/Scribus/scribus/scpainterexbase.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22090&path=/trunk/Scribus/scribus/scpainterexbase.h
==============================================================================
--- trunk/Scribus/scribus/scpainterexbase.h (original)
+++ trunk/Scribus/scribus/scpainterexbase.h Thu Jun 29 00:03:56 2017
@@ -107,7 +107,7 @@
virtual void setClipPath() = 0;
virtual void drawImage( ScImage *image, ScPainterExBase::ImageMode mode ) = 0;
- virtual void setupPolygon(FPointArray *points, bool closed = true) = 0;
+ virtual void setupPolygon(const FPointArray *points, bool closed = true) = 0;
virtual void drawPolygon() = 0;
virtual void drawPolyLine() = 0;
virtual void drawLine(FPoint start, FPoint end) = 0;
More information about the scribus-commit
mailing list