Correctly draw rotated labels.
This commit is contained in:
@@ -37,6 +37,7 @@ namespace libglabels
|
||||
: mW(w), mH(h), mWaste(waste), Frame(id)
|
||||
{
|
||||
mPath.addEllipse( 0, 0, mW, mH );
|
||||
mRotatedPath.addEllipse( 0, 0, mH, mW );
|
||||
}
|
||||
|
||||
FrameEllipse( const FrameEllipse &other )
|
||||
@@ -54,7 +55,7 @@ namespace libglabels
|
||||
const QString sizeDescription( const Units *units ) const;
|
||||
bool isSimilarTo( Frame *other ) const;
|
||||
|
||||
const QPainterPath &path() const { return mPath; }
|
||||
const QPainterPath &path( bool isRotated ) const { return isRotated ? mRotatedPath : mPath; }
|
||||
QGraphicsItem* createMarginGraphicsItem( double size, const QPen& pen ) const;
|
||||
|
||||
|
||||
@@ -64,6 +65,7 @@ namespace libglabels
|
||||
double mWaste;
|
||||
|
||||
QPainterPath mPath;
|
||||
QPainterPath mRotatedPath;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user