1 # -*- coding: utf-8 -*-
4 HYDRO_SAMPLES = os.path.join( os.environ["HYDRO_ROOT_DIR"], "bin/salome/test/HYDRO")
10 theStudy = salome.myStudy
13 from PyQt4.QtCore import *
14 from PyQt4.QtGui import *
16 hydro_doc = HYDROData_Document.Document( theStudy._get_StudyId() )
18 hydro_doc.SetLocalCS( 0, 0 )
20 garonne_ign_01 = hydro_doc.CreateObject( KIND_IMAGE )
21 garonne_ign_01.SetName( "garonne_ign_01" )
23 if not(garonne_ign_01.LoadImage( os.path.join(HYDRO_SAMPLES , "garonne_ign_01.png" ))):
24 raise ValueError('problem while loading image')
26 garonne_ign_01.SetLocalPoints( QPoint( 40, 817 ),
29 garonne_ign_01.SetGlobalPoints( 1,
30 QPointF( 471562, 6.36775e+06 ),
31 QPointF( 489400, 6.37702e+06 ) )
33 garonne_ign_01.Update()
35 if salome.sg.hasDesktop():
36 salome.sg.updateObjBrowser(1)