Sync graphics item with matrix and shadow common parameters.

This commit is contained in:
Jim Evins
2013-12-05 19:45:39 -05:00
parent 385df72c9b
commit 52755383ed
3 changed files with 33 additions and 0 deletions
+23
View File
@@ -20,6 +20,8 @@
#include "LabelModelObject.h"
#include <QGraphicsDropShadowEffect>
namespace glabels
{
@@ -178,5 +180,26 @@ namespace glabels
emit changed();
}
void LabelModelObject::updateGraphicsItemMatrix( QGraphicsItem* graphicsItem )
{
graphicsItem->setTransform( mMatrix );
}
void LabelModelObject::updateGraphicsItemShadow( QGraphicsItem* graphicsItem )
{
QGraphicsDropShadowEffect *shadowEffect = new QGraphicsDropShadowEffect();
QColor color = mShadowColorNode.color();
color.setAlphaF( mShadowOpacity );
shadowEffect->setColor( color );
shadowEffect->setOffset( mShadowX, mShadowY );
shadowEffect->setBlurRadius( 0 );
graphicsItem->setGraphicsEffect( shadowEffect );
}
}