Skip to content

Commit

Permalink
Make sure fill pattern conversion is hidpi friendly
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn authored and nyalldawson committed Sep 14, 2020
1 parent 1de8d01 commit 4fe3d2f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/vectortile/qgsmapboxglstyleconverter.cpp
Expand Up @@ -343,6 +343,8 @@ bool QgsMapBoxGlStyleConverter::parseFillLayer( const QVariantMap &jsonLayer, Qg
// when fill-pattern exists, set and insert QgsRasterFillSymbolLayer
QgsRasterFillSymbolLayer *rasterFill = new QgsRasterFillSymbolLayer();
rasterFill->setImageFilePath( sprite );
rasterFill->setWidth( spriteSize.width() );
rasterFill->setWidthUnit( context.targetUnit() );
rasterFill->setCoordinateMode( QgsRasterFillSymbolLayer::Viewport );

if ( rasterOpacity >= 0 )
Expand All @@ -353,6 +355,7 @@ bool QgsMapBoxGlStyleConverter::parseFillLayer( const QVariantMap &jsonLayer, Qg
if ( !spriteProperty.isEmpty() )
{
ddRasterProperties.setProperty( QgsSymbolLayer::PropertyFile, QgsProperty::fromExpression( spriteProperty ) );
ddRasterProperties.setProperty( QgsSymbolLayer::PropertyWidth, QgsProperty::fromExpression( spriteSizeProperty ) );
}

rasterFill->setDataDefinedProperties( ddRasterProperties );
Expand Down

0 comments on commit 4fe3d2f

Please sign in to comment.