Added markup implementation.

This commit is contained in:
Jim Evins
2013-12-13 22:56:58 -05:00
parent f017af3cac
commit 5c74625a97
14 changed files with 177 additions and 13 deletions
+16
View File
@@ -64,5 +64,21 @@ namespace libglabels
return false;
}
QGraphicsItem* FrameRect::createMarginGraphicsItem( double size, const QPen& pen ) const
{
double w = mW - 2*size;
double h = mH - 2*size;
double r = std::max( mR - size, 0.0 );
QPainterPath path;
path.addRoundedRect( size, size, w, h, r, r );
QGraphicsPathItem* item = new QGraphicsPathItem( path );
item->setPen( pen );
return item;
}
}