Skip to content

Commit ee7fda7

Browse files
author
rblazek
committed
use qreal line width
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5468 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent ec6183f commit ee7fda7

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/gui/qgscontinuouscolorrenderer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ void QgsContinuousColorRenderer::renderFeature(QPainter * p, QgsFeature * f, QPi
126126
// later add support for both pen and brush to dialog
127127
QPen pen = mMinimumSymbol->pen();
128128
pen.setColor ( QColor(red, green, blue) );
129-
pen.setWidth ( (int) ( widthScale * pen.width() ) );
129+
pen.setWidthF ( widthScale * pen.width() );
130130

131131
QBrush brush = mMinimumSymbol->brush();
132132

src/gui/qgsgraduatedsymbolrenderer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,15 @@ void QgsGraduatedSymbolRenderer::renderFeature(QPainter * p, QgsFeature * f, QPi
123123
if( !selected )
124124
{
125125
QPen pen=(*it)->pen();
126-
pen.setWidth ( (int) (widthScale * pen.width()) );
126+
pen.setWidthF ( widthScale * pen.width() );
127127
p->setPen(pen);
128128
p->setBrush((*it)->brush());
129129
}
130130
else
131131
{
132132
QPen pen=(*it)->pen();
133133
pen.setColor(mSelectionColor);
134-
pen.setWidth ( (int) (widthScale * pen.width()) );
134+
pen.setWidthF ( widthScale * pen.width() );
135135
QBrush brush=(*it)->brush();
136136
brush.setColor(mSelectionColor);
137137
p->setPen(pen);

src/gui/qgssinglesymbolrenderer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,14 @@ void QgsSingleSymbolRenderer::renderFeature(QPainter * p, QgsFeature * f, QPixma
101101
if( !selected )
102102
{
103103
QPen pen=mSymbol->pen();
104-
pen.setWidth ( (int) (widthScale * pen.width()) );
104+
pen.setWidthF ( widthScale * pen.width() );
105105
p->setPen(pen);
106106
p->setBrush(mSymbol->brush());
107107
}
108108
else
109109
{
110110
QPen pen=mSymbol->pen();
111-
pen.setWidth ( (int) (widthScale * pen.width()) );
111+
pen.setWidthF ( widthScale * pen.width() );
112112
pen.setColor(mSelectionColor);
113113
QBrush brush=mSymbol->brush();
114114
brush.setColor(mSelectionColor);

src/gui/qgsuniquevaluerenderer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,14 @@ void QgsUniqueValueRenderer::renderFeature(QPainter* p, QgsFeature* f,QPixmap* p
120120
if( !selected )
121121
{
122122
QPen pen=symbol->pen();
123-
pen.setWidth ( (int) (widthScale * pen.width()) );
123+
pen.setWidthF ( widthScale * pen.width() );
124124
p->setPen(pen);
125125
p->setBrush(symbol->brush());
126126
}
127127
else
128128
{
129129
QPen pen=symbol->pen();
130-
pen.setWidth ( (int) (widthScale * pen.width()) );
130+
pen.setWidthF ( widthScale * pen.width() );
131131
pen.setColor(mSelectionColor);
132132
QBrush brush=symbol->brush();
133133
brush.setColor(mSelectionColor);

0 commit comments

Comments
 (0)