Skip to content

Commit

Permalink
Simple line can cause tile artifacts if it's a dashed line
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Feb 12, 2021
1 parent 080ec98 commit 980d969
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
Expand Up @@ -84,6 +84,8 @@ Creates a new QgsSimpleLineSymbolLayer from an SLD XML DOM ``element``.

virtual QColor dxfColor( QgsSymbolRenderContext &context ) const;

virtual bool canCauseArtifactsBetweenAdjacentTiles() const;


Qt::PenStyle penStyle() const;
%Docstring
Expand Down
2 changes: 1 addition & 1 deletion src/core/project/qgsprojectfiletransform.cpp
Expand Up @@ -635,7 +635,7 @@ void transform1800to1900( QgsProjectFileTransform *pft )
}
}

QgsDebugMsg( pft->dom().toString() );
QgsDebugMsgLevel( pft->dom().toString(), 2 );
}

void transform2200to2300( QgsProjectFileTransform *pft )
Expand Down
5 changes: 5 additions & 0 deletions src/core/symbology/qgslinesymbollayer.cpp
Expand Up @@ -999,6 +999,11 @@ QColor QgsSimpleLineSymbolLayer::dxfColor( QgsSymbolRenderContext &context ) con
return mColor;
}

bool QgsSimpleLineSymbolLayer::canCauseArtifactsBetweenAdjacentTiles() const
{
return mPenStyle != Qt::SolidLine || mUseCustomDashPattern;
}

bool QgsSimpleLineSymbolLayer::alignDashPattern() const
{
return mAlignDashPattern;
Expand Down
1 change: 1 addition & 0 deletions src/core/symbology/qgslinesymbollayer.h
Expand Up @@ -84,6 +84,7 @@ class CORE_EXPORT QgsSimpleLineSymbolLayer : public QgsLineSymbolLayer
double dxfWidth( const QgsDxfExport &e, QgsSymbolRenderContext &context ) const override;
double dxfOffset( const QgsDxfExport &e, QgsSymbolRenderContext &context ) const override;
QColor dxfColor( QgsSymbolRenderContext &context ) const override;
bool canCauseArtifactsBetweenAdjacentTiles() const override;

/**
* Returns the pen style used to render the line (e.g. solid, dashed, etc).
Expand Down

0 comments on commit 980d969

Please sign in to comment.