mirror of https://github.com/CGAL/cgal
adjust the coords of the disk to the coords of the view port
This commit is contained in:
parent
1aa515b47a
commit
221d624d73
|
|
@ -185,6 +185,13 @@ MainWindow::MainWindow()
|
||||||
this->graphicsView->setScene(&scene);
|
this->graphicsView->setScene(&scene);
|
||||||
this->graphicsView->setMouseTracking(true);
|
this->graphicsView->setMouseTracking(true);
|
||||||
|
|
||||||
|
// we want to adjust the coordinates of QGraphicsView to the coordinates of QGraphicsScene
|
||||||
|
// the following line must do this:
|
||||||
|
// this->graphicsView->fitInView( scene.sceneRect(), Qt::KeepAspectRatio);
|
||||||
|
// It does not do this sufficiently well.
|
||||||
|
// Current solution:
|
||||||
|
this->graphicsView->shear(230, 230);
|
||||||
|
|
||||||
// Turn the vertical axis upside down
|
// Turn the vertical axis upside down
|
||||||
this->graphicsView->matrix().scale(1, -1);
|
this->graphicsView->matrix().scale(1, -1);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue