Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixes #1186, keeping minimum size of 4
git-svn-id: http://svn.osgeo.org/qgis/trunk@9513 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
homann committed Oct 21, 2008
1 parent 2dae372 commit 7c54dc0
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/core/symbology/qgsmarkercatalogue.cpp
Expand Up @@ -100,6 +100,13 @@ QImage QgsMarkerCatalogue::imageMarker( QString fullName, double size, QPen pen,
//
// First prepare the paintdevice that the marker will be drawn onto
//

// Introduce a minimum size, we don't want it to disappear.
if ( size < 4 )
{
size = 4;
}

QImage myImage;
if ( fullName.left( 5 ) == "hard:" )
{
Expand All @@ -109,7 +116,6 @@ QImage QgsMarkerCatalogue::imageMarker( QString fullName, double size, QPen pen,
{
// TODO Change this logic so width is size and height is same
// proportion of scale factor as in oritignal SVG TS XXX
if ( size < 1 ) size = 1;
//QPixmap myPixmap = QPixmap(width,height);
myImage = QImage( size, size, QImage::Format_ARGB32_Premultiplied );
}
Expand Down Expand Up @@ -218,7 +224,8 @@ void QgsMarkerCatalogue::hardMarker( QPainter * thepPainter, QString name, doubl
int r = ( s - 2 * lw ) / 2 - 1;
QgsDebugMsg( QString( "Hard marker radius %1" ).arg( r ) );

if ( name == "circle" )
// If radius is 0, draw a circle, so it wont disappear.
if ( name == "circle" || r < 1)
{
// "A stroked ellipse has a size of rectangle.size() plus the pen width."
// (from Qt doc)
Expand Down

0 comments on commit 7c54dc0

Please sign in to comment.