Index: /trunk/SophyaPI/PI/Makefile
===================================================================
--- /trunk/SophyaPI/PI/Makefile	(revision 10)
+++ /trunk/SophyaPI/PI/Makefile	(revision 11)
@@ -33,4 +33,5 @@
  CCI := ${INC}/CInc/
  CXI := ${INC}/CxxInc/
+ GLB := ${GNU}/${MACHEROS}/lib/
 #--
 
@@ -47,5 +48,5 @@
   CPPFLAGS :=  -I${INC} -D${MACHEROSD}
 endif
-AR       := ar
+AR       := /usr/bin/ar
 ARFLAGS  := -rcs
 
@@ -77,104 +78,27 @@
 #------------------------------------------------- End of Makefile.h ------- 
  
-all: $(LIB)libPI.a  
-$(LIB)libPI.a : $(OBJ)ex_dessin.o $(OBJ)piapplgen.o $(OBJ)piapplx.o $(OBJ)pibwdggen.o $(OBJ)pibwdgx.o $(OBJ)picmap.o $(OBJ)picmapgen.o $(OBJ)picmapx.o $(OBJ)picontainergen.o $(OBJ)picontainerx.o $(OBJ)pidrawwin.o $(OBJ)pifilechogen.o $(OBJ)pifilechox.o $(OBJ)pihisto.o $(OBJ)piimage.o $(OBJ)pimenubargen.o $(OBJ)pimenubarx.o $(OBJ)pimenugen.o $(OBJ)pimenux.o $(OBJ)pimsghandler.o $(OBJ)pioptmenugen.o $(OBJ)pioptmenux.o $(OBJ)pipixmapgen.o $(OBJ)pipixmapx.o $(OBJ)piscdrawwdg.o $(OBJ)pistdwdggen.o $(OBJ)pistdwdgx.o $(OBJ)piwdggen.o $(OBJ)piwdgx.o $(OBJ)piwindowgen.o $(OBJ)piwindowx.o $(OBJ)pixtbase.o 
-	ar -rs $@ $?
-
-$(OBJ)ex_dessin.o: ex_dessin.cc ex_dessin.h pisysdep.h pibwdgx.h pibwdggen.h \
- piwdgx.h piwdggen.h pimsghandler.h
-$(OBJ)piapplgen.o: piapplgen.cc piapplgen.h pimsghandler.h pisysdep.h \
+all: $(LIB)libPI.a 
+$(LIB)libPI.a : $(OBJ)piapplgen.o $(OBJ)piapplx.o $(OBJ)pibwdggen.o $(OBJ)pibwdgx.o $(OBJ)picmap.o $(OBJ)picmapgen.o $(OBJ)picmapx.o $(OBJ)picontainergen.o $(OBJ)picontainerx.o $(OBJ)pidrawwin.o $(OBJ)pifilechogen.o $(OBJ)pifilechox.o $(OBJ)pihisto.o $(OBJ)piimage.o $(OBJ)pimenubargen.o $(OBJ)pimenubarx.o $(OBJ)pimenugen.o $(OBJ)pimenux.o $(OBJ)pimsghandler.o $(OBJ)pioptmenugen.o $(OBJ)pioptmenux.o $(OBJ)pipixmapgen.o $(OBJ)pipixmapx.o $(OBJ)piscdrawwdg.o $(OBJ)pistdwdggen.o $(OBJ)pistdwdgx.o $(OBJ)piwdggen.o $(OBJ)piwdgx.o $(OBJ)piwindowgen.o $(OBJ)piwindowx.o $(OBJ)pixtbase.o
+	$(AR) $(ARFLAGS)  $@ $?
+ 
+$(OBJ)piapplgen.o: ./piapplgen.cc piapplgen.h pimsghandler.h pisysdep.h \
  picontainerx.h picontainergen.h piwdgx.h piwdggen.h pimenubarx.h \
  pimenubargen.h pimenux.h pimenugen.h
-$(OBJ)piapplx.o: piapplx.cc piapplx.h piapplgen.h pimsghandler.h pisysdep.h \
- picontainerx.h picontainergen.h piwdgx.h piwdggen.h pimenubarx.h \
- pimenubargen.h pimenux.h pimenugen.h
-$(OBJ)pibwdggen.o: pibwdggen.cc pibwdggen.h pisysdep.h piwdgx.h piwdggen.h \
+$(OBJ)piapplx.o: ./piapplx.cc piapplx.h piapplgen.h pimsghandler.h \
+ pisysdep.h picontainerx.h picontainergen.h piwdgx.h piwdggen.h \
+ pimenubarx.h pimenubargen.h pimenux.h pimenugen.h
+$(OBJ)pibwdggen.o: ./pibwdggen.cc pibwdggen.h pisysdep.h piwdgx.h piwdggen.h \
  pimsghandler.h
-$(OBJ)pibwdgx.o: pibwdgx.cc pibwdgx.h pisysdep.h pibwdggen.h piwdgx.h \
+$(OBJ)pibwdgx.o: ./pibwdgx.cc pibwdgx.h pisysdep.h pibwdggen.h piwdgx.h \
  piwdggen.h pimsghandler.h pixtbaseP.h pixtbase.h
-$(OBJ)picmap.o: picmap.cc picmap.h pisysdep.h picmapx.h picmapgen.h
-$(OBJ)picmapgen.o: picmapgen.cc picmapgen.h pisysdep.h picmapx.h picmap.h
-$(OBJ)picmapx.o: picmapx.cc piwdgx.h piwdggen.h pimsghandler.h picmapx.h \
+$(OBJ)picmap.o: ./picmap.cc picmap.h pisysdep.h picmapx.h picmapgen.h
+$(OBJ)picmapgen.o: ./picmapgen.cc picmapgen.h pisysdep.h picmapx.h picmap.h
+$(OBJ)picmapx.o: ./picmapx.cc piwdgx.h piwdggen.h pimsghandler.h picmapx.h \
  picmapgen.h pisysdep.h
-$(OBJ)picontainergen.o: picontainergen.cc picontainergen.h pisysdep.h \
+$(OBJ)picontainergen.o: ./picontainergen.cc picontainergen.h pisysdep.h \
  piwdgx.h piwdggen.h pimsghandler.h
-$(OBJ)picontainerx.o: picontainerx.cc picontainerx.h pisysdep.h \
+$(OBJ)picontainerx.o: ./picontainerx.cc picontainerx.h pisysdep.h \
  picontainergen.h piwdgx.h piwdggen.h pimsghandler.h
-$(OBJ)pidrawwin.o: pidrawwin.cc pidrawwin.h pisysdep.h piwindowx.h \
- piwindowgen.h picontainerx.h picontainergen.h piwdgx.h piwdggen.h \
- pimsghandler.h piscdrawwdg.h pibwdgx.h pibwdggen.h
-$(OBJ)pifilechogen.o: pifilechogen.cc pifilechogen.h pisysdep.h piwdgx.h \
- piwdggen.h pimsghandler.h
-$(OBJ)pifilechox.o: pifilechox.cc pisysdep.h pifilechox.h pifilechogen.h \
- piwdgx.h piwdggen.h pimsghandler.h piwindowx.h piwindowgen.h \
- picontainerx.h picontainergen.h
-$(OBJ)pihisto.o: pihisto.cc pihisto.h piscdrawwdg.h pisysdep.h pibwdgx.h \
- pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h \
- $(INC)histos.h $(INC)peida.h \
- $(INC)defs.h $(INC)utils.h \
- $(INC)machine.h \
- $(INC)perrors.h \
- $(INC)exceptions.h
-$(OBJ)piimage.o: piimage.cc piimage.h $(INC)cimage.h \
- $(INC)rzimage.h \
- $(INC)rzvect.h \
- $(INC)machine.h $(INC)defs.h \
- $(INC)exceptions.h \
- $(INC)perrors.h \
- $(INC)datatypes.h $(INC)lut.h \
- pisysdep.h pipixmapx.h pipixmapgen.h pibwdgx.h pibwdggen.h piwdgx.h \
- piwdggen.h pimsghandler.h picmap.h picmapx.h picmapgen.h pistdwdgx.h \
- pistdwdggen.h $(INC)imageop.h
-$(OBJ)pimenubargen.o: pimenubargen.cc pimenubargen.h pisysdep.h pimenux.h \
- pimenugen.h piwdgx.h piwdggen.h pimsghandler.h piapplx.h piapplgen.h \
- picontainerx.h picontainergen.h pimenubarx.h
-$(OBJ)pimenubarx.o: pimenubarx.cc pimenubarx.h pimenubargen.h pisysdep.h \
- pimenux.h pimenugen.h piwdgx.h piwdggen.h pimsghandler.h piapplx.h \
- piapplgen.h picontainerx.h picontainergen.h
-$(OBJ)pimenugen.o: pimenugen.cc pimenugen.h pisysdep.h piwdgx.h piwdggen.h \
- pimsghandler.h
-$(OBJ)pimenux.o: pimenux.cc pimenux.h pimenugen.h pisysdep.h piwdgx.h \
- piwdggen.h pimsghandler.h
-$(OBJ)pimsghandler.o: pimsghandler.cc pimsghandler.h
-$(OBJ)pioptmenugen.o: pioptmenugen.cc pioptmenugen.h pisysdep.h \
- picontainerx.h picontainergen.h piwdgx.h piwdggen.h pimsghandler.h \
- pimenux.h pimenugen.h
-$(OBJ)pioptmenux.o: pioptmenux.cc pisysdep.h pioptmenux.h pioptmenugen.h \
- picontainerx.h picontainergen.h piwdgx.h piwdggen.h pimsghandler.h \
- pimenux.h pimenugen.h pistdwdgx.h pistdwdggen.h
-$(OBJ)pipixmapgen.o: pipixmapgen.cc pipixmapgen.h pisysdep.h pibwdgx.h \
- pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h \
- picmapgen.h
-$(OBJ)pipixmapx.o: pipixmapx.cc pipixmapx.h pipixmapgen.h pisysdep.h \
- pibwdgx.h pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picmap.h \
- picmapx.h picmapgen.h
-$(OBJ)piscdrawwdg.o: piscdrawwdg.cc piscdrawwdg.h pisysdep.h pibwdgx.h \
- pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h \
- $(INC)generalfit.h \
- $(INC)exceptions.h \
- $(INC)defs.h $(INC)matrix.h \
- $(INC)peida.h $(INC)utils.h \
- $(INC)machine.h \
- $(INC)perrors.h \
- $(INC)ppersist.h \
- $(INC)pclassids.h \
- $(INC)cvector.h
-$(OBJ)pistdwdggen.o: pistdwdggen.cc pistdwdggen.h pisysdep.h piwdgx.h \
- piwdggen.h pimsghandler.h
-$(OBJ)pistdwdgx.o: pistdwdgx.cc pisysdep.h pistdwdgx.h pistdwdggen.h \
- piwdgx.h piwdggen.h pimsghandler.h
-$(OBJ)piwdggen.o: piwdggen.cc piwdggen.h pimsghandler.h picontainergen.h \
- pisysdep.h piwdgx.h
-$(OBJ)piwdgx.o: piwdgx.cc piwdgx.h piwdggen.h pimsghandler.h picontainerx.h \
- pisysdep.h picontainergen.h
-$(OBJ)piwindowgen.o: piwindowgen.cc piwindowgen.h pisysdep.h picontainerx.h \
- picontainergen.h piwdgx.h piwdggen.h pimsghandler.h
-$(OBJ)piwindowx.o: piwindowx.cc piwindowx.h piwindowgen.h pisysdep.h \
- picontainerx.h picontainergen.h piwdgx.h piwdggen.h pimsghandler.h
-$(OBJ)pixtbase.o: pixtbase.cc pixtbaseP.h pibwdgx.h pisysdep.h pibwdggen.h \
- piwdgx.h piwdggen.h pimsghandler.h pixtbase.h
-$(OBJ)sc_sample.o: sc_sample.cc sc_sample.h pisysdep.h piscdrawwdg.h \
- pibwdgx.h pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h
-$(OBJ)pidemo.o: pidemo.cc pidemo.h pidemoup.h \
+$(OBJ)pidemo.o: ./pidemo.cc \
  $(INC)perrors.h \
  $(INC)exceptions.h \
@@ -187,50 +111,98 @@
  $(INC)datatypes.h \
  $(INC)fitsheader.h \
- $(INC)fitskeys.h pisysdep.h piapplx.h piapplgen.h \
- pimsghandler.h picontainerx.h picontainergen.h piwdgx.h piwdggen.h \
- pimenubarx.h pimenubargen.h pimenux.h pimenugen.h piwindowx.h \
- piwindowgen.h pioptmenux.h pioptmenugen.h pistdwdgx.h pistdwdggen.h \
- pifilechox.h pifilechogen.h piimage.h $(INC)lut.h \
+ $(INC)fitskeys.h pidemo.h \
+ pisysdep.h piapplx.h piapplgen.h pimsghandler.h picontainerx.h \
+ picontainergen.h piwdgx.h piwdggen.h pimenubarx.h pimenubargen.h \
+ pimenux.h pimenugen.h piwindowx.h piwindowgen.h pioptmenux.h \
+ pioptmenugen.h pistdwdgx.h pistdwdggen.h pifilechox.h pifilechogen.h \
+ piimage.h $(INC)lut.h \
  pipixmapx.h pipixmapgen.h pibwdgx.h pibwdggen.h picmap.h picmapx.h \
  picmapgen.h pihisto.h piscdrawwdg.h \
- $(INC)histos.h $(INC)peida.h \
- $(INC)utils.h pidrawwin.h
-$(OBJ)pidemoup.o: pidemoup.cc  pidemoup.h \
- $(INC)perrors.h \
- $(INC)exceptions.h \
- $(INC)defs.h \
- $(INC)fitsimage.h \
+ $(INC)histos.h \
+ $(INC)peida.h \
+ $(INC)utils.h pidrawwin.h \
+ $(INC)piup.h
+$(OBJ)pidrawwin.o: ./pidrawwin.cc pidrawwin.h pisysdep.h piwindowx.h \
+ piwindowgen.h picontainerx.h picontainergen.h piwdgx.h piwdggen.h \
+ pimsghandler.h piscdrawwdg.h pibwdgx.h pibwdggen.h
+$(OBJ)pifilechogen.o: ./pifilechogen.cc pifilechogen.h pisysdep.h piwdgx.h \
+ piwdggen.h pimsghandler.h
+$(OBJ)pifilechox.o: ./pifilechox.cc pisysdep.h pifilechox.h pifilechogen.h \
+ piwdgx.h piwdggen.h pimsghandler.h piwindowx.h piwindowgen.h \
+ picontainerx.h picontainergen.h
+$(OBJ)pihisto.o: ./pihisto.cc pihisto.h piscdrawwdg.h pisysdep.h pibwdgx.h \
+ pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h \
+ $(INC)histos.h \
+ $(INC)peida.h \
+ $(INC)defs.h \
+ $(INC)utils.h \
+ $(INC)machine.h \
+ $(INC)perrors.h \
+ $(INC)exceptions.h
+$(OBJ)piimage.o: ./piimage.cc piimage.h \
  $(INC)cimage.h \
  $(INC)rzimage.h \
  $(INC)rzvect.h \
  $(INC)machine.h \
+ $(INC)defs.h \
+ $(INC)exceptions.h \
+ $(INC)perrors.h \
  $(INC)datatypes.h \
+ $(INC)lut.h pisysdep.h \
+ pipixmapx.h pipixmapgen.h pibwdgx.h pibwdggen.h piwdgx.h piwdggen.h \
+ pimsghandler.h picmap.h picmapx.h picmapgen.h pistdwdgx.h \
+ pistdwdggen.h \
+ $(INC)imageop.h \
+ $(INC)fitsimage.h \
  $(INC)fitsheader.h \
- $(INC)fitskeys.h \
- $(INC)utils.h $(INC)peida.h 
-
-piapp : $(EXE)piapp 
-	
-$(EXE)piapp  : $(OBJ)pidemo.o $(OBJ)pidemoup.o \
-                $(SLB)libPI.so $(SLB)libpeida.so $(SLB)liberosc.so 
-	cc -o $(EXE)piapp $(OBJ)pidemo.o $(OBJ)pidemoup.o \
-              -L$(SLB) -lPI -lpeida -lerosc -lgcxx -lXm -lXt -lX11 -lm  
-
-$(OBJ)pitestapp.o: pitestapp.cc pisysdep.h piapplx.h piapplgen.h \
- pimsghandler.h picontainerx.h picontainergen.h piwdgx.h piwdggen.h \
- pimenubarx.h pimenubargen.h pimenux.h pimenugen.h piwindowx.h \
- piwindowgen.h pioptmenux.h pioptmenugen.h pistdwdgx.h pistdwdggen.h \
- pibwdgx.h pibwdggen.h pipixmapx.h pipixmapgen.h picmap.h picmapx.h \
- picmapgen.h pifilechox.h pifilechogen.h ex_dessin.h piimage.h \
- $(INC)cimage.h \
- $(INC)rzimage.h \
- $(INC)rzvect.h \
- $(INC)machine.h $(INC)defs.h \
+ $(INC)fitskeys.h
+$(OBJ)pimenubargen.o: ./pimenubargen.cc pimenubargen.h pisysdep.h pimenux.h \
+ pimenugen.h piwdgx.h piwdggen.h pimsghandler.h piapplx.h piapplgen.h \
+ picontainerx.h picontainergen.h pimenubarx.h
+$(OBJ)pimenubarx.o: ./pimenubarx.cc pimenubarx.h pimenubargen.h pisysdep.h \
+ pimenux.h pimenugen.h piwdgx.h piwdggen.h pimsghandler.h piapplx.h \
+ piapplgen.h picontainerx.h picontainergen.h
+$(OBJ)pimenugen.o: ./pimenugen.cc pimenugen.h pisysdep.h piwdgx.h piwdggen.h \
+ pimsghandler.h
+$(OBJ)pimenux.o: ./pimenux.cc pimenux.h pimenugen.h pisysdep.h piwdgx.h \
+ piwdggen.h pimsghandler.h
+$(OBJ)pimsghandler.o: ./pimsghandler.cc pimsghandler.h
+$(OBJ)pioptmenugen.o: ./pioptmenugen.cc pioptmenugen.h pisysdep.h \
+ picontainerx.h picontainergen.h piwdgx.h piwdggen.h pimsghandler.h \
+ pimenux.h pimenugen.h
+$(OBJ)pioptmenux.o: ./pioptmenux.cc pisysdep.h pioptmenux.h pioptmenugen.h \
+ picontainerx.h picontainergen.h piwdgx.h piwdggen.h pimsghandler.h \
+ pimenux.h pimenugen.h pistdwdgx.h pistdwdggen.h
+$(OBJ)pipixmapgen.o: ./pipixmapgen.cc pipixmapgen.h pisysdep.h pibwdgx.h \
+ pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h \
+ picmapgen.h
+$(OBJ)pipixmapx.o: ./pipixmapx.cc pipixmapx.h pipixmapgen.h pisysdep.h \
+ pibwdgx.h pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picmap.h \
+ picmapx.h picmapgen.h
+$(OBJ)piscdrawwdg.o: ./piscdrawwdg.cc piscdrawwdg.h pisysdep.h pibwdgx.h \
+ pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h \
+ $(INC)generalfit.h \
  $(INC)exceptions.h \
- $(INC)perrors.h \
- $(INC)datatypes.h $(INC)lut.h
-
-pitest : $(EXE)pitest
-	
-$(EXE)pitest  : $(OBJ)pitestapp.o $(LIB)libPI.a
-	g++ -v -o $(EXE)pitest $(OBJ)pitestapp.o -L$(LIB) -lPI -lImages -lOutils -lmath -lXm -lXt -lX11 -lm
+ $(INC)defs.h \
+ $(INC)matrix.h \
+ $(INC)peida.h \
+ $(INC)utils.h \
+ $(INC)machine.h \
+ $(INC)perrors.h \
+ $(INC)ppersist.h \
+ $(INC)pclassids.h \
+ $(INC)cvector.h
+$(OBJ)pistdwdggen.o: ./pistdwdggen.cc pistdwdggen.h pisysdep.h piwdgx.h \
+ piwdggen.h pimsghandler.h
+$(OBJ)pistdwdgx.o: ./pistdwdgx.cc pisysdep.h pistdwdgx.h pistdwdggen.h \
+ piwdgx.h piwdggen.h pimsghandler.h
+$(OBJ)piwdggen.o: ./piwdggen.cc piwdggen.h pimsghandler.h picontainergen.h \
+ pisysdep.h piwdgx.h
+$(OBJ)piwdgx.o: ./piwdgx.cc piwdgx.h piwdggen.h pimsghandler.h \
+ picontainerx.h pisysdep.h picontainergen.h
+$(OBJ)piwindowgen.o: ./piwindowgen.cc piwindowgen.h pisysdep.h \
+ picontainerx.h picontainergen.h piwdgx.h piwdggen.h pimsghandler.h
+$(OBJ)piwindowx.o: ./piwindowx.cc piwindowx.h piwindowgen.h pisysdep.h \
+ picontainerx.h picontainergen.h piwdgx.h piwdggen.h pimsghandler.h
+$(OBJ)pixtbase.o: ./pixtbase.cc pixtbaseP.h pibwdgx.h pisysdep.h pibwdggen.h \
+ piwdgx.h piwdggen.h pimsghandler.h pixtbase.h
Index: /trunk/SophyaPI/PI/ex_dessin.cc
===================================================================
--- /trunk/SophyaPI/PI/ex_dessin.cc	(revision 10)
+++ /trunk/SophyaPI/PI/ex_dessin.cc	(revision 11)
@@ -12,5 +12,5 @@
 
 {
-mfnt = nc = 0;
+mmrk = mfnt = nc = 0;
 strcpy(str, "Bonjour");
 for(int i=strlen(str); i<20; i++) str[i] = ' ';
@@ -42,4 +42,5 @@
 void ExBWdg::Draw()
 {
+EraseWindow();
 SelLine(PI_NormalLine);
 DrawBox(10,10, XSize()-20, YSize()-20);
@@ -70,4 +71,9 @@
 DrawFCircle(120, 60, 15);
 
+int x[5] = { 20, 35, 50, 65, 80 };
+int y[5] = { 130, 130, 130, 130, 130 };
+
+SelForeground(PI_Black);
+DrawMarkers(x, y, 5);
 return;
 }
@@ -94,7 +100,13 @@
 {
 PIFontAtt att[3] = { PI_RomanFont, PI_BoldFont, PI_ItalicFont};
+PIMarker  pmk[9] = { PI_DotMarker , PI_PlusMarker, PI_CrossMarker,  
+                 PI_CircleMarker, PI_FCircleMarker,
+                 PI_BoxMarker, PI_FBoxMarker,
+                 PI_TriangleMarker, PI_FTriangleMarker };
+
 if (++mfnt > 2)  mfnt = 0;
-
+if (++mmrk > 8)  mmrk = 0; 
 SelFont(PI_NormalSizeFont, att[mfnt]);
+SelMarker(8, pmk[mmrk]);
 return;
 }
Index: /trunk/SophyaPI/PI/ex_dessin.h
===================================================================
--- /trunk/SophyaPI/PI/ex_dessin.h	(revision 10)
+++ /trunk/SophyaPI/PI/ex_dessin.h	(revision 11)
@@ -33,5 +33,5 @@
 
 protected:
-  int mfnt;
+  int mfnt, mmrk;
   int nc;
   char str[21];
Index: /trunk/SophyaPI/PI/pibwdggen.cc
===================================================================
--- /trunk/SophyaPI/PI/pibwdggen.cc	(revision 10)
+++ /trunk/SophyaPI/PI/pibwdggen.cc	(revision 11)
@@ -41,5 +41,5 @@
 
 /* --Methode-- */
-void PIBaseWdgGen::But1Press(int x, int y)
+void PIBaseWdgGen::But1Press(int /*x*/, int /*y*/)
 {
 #ifdef DEBUG_RZXB
@@ -50,5 +50,5 @@
 
 /* --Methode-- */
-void PIBaseWdgGen::But1Release(int x, int y)
+void PIBaseWdgGen::But1Release(int /*x*/, int /*y*/)
 {
 #ifdef DEBUG_RZXB
@@ -84,5 +84,5 @@
 
 /* --Methode-- */
-void PIBaseWdgGen::Ptr1Move(int x, int y)
+void PIBaseWdgGen::Ptr1Move(int /*x*/, int /*y*/)
 {
 #ifdef DEBUG_RZXB
@@ -106,5 +106,5 @@
 
 /* --Methode-- */
-void PIBaseWdgGen::Keyboard(int key, PIKeyModifier kmod)
+void PIBaseWdgGen::Keyboard(int /*key*/, PIKeyModifier /*kmod*/)
 {
 #ifdef DEBUG_RZXB
Index: /trunk/SophyaPI/PI/pibwdggen.h
===================================================================
--- /trunk/SophyaPI/PI/pibwdggen.h	(revision 10)
+++ /trunk/SophyaPI/PI/pibwdggen.h	(revision 11)
@@ -9,13 +9,24 @@
 enum PIKeyModifier { PIKM_Blank = 0, PIKM_Shift = 1, PIKM_Alt = 2, PIKM_Cntl = 4 } ; 
 
-enum PIColors { PI_Black = 0, PI_White = 1,  PI_Grey = 2,
-                PI_Red = 3, PI_Blue = 4, PI_Green = 5,  
-                PI_Yellow = 5, PI_Magenta =6} ; 
-enum PIFontSize {PI_SmallSizeFont = 1, PI_NormalSizeFont = 2, PI_BigSizeFont = 3 };
-enum PIFontAtt {PI_RomanFont = 1, PI_BoldFont = 2, PI_ItalicFont = 4 };
+enum PIColors  { PI_Black = 0, PI_White = 1,  PI_Grey = 2,
+                 PI_Red = 3, PI_Blue = 4, PI_Green = 5,  
+                 PI_Yellow = 6, PI_Magenta =7 }; 
+
+enum PIFontSize { PI_SmallSizeFont = 1, PI_NormalSizeFont = 2, PI_BigSizeFont = 3 };
+
+enum PIFontAtt { PI_RomanFont = 1, PI_BoldFont = 2, PI_ItalicFont = 4 };
+
 enum PILineAtt { PI_NormalLine = 0, PI_ThinLine = 1, PI_ThickLine = 2 };
+
+enum PIMarker  { PI_DotMarker = 0, PI_PlusMarker=1, PI_CrossMarker=2,  
+                 PI_CircleMarker=3, PI_FCircleMarker=4,
+                 PI_BoxMarker=5, PI_FBoxMarker=6,
+                 PI_TriangleMarker=7, PI_FTriangleMarker=8,
+                 PI_StarMarker=9, PI_FStarMarker=10 };
 
 enum PIPointer { PI_ArrowPointer = 1, PI_CrossPointer = 2, 
                  PI_HandPointer = 3, PI_TDLRArrowPointer = 4 };
+
+enum PIGOMode { PI_GOCopy = 0, PI_GOXOR = 1 }; 
 
 class PIBaseWdgGen : public PIWdg
@@ -28,7 +39,7 @@
                      PIBaseWdgGen(PIContainerGen *par, char *nom,
                                    int sx=10, int sy=10, int px=0, int py=0);
-  virtual           ~PIBaseWdgGen();
+  virtual            ~PIBaseWdgGen();
 
-  virtual long    kind() {return ClassId; }
+  virtual long       kind() {return ClassId; }
 
 //  Activation des evenements   
@@ -41,26 +52,47 @@
   virtual void       EraseWindow()             = 0;
   virtual void       DrawString(int x, int y, char* s, int pos = 0)        = 0;
-  virtual void       DrawLine(int x1, int y1, int x2, int y2)              = 0;  
+  virtual void       DrawLine(int x1, int y1, int x2, int y2)              = 0;
   virtual void       DrawBox(int x0, int y0, int dx, int dy)               = 0;
   virtual void       DrawFBox(int x0, int y0, int dx, int dy)              = 0;
   virtual void       DrawCircle(int x0, int y0, int r)                     = 0;
   virtual void       DrawFCircle(int x0, int y0, int r)                    = 0;
+  virtual void       DrawPolygon(int *x, int *y, int n)                    = 0;  
+  virtual void       DrawFPolygon(int *x, int *y, int n)                   = 0;  
+  virtual void       DrawMarker(int x0, int y0)                            = 0;
+  virtual void       DrawMarkers(int *x, int *y, int n)                    = 0;
+
+
 
   virtual int        CalcStringWidth(char const* s)                        = 0;
 
+// Modifications attributs graphiques
   virtual void       SelForeground(PIColors col=PI_Black)                  = 0;
   virtual void       SelBackground(PIColors col=PI_White)                  = 0;
+  virtual void       SelGOMode(PIGOMode mod=PI_GOCopy)                     = 0;
   virtual void       SelFont(PIFontSize sz=PI_NormalSizeFont, 
                              PIFontAtt att=PI_RomanFont)                   = 0;
   virtual void       SelFontSzPt(int npt=12, PIFontAtt att=PI_RomanFont)   = 0; 
   virtual void       SelLine(PILineAtt att=PI_NormalLine)                  = 0;
-  virtual void       SelPointerShape(PIPointer ptr)                        = 0;
+  virtual void       SelPointerShape(PIPointer ptr=PI_ArrowPointer)        = 0;
+  virtual void       SelMarker(int msz=3, PIMarker mrk=PI_DotMarker)       = 0;
+
+// Acces aux attributs graphiques 
+  virtual PIColors   GetForeground()    = 0;
+  virtual PIColors   GetBackground()    = 0;
+  virtual PIGOMode   GetGOMode()        = 0;
+  virtual PIFontAtt  GetFontAtt()       = 0;
+  virtual int        GetFontSize()      = 0;
+  virtual PILineAtt  GetLineAtt()       = 0;
+  virtual PIPointer  GetPointerShape()  = 0;
+  virtual PIMarker   GetMarker()        = 0;
+  virtual int        GetMarkerSize()    = 0;
 
 
-  virtual void       Refresh()         = 0;
+//  Fonction qui doit etre appelee pour rafraichir (retracer) tout 
+  virtual void       Refresh()          = 0;
   
 // Traitement des evenements   
-  virtual void       Resize()          = 0;
-  virtual void       Draw()            = 0;
+  virtual void       Resize()           = 0;
+  virtual void       Draw()             = 0;
   virtual void       Draw(int x0, int y0, int dx, int dy) = 0;
 
Index: /trunk/SophyaPI/PI/pibwdgx.cc
===================================================================
--- /trunk/SophyaPI/PI/pibwdgx.cc	(revision 10)
+++ /trunk/SophyaPI/PI/pibwdgx.cc	(revision 11)
@@ -46,11 +46,16 @@
 
 mDefGC = XCreateGC (PIXDisplay(), XtWindow(PIXtTopWdg()), 0, NULL);
-
+mGOm = PI_GOCopy;
+
+mFCol = mBCol = PI_Grey;
 SelForeground(PI_Black);
 SelBackground(PI_White);
+mLAtt = PI_ThinLine;
 SelLine();
+mFAtt = PI_BoldFont;  mFSize = 0;
 SelFont();
-SelPointerShape(PI_ArrowPointer);
-
+mPtrS = PI_CrossPointer;
+SelPointerShape();
+SelMarker(1, PI_DotMarker);
 Manage();
 }
@@ -139,4 +144,5 @@
 }
 
+ 
 /* --Methode-- */
 void PIBaseWdgX::DrawLine(int x1, int y1, int x2, int y2)
@@ -145,4 +151,5 @@
 return;
 }
+
 
 /* --Methode-- */
@@ -182,4 +189,116 @@
 }
 
+// Pour les fonctions de trace avec un plusieurs coordonnees
+#define NMXXPOINTS  30 
+
+/* --Methode-- */
+void PIBaseWdgX::DrawPolygon(int *x, int *y, int n)
+{
+XPoint multipoint[NMXXPOINTS];
+XPoint *pxp;
+int i;
+
+if (n <= 0)  return;
+if (n > NMXXPOINTS)  pxp = new XPoint[n];
+else pxp = multipoint;
+for(i=0; i<n; i++)  { pxp[i].x = x[i];  pxp[i].y = y[i]; } 
+XDrawLines(XtDisplay(XtWdg()), XtWindow(XtWdg()), DefGC(), pxp, n, CoordModePrevious);
+if (n > NMXXPOINTS)  delete[] pxp;
+return;
+}
+
+
+/* --Methode-- */
+void PIBaseWdgX::DrawFPolygon(int *x, int *y, int n)
+{
+XPoint multipoint[NMXXPOINTS];
+XPoint *pxp;
+int i;
+
+if (n <= 0)  return;
+if (n > NMXXPOINTS)  pxp = new XPoint[n];
+else pxp = multipoint;
+for(i=0; i<n; i++)  { pxp[i].x = x[i];  pxp[i].y = y[i]; } 
+XFillPolygon(XtDisplay (XtWdg()), XtWindow(XtWdg()), DefGC(), pxp, n, 
+                        Complex, CoordModePrevious);
+if (n > NMXXPOINTS)  delete[] pxp;
+return;
+}
+
+/* --Methode-- */
+void PIBaseWdgX::DrawMarker(int x0, int y0)
+{
+int hmsz = mMrkSz/2;
+int dmsz = mMrkSz-hmsz;
+int x[4],y[4];
+PILineAtt clatt;
+
+if (mMrk == PI_DotMarker)
+  XDrawPoint(XtDisplay(XtWdg()), XtWindow(XtWdg()), DefGC(), x0, y0);
+
+else
+  {
+  clatt = mLAtt;
+  SelLine(PI_ThinLine);
+  switch (mMrk)
+    {
+    case  PI_PlusMarker :
+      DrawLine(x0-hmsz, y0, x0+dmsz, y0);
+      DrawLine(x0, y0-hmsz, x0, y0+dmsz);
+      break;
+    case  PI_CrossMarker :
+      DrawLine(x0-hmsz, y0-hmsz, x0+dmsz, y0+dmsz);
+      DrawLine(x0-hmsz, y0+dmsz, x0+dmsz, y0-hmsz);
+      break;  
+    case PI_CircleMarker :
+      DrawCircle(x0, y0, hmsz);
+      break;
+    case PI_FCircleMarker :
+      DrawFCircle(x0, y0, hmsz);
+      break;
+    case PI_BoxMarker :
+      DrawBox(x0-hmsz, y0-hmsz, mMrkSz, mMrkSz);
+      break;
+    case PI_FBoxMarker :
+      DrawFBox(x0-hmsz, y0-hmsz, mMrkSz, mMrkSz);
+      break;
+    case  PI_TriangleMarker :
+      x[1] = mMrkSz; y[1] = 0; x[2] = -hmsz; y[2] = -mMrkSz; 
+      x[3] = -dmsz; y[3] = +mMrkSz; x[0] = x0-hmsz; y[0] = y0+hmsz;  
+      DrawPolygon(x, y, 4);
+      break;
+    case  PI_FTriangleMarker :
+      x[1] = mMrkSz; y[1] = 0; x[2] = -hmsz; y[2] = -mMrkSz; 
+      x[3] = -dmsz; y[3] = +mMrkSz; x[0] = x0-hmsz; y[0] = y0+hmsz;  
+      DrawFPolygon(x, y, 4);
+      break;
+    default :
+      XDrawPoint(XtDisplay(XtWdg()), XtWindow(XtWdg()), DefGC(), x0, y0);
+      break;
+    }
+  SelLine(clatt);
+  }
+return;
+}
+
+/* --Methode-- */
+void PIBaseWdgX::DrawMarkers(int *x, int *y, int n)
+{
+int i;
+
+if (n <= 0)  return;
+if (mMrk == PI_DotMarker)
+  {
+  XPoint multipoint[NMXXPOINTS];
+  XPoint *pxp;
+  if (n > NMXXPOINTS)  pxp = new XPoint[n];
+  else pxp = multipoint;
+  for(i=0; i<n; i++)  { pxp[i].x = x[i];  pxp[i].y = y[i]; } 
+  XDrawPoints(XtDisplay(XtWdg()), XtWindow(XtWdg()), DefGC(), pxp, n, CoordModeOrigin);
+  if (n > NMXXPOINTS)  delete[] pxp;  
+  }
+else for(i=0; i<n; i++) DrawMarker(x[i], y[i]);
+}
+
 /* --Methode-- */
 int PIBaseWdgX::CalcStringWidth(char const* s)
@@ -191,6 +310,8 @@
 void PIBaseWdgX::SelForeground(PIColors col)
 {
+if (col == mFCol)  return;
 if ( (col < 0) || (col >= NMAXCOL))  return;
 XSetForeground(XtDisplay(XtWdg()), DefGC(), colpix[col]); 
+mFCol = col;
 return;
 }
@@ -199,8 +320,29 @@
 void PIBaseWdgX::SelBackground(PIColors col)
 {
+if (col == mBCol)  return;
 if ( (col < 0) || (col >= NMAXCOL))  return;
 XSetBackground(XtDisplay(XtWdg()), DefGC(), colpix[col]); 
-return;
-}
+mBCol = col;
+return;
+}
+
+/* --Methode-- */
+void PIBaseWdgX::SelGOMode(PIGOMode mod)
+{
+if (mod == mGOm)  return;
+switch (mod)
+  {
+  case PI_GOCopy :
+    XSetFunction(XtDisplay(XtWdg()), DefGC(), GXcopy);
+    mGOm = mod;
+    break;
+  case PI_GOXOR :
+    XSetFunction(XtDisplay(XtWdg()), DefGC(), GXxor);
+    mGOm = mod;
+    break;
+  }
+return;
+}
+
 
 /* --Methode-- */
@@ -209,4 +351,5 @@
 int dsz,i,isel, j;
 
+if ((npt == mFSize) && (att == mFAtt))  return;
 isel = 0;
 dsz = 9999;
@@ -223,4 +366,5 @@
 
 SelectFont(isel, j);
+
 }
 
@@ -269,4 +413,6 @@
 unsigned int lt;
 
+if (att == mLAtt)  return;
+
 switch (att)
   {
@@ -285,6 +431,6 @@
   }
     
-XSetLineAttributes(XtDisplay(XtWdg()), DefGC(), lt, LineSolid, CapNotLast, JoinMiter);
-
+XSetLineAttributes(XtDisplay(XtWdg()), DefGC(), lt, LineSolid, CapButt, JoinMiter);
+mLAtt = att;
 return;
 }
@@ -294,8 +440,73 @@
 void PIBaseWdgX::SelPointerShape(PIPointer ptr)  
 {
+if (ptr == mPtrS)  return;
 if ( (ptr < 0) || (ptr >= NMAXCURS))  return;
 if ( XtIsRealized(XtWdg()) )
   XDefineCursor(XtDisplay (XtWdg()), XtWindow(XtWdg()), curs[ptr]);
-return;
+mPtrS = ptr;
+return;
+}
+
+/* --Methode-- */
+void PIBaseWdgX::SelMarker(int msz, PIMarker mrk)
+{
+if (msz > 1)  { mMrk = mrk;  mMrkSz = msz; }
+else  { mMrk = PI_DotMarker;  mMrkSz = 1; }
+return;
+}
+
+/* --Methode-- */
+PIColors  PIBaseWdgX::GetForeground() 
+{
+return (mFCol);
+}
+
+/* --Methode-- */
+PIColors  PIBaseWdgX::GetBackground() 
+{
+return (mBCol);
+}
+
+
+/* --Methode-- */
+PIGOMode   PIBaseWdgX::GetGOMode()
+{
+return (mGOm);
+}
+
+/* --Methode-- */
+PIFontAtt  PIBaseWdgX::GetFontAtt()
+{
+return (mFAtt);
+}
+
+/* --Methode-- */
+int        PIBaseWdgX::GetFontSize()
+{
+return (mFSize);
+}
+
+/* --Methode-- */
+PILineAtt  PIBaseWdgX::GetLineAtt()
+{
+return (mLAtt);
+}
+
+/* --Methode-- */
+PIPointer  PIBaseWdgX::GetPointerShape()
+{
+return (mPtrS);
+}
+
+/* --Methode-- */
+PIMarker   PIBaseWdgX::GetMarker()
+{
+return (mMrk);
+}
+
+/* --Methode-- */
+int        PIBaseWdgX::GetMarkerSize()
+{
+return (mMrkSz);
 }
 
@@ -459,5 +670,5 @@
 {
 char buff[256];
-int i,j,jj,k, count;
+int i,j,k, count;
 char **list;
 XFontStruct * defnt;
Index: /trunk/SophyaPI/PI/pibwdgx.h
===================================================================
--- /trunk/SophyaPI/PI/pibwdgx.h	(revision 10)
+++ /trunk/SophyaPI/PI/pibwdgx.h	(revision 11)
@@ -31,20 +31,38 @@
   virtual void   DrawCircle(int x0, int y0, int r);
   virtual void   DrawFCircle(int x0, int y0, int r);
+  virtual void   DrawPolygon(int *x, int *y, int n);  
+  virtual void   DrawFPolygon(int *x, int *y, int n);  
+  virtual void   DrawMarker(int x0, int y0);
+  virtual void   DrawMarkers(int *x, int *y, int n);
 
   virtual int    CalcStringWidth(char const* s);
 
+// Modifications attributs graphiques
   virtual void   SelForeground(PIColors col=PI_Black);
   virtual void   SelBackground(PIColors col=PI_White);
+  virtual void   SelGOMode(PIGOMode mod=PI_GOCopy);
   virtual void   SelFont(PIFontSize sz=PI_NormalSizeFont, 
                          PIFontAtt att=PI_RomanFont);
   virtual void   SelFontSzPt(int npt=12, PIFontAtt att=PI_RomanFont);
   virtual void   SelLine(PILineAtt att=PI_NormalLine);
-  virtual void   SelPointerShape(PIPointer ptr);
+  virtual void   SelPointerShape(PIPointer ptr=PI_ArrowPointer);
+  virtual void   SelMarker(int msz, PIMarker mrk=PI_DotMarker);
   
 
+// Acces aux attributs graphiques 
+  virtual PIColors   GetForeground();
+  virtual PIColors   GetBackground();
+  virtual PIGOMode   GetGOMode();
+  virtual PIFontAtt  GetFontAtt();
+  virtual int        GetFontSize();
+  virtual PILineAtt  GetLineAtt();
+  virtual PIPointer  GetPointerShape();
+  virtual PIMarker   GetMarker();
+  virtual int        GetMarkerSize();
+
+//  Fonction qui doit etre appelee pour rafraichir (retracer) tout 
   virtual void   Refresh();
 
 // Traitement des evenements   
-
   virtual void   Resize();
   virtual void   Draw();
@@ -71,7 +89,13 @@
 
   GC mDefGC;
+  PIColors  mFCol, mBCol;
+  PIGOMode mGOm;
+  PIPointer mPtrS;
   PIFontAtt mFAtt;
+  PILineAtt mLAtt;
   int mFSize;
   XFontStruct *mFSt;
+  PIMarker mMrk;
+  int mMrkSz;
 };
 
Index: /trunk/SophyaPI/PI/pidemo.cc
===================================================================
--- /trunk/SophyaPI/PI/pidemo.cc	(revision 10)
+++ /trunk/SophyaPI/PI/pidemo.cc	(revision 11)
@@ -12,5 +12,5 @@
 
 /*  Pour le link dynamique  */
-typedef FitsImageR4 * (* UsPrFunc) (FitsImageR4 * myimg, int xp, int yp,
+typedef FitsImageR4 * (* UsPrFunc) (FitsImageR4 * myimg, int xp, int yp, int dx, int dy,
                                     char * arg1, char * arg2);
 static UsPrFunc  userFunc[3] = { NULL, NULL, NULL };
@@ -37,13 +37,13 @@
 rc = 0;
 printf("PIDemo_DynLink(): Searching for PIUserProc_1 (Rc=%d) \n", rc);
-uf = dlsym(dlhandle, "PIUserProc_1__FPt9FitsImage1ZfiiPcT3");
+uf = dlsym(dlhandle, "PIUserProc_1__FPt9FitsImage1ZfiiiiPcT5");
 if (uf != NULL)  userFunc[0] = uf;
 else rc += 2;
 printf("PIDemo_DynLink(): Searching for PIUserProc_3 (Rc=%d) \n", rc);
-uf = dlsym(dlhandle, "PIUserProc_2__FPt9FitsImage1ZfiiPcT3");
+uf = dlsym(dlhandle, "PIUserProc_2__FPt9FitsImage1ZfiiiiPcT5");
 if (uf != NULL)  userFunc[1] = uf;
 else rc += 4;
 printf("PIDemo_DynLink(): Searching for PIUserProc_3 (Rc=%d) \n", rc);
-uf = dlsym(dlhandle, "PIUserProc_3__FPt9FitsImage1ZfiiPcT3");
+uf = dlsym(dlhandle, "PIUserProc_3__FPt9FitsImage1ZfiiiiPcT5");
 if (uf != NULL)  userFunc[2] = uf;
 else rc += 8;
@@ -678,5 +678,5 @@
 {
 FitsImageR4 *mimg, *oimg;
-int xp, yp;
+int xp, yp, dx, dy;
 
 switch (msg)
@@ -692,4 +692,6 @@
     xp = (dap->CurrentPIImage())->XPave();
     yp = (dap->CurrentPIImage())->YPave();
+    dx = (dap->CurrentPIImage())->XSzPave();
+    dy = (dap->CurrentPIImage())->YSzPave();
     dap->SetBusy();
     this->Hide();
@@ -700,5 +702,5 @@
       case 2 :
       case 3 :
-        oimg = userFunc[mUpr-1] (mimg, xp, yp, 
+        oimg = userFunc[mUpr-1] (mimg, xp, yp, dx, dy,
                             (char *) (mText[1]->GetText().c_str()), 
                             (char *) (mText[2]->GetText().c_str()));
@@ -706,5 +708,5 @@
 /*
       case 2 :
-        oimg = PIUserProc_2(mimg, xp, yp, 
+        oimg = PIUserProc_2(mimg, xp, yp, dx, dy,
                             (char *) (mText[1]->GetText().c_str()), 
                             (char *) (mText[2]->GetText().c_str()));
@@ -712,5 +714,5 @@
 
       case 3 :
-        oimg = PIUserProc_3(mimg, xp, yp, 
+        oimg = PIUserProc_3(mimg, xp, yp, dx, dy,
                             (char *) (mText[1]->GetText().c_str()), 
                             (char *) (mText[2]->GetText().c_str()));
Index: /trunk/SophyaPI/PI/piimage.cc
===================================================================
--- /trunk/SophyaPI/PI/piimage.cc	(revision 10)
+++ /trunk/SophyaPI/PI/piimage.cc	(revision 11)
@@ -28,7 +28,13 @@
 offx = offy = 0;
 xpav = ypav = 0;
+xszpav = yszpav = 1;
+xmv0 = ymv0 = -1;
+dxmv = dymv = 0;
 zoom = 1;
 
 SetColMap(CMAP_COLRJ32);
+
+SelForeground(PI_White);
+SelBackground(PI_Black);
 
 ActivateButton(1);
@@ -36,4 +42,6 @@
 ActivateButton(2);
 ActivateMove(2);
+ActivateButton(3);
+ActivateMove(3);
 
 
@@ -54,4 +62,5 @@
 offx = offy = 0;
 xpav = ypav = 0;
+xszpav = yszpav = 1;
 img = pim;
 if (img)
@@ -192,9 +201,10 @@
 if ( PosW2Img(x, y, &xp, &yp) )  return;
 SelPointerShape(PI_CrossPointer);
-xpav = xp;  ypav = yp; 
+xpav = xp;  ypav = yp;
 Apply(false);
 return;
 }
 
+
 /* --Methode-- */
 void PIImage::Ptr1Move(int x, int y)
@@ -203,9 +213,10 @@
 if (img == NULL)  return;
 if ( PosW2Img(x, y, &xp, &yp) )  return;
-xpav = xp;  ypav = yp; 
+xpav = xp;  ypav = yp;
 Apply(false);
 return;
 }
 
+
 /* --Methode-- */
 void PIImage::But1Release(int /*x*/,  int /*y*/)
@@ -222,5 +233,57 @@
 
 if (img == NULL)  return;
+if ( PosW2Img(x, y, &xp, &yp) )  { xmv0 = -1;  return; }
+xmv0 = x;  ymv0 = y;  dxmv = dymv = 0;
+Send(PIMsg_ActiveWindow, (char *)this);
+SelGOMode(PI_GOXOR);
+SelForeground(PI_Yellow);
+SelLine(PI_ThinLine);
+return;
+}
+
+/* --Methode-- */
+void PIImage::Ptr2Move(int x, int y)
+{
+int xp, yp;
+if (img == NULL)  return;
+if (xmv0 < 0)  return;
 if ( PosW2Img(x, y, &xp, &yp) )  return;
+DrawBox(xmv0, ymv0, dxmv, dymv);
+dxmv = x-xmv0;  dymv = y-ymv0;
+DrawBox(xmv0, ymv0, dxmv, dymv);
+return;
+}
+
+/* --Methode-- */
+void PIImage::But2Release(int x, int y)
+{
+int xp, yp, xp2, yp2;
+
+if (img == NULL)  return;
+if (img == NULL)  return;
+if (xmv0 < 0)  return;
+DrawBox(xmv0, ymv0, dxmv, dymv);
+SelGOMode(PI_GOCopy);
+SelForeground(PI_White);
+PosW2Img(xmv0, ymv0, &xp, &yp);
+if ( PosW2Img(x, y, &xp2, &yp2) )  
+  PosW2Img(xmv0+dxmv, ymv0+dymv, &xp2, &yp2);
+xpav = (xp+xp2)/2;
+ypav = (yp+yp2)/2;
+xszpav = ((xp2-xp) > 0) ? (xp2-xp) : 1;
+yszpav = ((yp2-yp) > 0) ? (yp2-yp) : 1;
+
+Apply(false);
+return;
+}
+
+
+/* --Methode-- */
+void PIImage::But3Press(int x, int y)
+{
+int xp, yp;
+
+if (img == NULL)  return;
+if ( PosW2Img(x, y, &xp, &yp) )  { xmv0 = -1;  return; }
 SelPointerShape(PI_TDLRArrowPointer);
 xmv0 = xp;
@@ -232,8 +295,9 @@
 
 /* --Methode-- */
-void PIImage::Ptr2Move(int x, int y)
-{
-int xp, yp;
-if (img == NULL)  return;
+void PIImage::Ptr3Move(int x, int y)
+{
+int xp, yp;
+if (img == NULL)  return;
+if (xmv0 < 0)  return;
 if ( PosW2Img(x, y, &xp, &yp) )  return;
 if (txw)
@@ -246,5 +310,5 @@
 
 /* --Methode-- */
-void PIImage::But2Release(int x, int y)
+void PIImage::But3Release(int x, int y)
 {
 int xp, yp;
@@ -252,4 +316,5 @@
 SelPointerShape(PI_ArrowPointer);
 if (img == NULL)  return;
+if (xmv0 < 0)  return;
 if ( PosW2Img(x, y, &xp, &yp) )  return;
 
@@ -262,5 +327,5 @@
 if (offy >= img->YSize())  offy = img->YSize();
 xpav = xmv0;  ypav = ymv0;
-
+xmv0 = ymv0 = -1;
 Apply();
 return;
@@ -465,5 +530,8 @@
 xpav = offx+xwsz/2; 
 ypav = offx+ywsz/2;
-
-return;
-}
+xszpav = ((xwsz+ywsz)/20) ;
+if (xszpav < 1) xszpav = 1;
+yszpav = xszpav; 
+
+return;
+}
Index: /trunk/SophyaPI/PI/piimage.h
===================================================================
--- /trunk/SophyaPI/PI/piimage.h	(revision 10)
+++ /trunk/SophyaPI/PI/piimage.h	(revision 11)
@@ -17,21 +17,4 @@
 {
 
-private:
-  RzImage * img;
-
-  unsigned char * pixm;
-  int xspxm, yspxm;
-
-  LUT * lut;
-  int offx, offy;
-
-  int zoom;
-  PIPixmap * zow;
-  unsigned char * zpixm;
-  int xszpxm, yszpxm;
-
-  PILabel * txw;
-  int xpav, ypav;
-  int xmv0, ymv0;
 public:
 //  Les methodes 
@@ -59,4 +42,7 @@
   inline int YPave() { return(ypav); } ;
 
+  inline int XSzPave() { return(xszpav); }
+  inline int YSzPave() { return(yszpav); }
+
   void Apply(bool mw=true);
 
@@ -69,4 +55,7 @@
   virtual void But2Release(int x, int y);
   virtual void Ptr2Move(int x, int y);
+  virtual void But3Press(int x, int y);
+  virtual void But3Release(int x, int y);
+  virtual void Ptr3Move(int x, int y);
 
 private:
@@ -81,4 +70,27 @@
   void SetOffset();
   void SetPave();
+  void SetPave(int x, int y, int dx=-1, int dy = -1);
+
+// Les donnees 
+
+  RzImage * img;
+
+  unsigned char * pixm;
+  int xspxm, yspxm;
+
+  LUT * lut;
+  int offx, offy;
+
+  int zoom;
+  PIPixmap * zow;
+  unsigned char * zpixm;
+  int xszpxm, yszpxm;
+
+  PILabel * txw;
+  int xpav, ypav;
+  int xmv0, ymv0;
+  int dxmv, dymv;
+  int xszpav, yszpav;
+
 };
 
Index: /trunk/SophyaPI/PI/piscdrawwdg.cc
===================================================================
--- /trunk/SophyaPI/PI/piscdrawwdg.cc	(revision 10)
+++ /trunk/SophyaPI/PI/piscdrawwdg.cc	(revision 11)
@@ -12,4 +12,7 @@
   SetAxesFlags(kAxesDflt);
   clip = true;
+  ActivateButton(2);
+  ActivateMove(2);
+
 }
 
@@ -56,6 +59,6 @@
   xScale = XSize() / (xMax-xMin + 2*margeH);
   yScale = -YSize() / (yMax-yMin + 2*margeV);
-  xOrg   = (-xMin + margeH) * xScale + XPos();
-  yOrg   = (-yMax - margeV) * yScale + YPos();
+  xOrg   = (-xMin + margeH) * xScale /* + XPos() */;  // $CHECK$ Reza Pourquoi + X,YPos() ?
+  yOrg   = (-yMax - margeV) * yScale /* + YPos() */;
 }
 
@@ -133,4 +136,10 @@
 }
 
+void
+PIScDrawWdg::ScSelMarker(double size, PIMarker mrk)
+{
+  int isz = int(fabs(size * xScale)+.5);
+  SelMarker( isz, mrk);
+}
 
 void
@@ -182,4 +191,5 @@
 }  
 
+
 void
 PIScDrawWdg::ScDrawBox(double x, double y, double dx, double dy)
@@ -262,5 +272,66 @@
   rPix = r * xScale;
   DrawFCircle(xPix, yPix, rPix);
-}  
+}
+
+#define NMXMULTP  30   // Pour multipoint sans new
+
+void  
+PIScDrawWdg::ScDrawPolygon(double *x, double *y, int n)
+{
+int ix[NMXMULTP], iy[NMXMULTP];
+int *pxi, *pyi;
+int i;
+ 
+if (n <= 0)  return;
+if (n > NMXMULTP) { pxi = new int[n];  pyi = new int[n]; }
+else { pxi = ix;  pyi = iy; }
+for(i=0; i<n; i++)  
+  Sc2Local(x[i], y[i], pxi[i], pyi[i]);
+DrawPolygon(pxi, pyi, n);
+if (n > NMXMULTP) { delete[] pxi;  delete[] pyi; }
+return;
+}
+  
+void  
+PIScDrawWdg::ScDrawFPolygon(double *x, double *y, int n)
+{
+int xi[NMXMULTP], yi[NMXMULTP];
+int *pxi, *pyi;
+int i;
+ 
+if (n <= 0)  return;
+if (n > NMXMULTP) { pxi = new int[n];  pyi = new int[pyi]; }
+else { pxi = xi;  pyi = yi; }
+for(i=0; i<n; i++)  
+  Sc2Local(x[i], y[i], pxi[i], pyi[i]);
+DrawFPolygon(pxi, pyi, n);
+if (n > NMXMULTP) { delete[] pxi;  delete[] pyi; }
+return;
+}
+
+void  
+PIScDrawWdg::ScDrawMarker(double x0, double y0)
+{
+  int xPix, yPix;
+  Sc2Local(x0, y0, xPix, yPix);
+  DrawMarker(xPix, yPix);
+  return;
+}
+void  
+PIScDrawWdg::ScDrawMarkers(double *x, double *y, int n)
+{
+int xi[NMXMULTP], yi[NMXMULTP];
+int *pxi, *pyi;
+int i;
+ 
+if (n <= 0)  return;
+if (n > NMXMULTP) { pxi = new int[n];  pyi = new int[pyi]; }
+else { pxi = xi;  pyi = yi; }
+for(i=0; i<n; i++)  
+  Sc2Local(x[i], y[i], pxi[i], pyi[i]);
+DrawMarkers(pxi, pyi, n);
+if (n > NMXMULTP) { delete[] pxi;  delete[] pyi; }
+return;
+}
 
 void
@@ -469,17 +540,26 @@
 PIScDrawWdg::But2Press(int x, int y)
 {
-  SelPointerShape(PI_CrossPointer);
   xEndDrag = xBegDrag = x;
   yEndDrag = yBegDrag = y;
-}
-
-void
-PIScDrawWdg::But2Release(int x, int y)
-{
-
-  SelPointerShape(PI_ArrowPointer);
-  SelForeground(PI_White);
+  cForCol = GetForeground();
+  cGOmod  = GetGOMode();
+  cPointer = GetPointerShape();
+  cLatt = GetLineAtt();
+  SelPointerShape(PI_CrossPointer);
+  SelForeground(PI_Magenta);
+  SelGOMode(PI_GOXOR);
+  SelLine(PI_ThinLine);
+}
+
+void
+PIScDrawWdg::But2Release(int /*x*/, int /*y*/)
+{
+
   DrawBox(xBegDrag, yBegDrag, xEndDrag-xBegDrag, yEndDrag-yBegDrag);
-  SelForeground(PI_Black);
+
+  SelForeground(cForCol);
+  SelGOMode(cGOmod);
+  SelPointerShape(cPointer); 
+  SelLine(cLatt); 
   
   if (xBegDrag == xEndDrag || yBegDrag == yEndDrag)
@@ -500,9 +580,7 @@
 PIScDrawWdg::Ptr2Move(int x, int y)
 {
-  SelForeground(PI_White);
   DrawBox(xBegDrag, yBegDrag, xEndDrag-xBegDrag, yEndDrag-yBegDrag);
   xEndDrag = x;
   yEndDrag = y;
-  SelForeground(PI_Black);
   DrawBox(xBegDrag, yBegDrag, xEndDrag-xBegDrag, yEndDrag-yBegDrag);
 }
Index: /trunk/SophyaPI/PI/piscdrawwdg.h
===================================================================
--- /trunk/SophyaPI/PI/piscdrawwdg.h	(revision 10)
+++ /trunk/SophyaPI/PI/piscdrawwdg.h	(revision 11)
@@ -30,11 +30,18 @@
   
   virtual void       ScDrawString(double x, double y, char* s, int pos = 0);
-  virtual void       ScDrawLine(double x1, double y1, double x2, double y2);  
+  virtual void       ScDrawLine(double x1, double y1, double x2, double y2);
   virtual void       ScDrawBox(double x0, double y0, double dx, double dy);
   virtual void       ScDrawFBox(double x0, double y0, double dx, double dy);
   virtual void       ScDrawCircle(double x0, double y0, double r);
   virtual void       ScDrawFCircle(double x0, double y0, double r);
+  virtual void       ScDrawPolygon(double *x, double *y, int n);  
+  virtual void       ScDrawFPolygon(double *x, double *y, int n);
+  virtual void       ScDrawMarker(double x0, double y0);
+  virtual void       ScDrawMarkers(double *x0, double *y0, int n);
+
   virtual double     ScStringWidth(char const*);
+
   virtual void       ScSelFontSz(double size, PIFontAtt att=PI_RomanFont); 
+  virtual void       ScSelMarker(double size=0, PIMarker mrk=PI_DotMarker); 
 
   virtual void       DrawAxes(int flags = -1);
@@ -92,5 +99,8 @@
   int xBegDrag, yBegDrag;
   int xEndDrag, yEndDrag;
-  
+  PIColors cForCol;
+  PIGOMode cGOmod;  
+  PIPointer cPointer;
+  PILineAtt cLatt;
   bool clip;
   
Index: /trunk/SophyaPI/PI/pitestapp.cc
===================================================================
--- /trunk/SophyaPI/PI/pitestapp.cc	(revision 10)
+++ /trunk/SophyaPI/PI/pitestapp.cc	(revision 11)
@@ -17,4 +17,5 @@
 
 #include "ex_dessin.h"
+#include "sc_sample.h"
 #include "piimage.h"
 
@@ -54,5 +55,5 @@
     PIText * text;
     PIButton * bouton;
-    PIButton * bouton2, * bouton3, * bouton4;
+    PIButton * bouton2, * bouton3, * bouton4, *bouton5;
     PILabel * label;
     PIScale * scl;
@@ -62,4 +63,5 @@
     PIPixmap * zoom;
     PILabel  * labimg;
+    ScSample * scs;
 
 };
@@ -116,8 +118,9 @@
   label  = new PILabel(this->MainWin(), "Label", 140, 20, 20,80);
   label->SetBorderWidth(1);
-  bouton = new PIButton(this->MainWin(), "OK", 66, 40, 25, 20, 120);
+  bouton = new PIButton(this->MainWin(), "OK", 33, 40, 25, 20, 120);
   bouton2 = new PIButton(this->MainWin(), "Image", 133, 40, 25, 80, 120);
-  bouton3 = new PIButton(this->MainWin(), "Test",  233, 40, 25, 140, 120);
-  bouton4 = new PIButton(this->MainWin(), "Menu", 555, 40, 25, 200, 120);
+  bouton3 = new PIButton(this->MainWin(), "ExDess",  233, 40, 25, 140, 120);
+  bouton4 = new PIButton(this->MainWin(), "Dialog", 333, 40, 25, 200, 120);
+  bouton5 = new PIButton(this->MainWin(), "ScDraw", 433, 40, 25, 260, 120);
   scl = new PIScale(this->MainWin(), "Scale", 88, 5, 45, 100, 20, 10, 150);
 
@@ -165,4 +168,5 @@
   delete bouton3;
   delete bouton4;
+  delete bouton5;
   delete scl;
   delete menu;
@@ -182,6 +186,7 @@
 static PIWindow *imgw[5];
 static PIImage *cur=NULL;
-
-static PIWindow * wp3, *wp2, *wp4;
+static ScSample *scs1, *scs2;
+
+static PIWindow * wp3, *wp2, *wp4, *wp5;
 static PIPixmap * pxm;
 static unsigned char  pixels[25000];
@@ -189,4 +194,5 @@
 static bool  fgpxm = false;
 static bool  fgt = false;
+static bool  fgt2 = false;
 
 void
@@ -204,4 +210,6 @@
     { /* printf("Process: Setting active ImageWindow (%lx) \n", (long)data); */
     cur = (PIImage *)data; }
+
+  if (msg == 33) ckb->SetState(true);
     
   if (msg == 133)
@@ -226,4 +234,14 @@
     else { wp2->Show();  fgt = true; }
     }
+
+  if (msg == 333)  wp4->Show();
+  if ( (msg == 6001) || (msg == 6002) )  wp4->Hide();
+
+  if (msg == 433)
+    {
+    if (fgt2) { wp5->Hide();  fgt2 = false; }
+    else { wp5->Show();  fgt2 = true; }
+    }
+
 //  if (msg == 555)   (this->menu)->Show(); 
 
@@ -247,6 +265,4 @@
     }
 
-  if (msg == 555)  wp4->Show();
-  if ( (msg == 6001) || (msg == 6002) )  wp4->Hide();
 
   if ((msg > 8000) && data) printf("PITestApp::MenubarReturn: %s \n", (char *)data);
@@ -273,5 +289,4 @@
     else printf("PITestApp::Process(5000) (data=NULL) \n");  }
 
-  if (msg == 66) ckb->SetState(true);
   if ((msg / 100) == 56) 
     printf("PITestApp::Process(%d) : %s \n", (int)msg, (char *)data); 
@@ -301,7 +316,12 @@
   wp3 = new PIWindow(app, "Window-3", PIWK_normal, 200, 200, 350, 350);
   pxm = new PIPixmap(wp3, "myPixmap", 150, 150, 10, 10);
-  
   pxm->SetBinding(true, true, true, true);
   pxm->SetPixmap(pixels, 150, 150);
+
+  wp5 = new PIWindow(app, "Window-5", PIWK_normal,  400, 200, 200, 200);
+  scs1 = new ScSample(wp5, "ScSample", 200, 200, 0, 0);
+  scs1->SetBinding(true, true, true, true);
+  scs2 = new ScSample(wp5, "ScSample", 200, 200, 200, 0);
+  scs2->SetBinding(true, true, true, true);
 
   //  wp4 = new PIWindow(app, "Open...", PIWK_dialog, 300, 300, 400, 400);
Index: /trunk/SophyaPI/PI/piup.h
===================================================================
--- /trunk/SophyaPI/PI/piup.h	(revision 10)
+++ /trunk/SophyaPI/PI/piup.h	(revision 11)
@@ -1,8 +1,8 @@
 #include "fitsimage.h"
 
-FitsImageR4 * PIUserProc_1(FitsImageR4 * myimg, int xp, int yp, 
+FitsImageR4 * PIUserProc_1(FitsImageR4 * myimg, int xp, int yp, int dx, int dy,
                            char * arg1, char * arg2);
-FitsImageR4 * PIUserProc_2(FitsImageR4 * myimg, int xp, int yp, 
+FitsImageR4 * PIUserProc_2(FitsImageR4 * myimg, int xp, int yp, int dx, int dy,
                            char * arg1, char * arg2);
-FitsImageR4 * PIUserProc_3(FitsImageR4 * myimg, int xp, int yp, 
+FitsImageR4 * PIUserProc_3(FitsImageR4 * myimg, int xp, int yp, int dx, int dy, 
                            char * arg1, char * arg2);
Index: /trunk/SophyaPI/PI/piup_def.cc
===================================================================
--- /trunk/SophyaPI/PI/piup_def.cc	(revision 10)
+++ /trunk/SophyaPI/PI/piup_def.cc	(revision 11)
@@ -8,22 +8,25 @@
 #include "piup.h"
 
-FitsImageR4 * PIUserProc_1(FitsImageR4 * myimg, int xp, int yp, 
+FitsImageR4 * PIUserProc_1(FitsImageR4 * , int xp, int yp, int dx, int dy,
                            char * arg1, char * arg2)
 {
-printf("PIUserProc_1/Dummy (%d %d %s %s) ne fait rien !\n", xp, yp, arg1, arg2);
+printf("PIUserProc_1/Dummy Pave[%d,%d] en (%d %d) %s %s ne fait rien !\n", 
+       dx, dy, xp, yp, arg1, arg2);
 return(NULL);
 }
  
-FitsImageR4 * PIUserProc_2(FitsImageR4 * myimg, int xp, int yp, 
+FitsImageR4 * PIUserProc_2(FitsImageR4 * , int xp, int yp, int dx, int dy,
                            char * arg1, char * arg2)
 {
-printf("PIUserProc_2/Dummy (%d %d %s %s) ne fait rien !\n", xp, yp, arg1, arg2);
+printf("PIUserProc_2/Dummy Pave[%d,%d] en (%d %d) %s %s ne fait rien !\n", 
+       dx, dy, xp, yp, arg1, arg2);
 return(NULL);
 }
  
-FitsImageR4 * PIUserProc_3(FitsImageR4 * /*myimg*/, int xp, int yp, 
+FitsImageR4 * PIUserProc_3(FitsImageR4 * , int xp, int yp, int dx, int dy,
                            char * arg1, char * arg2)
 {
-printf("PIUserProc_3/Dummy (%d %d %s %s) ne fait rien !\n", xp, yp, arg1, arg2);
+printf("PIUserProc_3/Dummy Pave[%d,%d] en (%d %d) %s %s ne fait rien !\n", 
+       dx, dy, xp, yp, arg1, arg2);
 return(NULL);
 }
Index: /trunk/SophyaPI/PI/piwdggen.h
===================================================================
--- /trunk/SophyaPI/PI/piwdggen.h	(revision 10)
+++ /trunk/SophyaPI/PI/piwdggen.h	(revision 11)
@@ -9,4 +9,6 @@
 
 #include "pimsghandler.h"
+
+void PIBeep();
 
 class PIContainerGen;
@@ -56,5 +58,5 @@
 
 
-void PIBeep();  
+  
 
 #endif/* PIWDG_H_SEEN */
Index: /trunk/SophyaPI/PI/pixtbase.cc
===================================================================
--- /trunk/SophyaPI/PI/pixtbase.cc	(revision 10)
+++ /trunk/SophyaPI/PI/pixtbase.cc	(revision 11)
@@ -121,5 +121,5 @@
 /* Nouvelle-Fonction */
 static void init_pixtbase (Widget request, Widget wdg,
-                          ArgList args, Cardinal* narg)
+                          ArgList /*args*/, Cardinal* /*narg*/)
 {
 PIXtBaseWidget wdgp;
@@ -137,5 +137,5 @@
 
 /* Nouvelle-Fonction */
-static void destroy_pixtbase (Widget wdgp)
+static void destroy_pixtbase (Widget /*wdgp*/)
 {
 #ifdef DEBUG_PIXTB
@@ -155,5 +155,5 @@
 
 /* Nouvelle-Fonction */
-static void expose_pixtbase (Widget  wdgp, XEvent* event, Region region)
+static void expose_pixtbase (Widget  wdgp, XEvent* /*event*/, Region region)
 {
 #ifdef DEBUG_PIXTB
@@ -174,6 +174,6 @@
 
 /* Nouvelle-Fonction */
-static void enter_pixtbase (Widget wdgp, XEvent* evt, 
-                       String* args, Cardinal* narg)
+static void enter_pixtbase (Widget wdgp, XEvent* /*evt*/, 
+                            String* /*args*/, Cardinal* /*narg*/)
 {
 if (((PIXtBaseWidget)wdgp)->pixtbase.objet) 
@@ -183,6 +183,6 @@
 
 /* Nouvelle-Fonction */
-static void leave_pixtbase (Widget wdgp, XEvent* evt, 
-                       String* args, Cardinal* narg)
+static void leave_pixtbase (Widget wdgp, XEvent* /*evt*/, 
+                            String* /*args*/, Cardinal* /*narg*/)
 {
 if (((PIXtBaseWidget)wdgp)->pixtbase.objet) 
@@ -193,5 +193,5 @@
 /* Nouvelle-Fonction */
 static void bud1_pixtbase (Widget wdgp, XEvent* evt, 
-                       String* args, Cardinal* narg)
+                           String* /*args*/, Cardinal* /*narg*/)
 
 {
@@ -208,5 +208,5 @@
 /* Nouvelle-Fonction */
 static void buu1_pixtbase (Widget wdgp, XEvent* evt, 
-                       String* args, Cardinal* narg)
+                           String* /*args*/, Cardinal* /*narg*/)
 
 {
@@ -222,5 +222,5 @@
 /* Nouvelle-Fonction */
 static void bud2_pixtbase (Widget wdgp, XEvent* evt, 
-                       String* args, Cardinal* narg)
+                           String* /*args*/, Cardinal* /*narg*/)
 
 {
@@ -237,6 +237,5 @@
 /* Nouvelle-Fonction */
 static void buu2_pixtbase (Widget wdgp, XEvent* evt, 
-                       String* args, Cardinal* narg)
-
+                           String* /*args*/, Cardinal* /*narg*/)
 {
 if (((PIXtBaseWidget)wdgp)->pixtbase.objet)
@@ -253,5 +252,5 @@
 /* Nouvelle-Fonction */
 static void bud3_pixtbase (Widget wdgp, XEvent* evt, 
-                       String* args, Cardinal* narg)
+                           String* /*args*/, Cardinal* /*narg*/)
 
 {
@@ -268,5 +267,5 @@
 /* Nouvelle-Fonction */
 static void buu3_pixtbase (Widget wdgp, XEvent* evt, 
-                       String* args, Cardinal* narg)
+                           String* /*args*/, Cardinal* /*narg*/)
 
 {
@@ -283,5 +282,5 @@
 /* Nouvelle-Fonction */
 static void mov1_pixtbase (Widget wdgp, XEvent* evt, 
-                         String* args, Cardinal* narg)
+                           String* /*args*/, Cardinal* /*narg*/)
 {
 if (((PIXtBaseWidget)wdgp)->pixtbase.objet)  
@@ -297,5 +296,5 @@
 /* Nouvelle-Fonction */
 static void mov2_pixtbase (Widget wdgp, XEvent* evt, 
-                         String* args, Cardinal* narg)
+                           String* /*args*/, Cardinal* /*narg*/)
 {
 if (((PIXtBaseWidget)wdgp)->pixtbase.objet)  
@@ -311,5 +310,5 @@
 /* Nouvelle-Fonction */
 static void mov3_pixtbase (Widget wdgp, XEvent* evt, 
-                         String* args, Cardinal* narg)
+                           String* /*args*/, Cardinal* /*narg*/)
 {
 if (((PIXtBaseWidget)wdgp)->pixtbase.objet)  
@@ -325,5 +324,5 @@
 /* Nouvelle-Fonction */
 static void keyb_pixtbase (Widget wdgp, XEvent* evt, 
-                          String* args, Cardinal* narg)
+                           String* /*args*/, Cardinal* /*narg*/)
 {
 if (((PIXtBaseWidget)wdgp)->pixtbase.objet)  
Index: /trunk/SophyaPI/PI/sc_sample.cc
===================================================================
--- /trunk/SophyaPI/PI/sc_sample.cc	(revision 10)
+++ /trunk/SophyaPI/PI/sc_sample.cc	(revision 11)
@@ -1,4 +1,5 @@
 #include "sc_sample.h"
 
+static double f(double x) {return x*x;}
 
 ScSample::ScSample(PIContainerGen *par, char *nom,
@@ -7,16 +8,35 @@
 
 {
+PIScFuncDrawer * mfd;
+mfd = new PIScFuncDrawer(f);
   SetLimits(-3,3,-4,4);
+AddDrawer(mfd);
+SetAxesFlags();
 }
 
 ScSample::~ScSample()
-{}
+{
+DeleteDrawers();
+}
 
-static double f(double x) {return x*x;}
 
 void
-ScSample::Draw()
+ScSample::DrawSelf()
 {
-  DrawAxes();
-  PlotFunc(f);
+double x[5] = {-2, -1., 1., 1.7, 2.2};
+double y[5] = {-2.5, -2.0, -1.5, -2., -2.5};
+
+int i;
+SelForeground(PI_Green);
+ScSelMarker(0.3, PI_BoxMarker);
+ScDrawMarkers(x, y, 5);
+SelForeground(PI_Magenta);
+ScSelMarker(0.3, PI_FCircleMarker);
+for(i=0; i<5; i++)
+   y[i]+=1.;
+ScDrawMarkers(x, y, 5);
+SelForeground(PI_Black);
+
+return;  
 }
+
Index: /trunk/SophyaPI/PI/sc_sample.h
===================================================================
--- /trunk/SophyaPI/PI/sc_sample.h	(revision 10)
+++ /trunk/SophyaPI/PI/sc_sample.h	(revision 11)
@@ -10,5 +10,5 @@
 
   
-  void Draw();
+  virtual void DrawSelf();
 
 };
