21 #include "qgsdxfexport.h"
82 double mmMapUnitScaleFactor,
83 const QString& layerName,
86 const QPointF& shift )
const
89 Q_UNUSED( mmMapUnitScaleFactor );
90 Q_UNUSED( layerName );
113 return QVector<qreal>();
118 return Qt::SolidLine;
134 it.value()->prepare( fields );
137 it.value()->setScale( scale );
152 columns.append( ddIt.value()->referencedColumns() );
156 QSet<QString> attributes;
157 QStringList::const_iterator it = columns.constBegin();
158 for ( ; it != columns.constEnd(); ++it )
160 attributes.insert( *it );
173 stringMap.insert( ddIt.key() +
"_expression", ddIt.value()->expression() );
198 mHorizontalAnchorPoint( HCenter ), mVerticalAnchorPoint( VCenter )
226 renderPoint( QPointF( size.width() / 2, size.height() / 2 ), context );
243 double& offsetX,
double& offsetY )
const
251 offsetX = offset.x();
252 offsetY = offset.y();
270 if ( horizontalAnchorPoint ==
HCenter && verticalAnchorPoint ==
VCenter )
277 if ( horizontalAnchorPoint ==
Left )
279 offsetX += anchorPointCorrectionX;
281 else if ( horizontalAnchorPoint ==
Right )
283 offsetX -= anchorPointCorrectionX;
287 if ( verticalAnchorPoint ==
Top )
289 offsetY += anchorPointCorrectionY;
291 else if ( verticalAnchorPoint ==
Bottom )
293 offsetY -= anchorPointCorrectionY;
300 double c = cos( angle ), s = sin( angle );
301 return QPointF( offset.x() * c - offset.y() * s, offset.x() * s + offset.y() * c );
306 if ( str.compare(
"left", Qt::CaseInsensitive ) == 0 )
310 else if ( str.compare(
"right", Qt::CaseInsensitive ) == 0 )
322 if ( str.compare(
"top", Qt::CaseInsensitive ) == 0 )
326 else if ( str.compare(
"bottom", Qt::CaseInsensitive ) == 0 )
351 points << QPointF( 0, size.height() / 2 + 0.5 ) << QPointF( size.width(), size.height() / 2 + 0.5 );
363 foreach (
const QPolygonF& ring, *rings )
371 return (
width() * e.mapUnitScaleFactor( e.symbologyScaleDenominator(),
widthUnit(), e.mapUnits() ) );
377 QPolygonF poly = QRectF( QPointF( 0, 0 ), QPointF( size.width(), size.height() ) );
393 p->setRenderHint( QPainter::Antialiasing,
false );
394 p->drawRect( points.boundingRect() );
395 p->setRenderHint( QPainter::Antialiasing,
true );
402 p->drawPolygon( points );
408 QPolygonF outerRing = points;
409 path.addPolygon( outerRing );
411 QList<QPolygonF>::const_iterator it = rings->constBegin();
412 for ( ; it != rings->constEnd(); ++it )
414 QPolygonF ring = *it;
415 path.addPolygon( ring );
424 QDomElement symbolizerElem = doc.createElement(
"se:PointSymbolizer" );
425 if ( !props.value(
"uom",
"" ).isEmpty() )
426 symbolizerElem.setAttribute(
"uom", props.value(
"uom",
"" ) );
427 element.appendChild( symbolizerElem );