Skip to content

Commit

Permalink
Dox++
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 28, 2019
1 parent 1ef5b1f commit 9bc9808
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
Expand Up @@ -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/;
Expand Down Expand Up @@ -1995,15 +1995,16 @@ 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

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
Expand Down
16 changes: 8 additions & 8 deletions src/core/symbology/qgsfillsymbollayer.cpp
Expand Up @@ -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()
Expand Down
8 changes: 4 additions & 4 deletions src/core/symbology/qgsfillsymbollayer.h
Expand Up @@ -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 );

Expand Down Expand Up @@ -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()
*/
Expand Down

0 comments on commit 9bc9808

Please sign in to comment.