Reflection Question ...
hi every body . i try write "drawing window" and i use qgraphicsscene and qgraphicsitems like rectitem, ellipseitem, ....
i want to reflect graphicsitem in relation to Y axis or X axis .
tnx alot :)
What about QGraphicsItemAnimation?
X: Scale on x axis to -1 and translate by height.
Y: Scale on y axis to -1 and translate by width.
can you explain to me please ?
QGraphicsScene* scene = new QGraphicsScene(); QGraphicsPixmapItem* normalItem = scene->addPixmap(batman); QGraphicsPixmapItem* mirrorItem = scene->addPixmap(batman); QGraphicsScale* scale = new QGraphicsScale(scene); scale->setXScale(-1.0); mirrorItem->setTransformations(QList<QGraphicsTransform*>() << scale); ui->graphicsView->setScene(scene);
gives you this:
hahah too sweet :D tnx a lot
does exist ebook about this ?
If you ask about QGraphicsView I'd suggest reading through docs. They are really comprehensive.
Also check "Qt examples":http://qt-project.org/doc/qt-4.8/examples-graphicsview.html
As for batman I'd try "this link":http://www.dccomics.com/ :)
ok ok tnx alot :) . i have another question : how can i draw PolyLine in graphicsscene like other graphics object ? i want that can select and move it and other option like other object in graphic ?
i know that must create one class and inherit form QGrItem but i dont know how can i calculate bounding rect and shape and .... :(
Another name for polyline is path, and there's already a class for it in Qt: "QGraphicsPathItem":http://qt-project.org/doc/qt-5.0/qtwidgets/qgraphicspathitem.html
tnx i read this tnx alot :) :) if i have question i ask you :) tnx