39 Q_UNUSED( itemStyle );
59 p->setRenderHint( QPainter::Antialiasing );
61 p->translate( rect().width() / 2.0, rect().height() / 2.0 );
63 p->translate( -rect().width() / 2.0, -rect().height() / 2.0 );
68 p->drawEllipse( QRectF( 0, 0 , rect().width(), rect().height() ) );
71 p->drawRect( QRectF( 0, 0 , rect().width(), rect().height() ) );
75 triangle << QPointF( 0, rect().height() );
76 triangle << QPointF( rect().width() , rect().height() );
77 triangle << QPointF( rect().width() / 2.0, 0 );
78 p->drawPolygon( triangle );
91 p->setBrush( Qt::NoBrush );
92 p->setRenderHint( QPainter::Antialiasing,
true );
101 p->setBrush( brush() );
102 p->setPen( Qt::NoPen );
103 p->setRenderHint( QPainter::Antialiasing,
true );
111 QDomElement composerShapeElem = doc.createElement(
"ComposerShape" );
112 composerShapeElem.setAttribute(
"shapeType",
mShape );
113 elem.appendChild( composerShapeElem );
114 return _writeXML( composerShapeElem, doc );
122 QDomNodeList composerItemList = itemElem.elementsByTagName(
"ComposerItem" );
123 if ( composerItemList.size() > 0 )
125 QDomElement composerItemElem = composerItemList.at( 0 ).toElement();
136 double width = rect().width();
137 double height = rect().height();
141 double x = transform().dx() + rect().width() / 2.0 - width / 2.0;
142 double y = transform().dy() + rect().height() / 2.0 - height / 2.0;
153 if ( rectangle.width() != rect().width() || rectangle.height() != rect().height() )
155 double newShapeWidth = rectangle.width();
156 double newShapeHeight = rectangle.height();