This commit is contained in:
Nyall Dawson 2019-10-28 12:02:38 +10:00
parent 1ef5b1f4c2
commit 9bc9808e4e
3 changed files with 16 additions and 15 deletions

View File

@ -1930,7 +1930,7 @@ A fill symbol layer which places markers at random locations within polygons.
Constructor for QgsRandomMarkerFillSymbolLayer, with the specified ``pointCount``.
Optionally a specific random number ``seed`` can be used when generating points. A ``seed`` of 0 indicates that
a truly random sequence should be used.
a truly random sequence will be used on every rendering, causing points to appear in different locations with every map refresh.
%End
static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
@ -1995,7 +1995,7 @@ Sets the ``count`` of random points to render in the fill.
unsigned long seed() const;
%Docstring
Returns the random number seed to use when generating points, or 0 if
a truly random sequence should be used.
a truly random sequence will be used (causing points to appear in different locations with every map refresh).
.. seealso:: :py:func:`setSeed`
%End
@ -2003,7 +2003,8 @@ a truly random sequence should be used.
void setSeed( unsigned long seed );
%Docstring
Sets the random number ``seed`` to use when generating points, or 0 if
a truly random sequence should be used.
a truly random sequence will be used on every rendering (causing points to appear
in different locations with every map refresh).
.. seealso:: :py:func:`seed`
%End

View File

@ -4091,14 +4091,14 @@ QgsStringMap QgsRandomMarkerFillSymbolLayer::properties() const
QgsRandomMarkerFillSymbolLayer *QgsRandomMarkerFillSymbolLayer::clone() const
{
std::unique_ptr< QgsRandomMarkerFillSymbolLayer > x = qgis::make_unique< QgsRandomMarkerFillSymbolLayer >( mPointCount, mSeed );
x->mAngle = mAngle;
x->mColor = mColor;
x->mClipPoints = mClipPoints;
x->setSubSymbol( mMarker->clone() );
copyDataDefinedProperties( x.get() );
copyPaintEffect( x.get() );
return x.release();
std::unique_ptr< QgsRandomMarkerFillSymbolLayer > res = qgis::make_unique< QgsRandomMarkerFillSymbolLayer >( mPointCount, mSeed );
res->mAngle = mAngle;
res->mColor = mColor;
res->mClipPoints = mClipPoints;
res->setSubSymbol( mMarker->clone() );
copyDataDefinedProperties( res.get() );
copyPaintEffect( res.get() );
return res.release();
}
QgsSymbol *QgsRandomMarkerFillSymbolLayer::subSymbol()

View File

@ -1738,7 +1738,7 @@ class CORE_EXPORT QgsRandomMarkerFillSymbolLayer : public QgsFillSymbolLayer
* Constructor for QgsRandomMarkerFillSymbolLayer, with the specified \a pointCount.
*
* Optionally a specific random number \a seed can be used when generating points. A \a seed of 0 indicates that
* a truly random sequence should be used.
* a truly random sequence will be used on every rendering, causing points to appear in different locations with every map refresh.
*/
QgsRandomMarkerFillSymbolLayer( int pointCount = 10, unsigned long seed = 0 );
@ -1787,15 +1787,15 @@ class CORE_EXPORT QgsRandomMarkerFillSymbolLayer : public QgsFillSymbolLayer
/**
* Returns the random number seed to use when generating points, or 0 if
* a truly random sequence should be used.
*
* a truly random sequence will be used (causing points to appear in different locations with every map refresh).
* \see setSeed()
*/
unsigned long seed() const;
/**
* Sets the random number \a seed to use when generating points, or 0 if
* a truly random sequence should be used.
* a truly random sequence will be used on every rendering (causing points to appear
* in different locations with every map refresh).
*
* \see seed()
*/