Skip to content
Permalink
Browse files

Update SIP for fixedAspectRatio in SVG marker

  • Loading branch information
rldhont committed Sep 28, 2017
1 parent 48514d2 commit 954d62f53a76e9f083fef1b88de56c7492286be1
@@ -522,23 +522,64 @@ Constructs SVG marker symbol layer with picture from given absolute path to a SV

QString path() const;
%Docstring
Returns the marker SVG path.
.. seealso:: setPath()
:rtype: str
%End

void setPath( const QString &path );
%Docstring
Set the marker SVG path.
\param path SVG path
.. seealso:: path()
%End

double defaultAspectRatio() const;
%Docstring
Returns the default marker aspect ratio between width and height, 0 if not yet calculated.
.. seealso:: updateDefaultAspectRatio()
:rtype: float
%End

double updateDefaultAspectRatio();
%Docstring
Calculates the default marker aspect ratio between width and height.
:return: the default aspect ratio value
.. seealso:: defaultAspectRatio()
:rtype: float
%End

bool preservedAspectRatio() const;
%Docstring
Returns the preserved aspect ratio value, true if fixed aspect ratio has been lower or equal to 0.
.. seealso:: setPreservedAspectRatio()
:rtype: bool
%End

bool setPreservedAspectRatio( bool par );
%Docstring
Set preserved the marker aspect ratio between width and height.
\param par Preserved Aspect Ratio
:return: the preserved aspect ratio value, true if fixed aspect ratio has been lower or equal to 0
.. seealso:: preservedAspectRatio()
:rtype: bool
%End

double fixedAspectRatio() const;
%Docstring
Returns the marker aspect ratio between width and height to be used in rendering,
if the value set is lower or equal to 0 the aspect ratio will be preserved in rendering
.. seealso:: setFixedAspectRatio() QgsSvgCache
:rtype: float
%End
void setFixedAspectRatio( double far );

void setFixedAspectRatio( double ratio );
%Docstring
Set the marker aspect ratio between width and height to be used in rendering,
if the value set is lower or equal to 0 the aspect ratio will be preserved in rendering
\param ratio Fixed Aspect Ratio
.. seealso:: fixedAspectRatio() QgsSvgCache
%End

virtual QColor fillColor() const;
virtual void setFillColor( const QColor &color );
@@ -109,6 +109,7 @@ the parameters 'fill-color', 'pen-color', 'outline-width', 'stroke-width'. E.g.
\param strokeWidth width of stroke
\param widthScaleFactor width scale factor
\param fitsInCache
\param fixedAspectRatio fixed aspect ratio (optional)
:rtype: QImage
%End

@@ -123,6 +124,7 @@ the parameters 'fill-color', 'pen-color', 'outline-width', 'stroke-width'. E.g.
\param strokeWidth width of stroke
\param widthScaleFactor width scale factor
\param forceVectorOutput
\param fixedAspectRatio fixed aspect ratio (optional)
:rtype: QPicture
%End

@@ -136,6 +138,7 @@ the parameters 'fill-color', 'pen-color', 'outline-width', 'stroke-width'. E.g.
\param stroke color of stroke
\param strokeWidth width of stroke
\param widthScaleFactor width scale factor
\param fixedAspectRatio fixed aspect ratio (optional)
:return: viewbox size set in SVG file
.. versionadded:: 2.14
:rtype: QSizeF
@@ -209,6 +212,7 @@ Emit a signal to be caught by qgisapp and display a msg on status bar
\param stroke color of stroke
\param strokeWidth width of stroke
\param widthScaleFactor width scale factor
\param fixedAspectRatio fixed aspect ratio (optional)
:rtype: QgsSvgCacheEntry
%End

@@ -364,11 +364,6 @@ class QgsSvgMarkerSymbolLayerWidget : QgsSymbolLayerWidget
public slots:
void setName( const QModelIndex &idx );
void populateIcons( const QModelIndex &idx );
void setWidth();
void setHeight();
void stateChangedAspectRatio();
void setAngle();
void setOffset();
void on_mFileToolButton_clicked();
void on_mFileLineEdit_textEdited( const QString &text );
void on_mFileLineEdit_editingFinished();

0 comments on commit 954d62f

Please sign in to comment.
You can’t perform that action at this time.