aResList << QString( "" );
aResList << QString( "%1.LoadImage( \"%2\" );" )
.arg( anImageName ).arg( aFilePath );
+
+ // Dump transformation matrix for image
+ aResList << QString( "" );
+
+ QTransform aTrsf = Trsf();
+
+ aResList << QString( "trsf = QTransform( %1, %2, %3," )
+ .arg( aTrsf.m11() ).arg( aTrsf.m12() ).arg( aTrsf.m13() );
+ aResList << QString( " %1, %2, %3," )
+ .arg( aTrsf.m21() ).arg( aTrsf.m22() ).arg( aTrsf.m23() );
+ aResList << QString( " %1, %2, %3 );" )
+ .arg( aTrsf.m31() ).arg( aTrsf.m32() ).arg( aTrsf.m33() );
+
+ aResList << QString( "%1.SetTrsf( trsf );" ).arg( anImageName );
+
+ // Dump transformation points for image
+ aResList << QString( "" );
+
+ QPoint aPointAIn, aPointBIn, aPointCIn;
+ QPointF aPointAOut, aPointBOut, aPointCOut;
+ TrsfPoints( aPointAIn, aPointBIn, aPointCIn,
+ aPointAOut, aPointBOut, aPointCOut );
+
+ aResList << QString( "a_in = QPoint( %1, %2 );" )
+ .arg( aPointAIn.x() ).arg( aPointAIn.y() );
+
+ aResList << QString( "b_in = QPoint( %1, %2 );" )
+ .arg( aPointBIn.x() ).arg( aPointBIn.y() );
+
+ aResList << QString( "c_in = QPoint( %1, %2 );" )
+ .arg( aPointCIn.x() ).arg( aPointCIn.y() );
+
+ aResList << QString( "a_out = QPointF( %1, %2 );" )
+ .arg( aPointAOut.x() ).arg( aPointAOut.y() );
+
+ aResList << QString( "b_out = QPointF( %1, %2 );" )
+ .arg( aPointBOut.x() ).arg( aPointBOut.y() );
+
+ aResList << QString( "c_out = QPointF( %1, %2 );" )
+ .arg( aPointCOut.x() ).arg( aPointCOut.y() );
+
+ QString aGap = QString().fill( ' ', anImageName.size() + 16 );
+ aResList << QString( "%1.SetTrsfPoints( a_in, b_in, c_in," ).arg( anImageName );
+ aResList << QString( aGap + "a_out, b_out, c_out );" );
}
else
{
// Necessary to update image in case of composed operator
aResList << QString( "" );
- aResList << QString( "%1.Update();" ).arg( anImageName );
+ aResList << QString( "%1.Update( False );" ).arg( anImageName );
}
- // Dump transformation matrix for image
- aResList << QString( "" );
-
- QTransform aTrsf = Trsf();
-
- aResList << QString( "trsf = QTransform( %2, %3, %4," )
- .arg( aTrsf.m11() ).arg( aTrsf.m12() ).arg( aTrsf.m13() );
- aResList << QString( " %1, %2, %3," )
- .arg( aTrsf.m21() ).arg( aTrsf.m22() ).arg( aTrsf.m23() );
- aResList << QString( " %1, %2, %3 );" )
- .arg( aTrsf.m31() ).arg( aTrsf.m32() ).arg( aTrsf.m33() );
-
- aResList << QString( "%1.SetTrsf( trsf );" ).arg( anImageName );
-
- // Dump transformation points for image
- aResList << QString( "" );
-
- QPoint aPointAIn, aPointBIn, aPointCIn;
- QPointF aPointAOut, aPointBOut, aPointCOut;
- TrsfPoints( aPointAIn, aPointBIn, aPointCIn,
- aPointAOut, aPointBOut, aPointCOut );
-
- aResList << QString( "a_in = QPoint( %1, %2 );" )
- .arg( aPointAIn.x() ).arg( aPointAIn.y() );
-
- aResList << QString( "b_in = QPoint( %1, %2 );" )
- .arg( aPointBIn.x() ).arg( aPointBIn.y() );
-
- aResList << QString( "c_in = QPoint( %1, %2 );" )
- .arg( aPointCIn.x() ).arg( aPointCIn.y() );
-
- aResList << QString( "a_out = QPointF( %1, %2 );" )
- .arg( aPointAOut.x() ).arg( aPointAOut.y() );
-
- aResList << QString( "b_out = QPointF( %1, %2 );" )
- .arg( aPointBOut.x() ).arg( aPointBOut.y() );
-
- aResList << QString( "c_out = QPointF( %1, %2 );" )
- .arg( aPointCOut.x() ).arg( aPointCOut.y() );
-
- QString aGap = QString().fill( ' ', anImageName.size() + 16 );
- aResList << QString( "%1.SetTrsfPoints( a_in, b_in, c_in," ).arg( anImageName );
- aResList << QString( aGap + "a_out, b_out, c_out );" );
-
return aResList;
}
-void HYDROData_Image::Update()
+void HYDROData_Image::Update( const bool theIsForce )
{
HYDROOperations_Factory* aFactory = HYDROOperations_Factory::Factory();
// Update image only if there is an operation
- ImageComposer_Operator* anOp = aFactory->Operator( this );
+ ImageComposer_Operator* anOp = aFactory->Operator( OperatorName() );
if ( anOp )
{
// Fill by arguments and process the operation
SetImage( aResImg );
}
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( this );
- if ( !aDocument.IsNull() )
+ if ( theIsForce )
{
- // Change the states of this and all depended images
- MustBeUpdated( true );
- HYDROData_Tool::SetMustBeUpdatedImages( aDocument );
- MustBeUpdated( false );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( this );
+ if ( !aDocument.IsNull() )
+ {
+ // Change the states of this and all depended images
+ MustBeUpdated( true );
+ HYDROData_Tool::SetMustBeUpdatedImages( aDocument );
+ MustBeUpdated( false );
+ }
}
}