Skip to content

Commit

Permalink
Add sip binding and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Apr 19, 2018
1 parent f5c03db commit e5f8169
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions python/core/dxf/qgsdxfexport.sip
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,14 @@ class QgsDxfExport
//! @note added in 2.15
void writeMText( const QString &layer, const QString &text, const QgsPointV2 &pt, double width, double angle, const QColor& color );

/** Returns scale factor for conversion to map units
@param mapUnitsPerPixel Map units per pixel*/
static double mapUnitScaleFactor( double scaleDenominator, QgsSymbolV2::OutputUnit symbolUnits, QGis::UnitType mapUnits, double mapUnitsPerPixel = 1.0 );
/** Clips value to scale minimum/maximum
@param value the value to clip
@param scale the scale dependent minimum/maximum values
@param pixelToMMFactor pixels per mm*/
void clipValueToMapUnitScale( double& value, const QgsMapUnitScale& scale, double pixelToMMFactor ) const;

//! Return cleaned layer name for use in DXF
static QString dxfLayerName( const QString &name );
Expand Down
6 changes: 6 additions & 0 deletions src/core/dxf/qgsdxfexport.h
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,13 @@ class CORE_EXPORT QgsDxfExport
//! @note added in 2.15
void writeMText( const QString &layer, const QString &text, const QgsPointV2 &pt, double width, double angle, const QColor& color );

/** Returns scale factor for conversion to map units
@param mapUnitsPerPixel Map units per pixel*/
static double mapUnitScaleFactor( double scaleDenominator, QgsSymbolV2::OutputUnit symbolUnits, QGis::UnitType mapUnits, double mapUnitsPerPixel = 1.0 );
/** Clips value to scale minimum/maximum
@param value the value to clip
@param scale the scale dependent minimum/maximum values
@param pixelToMMFactor pixels per mm*/
void clipValueToMapUnitScale( double& value, const QgsMapUnitScale& scale, double pixelToMMFactor ) const;

//! Return cleaned layer name for use in DXF
Expand Down
3 changes: 3 additions & 0 deletions src/core/dxf/qgsdxfpaintengine.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class CORE_EXPORT QgsDxfPaintEngine: public QPaintEngine
QTransform mTransform;
QPen mPen;
QBrush mBrush;
/** Opacity*/
double mOpacity;
QString mLayer;
QPointF mShift;
Expand All @@ -86,7 +87,9 @@ class CORE_EXPORT QgsDxfPaintEngine: public QPaintEngine
static double power( double a, int b );
static int faculty( int n );

/** Returns current pen color*/
QColor penColor() const;
/** Returns current brush color*/
QColor brushColor() const;
};

Expand Down

0 comments on commit e5f8169

Please sign in to comment.