blockSignalsCartesian( true );
myCartPointXMap[ HYDROGUI_PrsImage::PointA ]->setValue( aCartX0 );
- myCartPointYMap[ HYDROGUI_PrsImage::PointA ]->setValue( aCartY0 );
+ myCartPointYMap[ HYDROGUI_PrsImage::PointA ]->setValue( aCartY0 + 500 );
myCartPointXMap[ HYDROGUI_PrsImage::PointB ]->setValue( aCartX0 + 500 );
- myCartPointYMap[ HYDROGUI_PrsImage::PointB ]->setValue( aCartY0 );
+ myCartPointYMap[ HYDROGUI_PrsImage::PointB ]->setValue( aCartY0 + 500 );
myCartPointXMap[ HYDROGUI_PrsImage::PointC ]->setValue( aCartX0 );
- myCartPointYMap[ HYDROGUI_PrsImage::PointC ]->setValue( aCartY0 + 500 );
+ myCartPointYMap[ HYDROGUI_PrsImage::PointC ]->setValue( aCartY0 );
for( int aPointType = HYDROGUI_PrsImage::PointA;
aPointType <= HYDROGUI_PrsImage::PointC; aPointType++ )
{
if( GraphicsView_Viewer* aViewer = dynamic_cast<GraphicsView_Viewer*>( aViewFrame->getViewer() ) )
{
+ SUIT_ViewManager* aViewManager = aViewer->getViewManager();
+ ViewManagerRole aRole = getViewManagerRole( aViewManager );
+
if( GraphicsView_ViewPort* aViewPort = aViewer->getActiveViewPort() )
{
+ if( aRole != VMR_TransformImage )
+ aViewPort->scale( 1, -1 ); // invert the Y axis direction from down to up
+
aViewPort->setInteractionFlag( GraphicsView_ViewPort::TraceBoundingRect );
aViewPort->setInteractionFlag( GraphicsView_ViewPort::ImmediateContextMenu );
aViewPort->setInteractionFlag( GraphicsView_ViewPort::ImmediateSelection );
//aViewPort->setViewLabelPosition( GraphicsView_ViewPort::VLP_BottomLeft, true );
}
- SUIT_ViewManager* aViewManager = aViewer->getViewManager();
- ViewManagerRole aRole = getViewManagerRole( aViewManager );
if( aRole != VMR_TransformImage )
update( UF_Viewer );
int aWidth = anImage.width();
int aHeight = anImage.height();
- anImage = anImage.transformed( aTrsf, Qt::SmoothTransformation );
+ QTransform anInversion = QTransform::fromScale( -1, -1 );
+ anImage = anImage.transformed( anYInversion * aTrsf, Qt::SmoothTransformation );
// temporary optimization, to reduce the saved image size (and the texture quality)
QImage anImageToSave = reduceTexture( anImage, 500 );