Skip to content
Permalink
Browse files

Use transparent background color for symbol / symbol layer preview

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14811 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder
wonder committed Nov 30, 2010
1 parent ad69c00 commit 082948619ccac3ae51a73295a9f24f8845c93f7f
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/symbology-ng/qgssymbollayerv2utils.cpp
@@ -226,10 +226,10 @@ QPixmap QgsSymbolLayerV2Utils::symbolPreviewPixmap( QgsSymbolV2* symbol, QSize s
Q_ASSERT( symbol );

QPixmap pixmap( size );
pixmap.fill( Qt::transparent );
QPainter painter;
painter.begin( &pixmap );
painter.setRenderHint( QPainter::Antialiasing );
painter.eraseRect( QRect( QPoint( 0, 0 ), size ) );
symbol->drawPreviewIcon( &painter, size );
painter.end();
return pixmap;
@@ -239,10 +239,10 @@ QPixmap QgsSymbolLayerV2Utils::symbolPreviewPixmap( QgsSymbolV2* symbol, QSize s
QIcon QgsSymbolLayerV2Utils::symbolLayerPreviewIcon( QgsSymbolLayerV2* layer, QgsSymbolV2::OutputUnit u, QSize size )
{
QPixmap pixmap( size );
pixmap.fill( Qt::transparent );
QPainter painter;
painter.begin( &pixmap );
painter.setRenderHint( QPainter::Antialiasing );
painter.eraseRect( QRect( QPoint( 0, 0 ), size ) );
QgsRenderContext renderContext = createRenderContext( &painter );
QgsSymbolV2RenderContext symbolContext( renderContext, u );
layer->drawPreviewIcon( symbolContext, size );

0 comments on commit 0829486

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