- QPointF aCaptionShift( -aRadius * 2, aRadius * 2 );
- aTransformationPoint.CaptionItem->setPos( aPoint + aCaptionShift );
- aTransformationPoint.CaptionItem->setVisible( anIsVisible );
+//================================================================
+// Function : updateTrsfPoint
+// Purpose :
+//================================================================
+void HYDROGUI_PrsImage::updateTrsfPoint( const int thePointType )
+{
+ // If image is transformed only by two points then the point C is invisible
+ bool anIsPointVisible = myIsTransformationPointPreview && (
+ ( !myIsByTwoPoints ) || ( myIsByTwoPoints && ( thePointType != PointC ) ) );
+
+ TransformationPoint& aTransformationPoint = myTransformationPointMap[ thePointType ];
+
+ const QPointF& aPoint = aTransformationPoint.Point;
+ aTransformationPoint.GroupItem->setPos( aPoint );
+ aTransformationPoint.GroupItem->setVisible( anIsPointVisible );
+}
+
+//================================================================
+// Function : getIsByTwoPoints
+// Purpose :
+//================================================================
+bool HYDROGUI_PrsImage::getIsByTwoPoints() const
+{
+ return myIsByTwoPoints;
+}
+
+//================================================================
+// Function : setIsByTwoPoints
+// Purpose :
+//================================================================
+void HYDROGUI_PrsImage::setIsByTwoPoints( const bool theIsByTwoPoints )
+{
+ myIsByTwoPoints = theIsByTwoPoints;
+ if ( myTransformationPointMap.contains( PointC ) )
+ {
+ // Show/hide the point C if necessary
+ updateTrsfPoint( PointC );