[Qgis-developer] polygon symbology fill style blurry in mapcomposer when called from python

Robert Denham rjadenham at gmail.com
Wed Aug 28 17:39:08 PDT 2013


Hi, I'm trying to generate a pdf via pyqgis using QgsComposition. Its going
ok, but I've got a little problem with polygon fill symbology. Any of the
fill styles such as 'cross', 'horizontal', 'diagonal_x' when used in a
polygon show up blurry in the output (all other linework is sharp).
Here is how I'm setting the symbology:

    layer = QgsVectorLayer(cropProbVectorFilename, "probcrop", "ogr")
    symbol = QgsFillSymbolV2.createSimple({QString('style'):
QString('diagonal_x'),
                                           QString('color'):
QString('0,0,0,255'),

QString('style_border'):QString('solid')})

    layer.setRendererV2( QgsSingleSymbolRendererV2( symbol ) )

    QgsMapLayerRegistry.instance().addMapLayer(layer)
    layerset.append(layer.getLayerID())
    ....
    myMapRenderer = QgsMapRenderer()
    myMapRenderer.setProjectionsEnabled(True)

    myMapRenderer.setLayerSet(layerset)
    comp = QgsComposition(myMapRenderer)
    comp.setPlotStyle(QgsComposition.Print)



Is there something in the symbol I can set to correct this, or perhaps its
in the composer?

Thanks

Robert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20130829/0e405ef1/attachment.html>


More information about the Qgis-developer mailing list