Remove old renderer.
Jean-baptiste Silvy [Fri, 24 Aug 2007 09:38:36 +0000 (09:38 +0000)]
182 files changed:
scilab/modules/core/src/c/CallScilab.c
scilab/modules/graphics/Makefile.am
scilab/modules/graphics/graphics.vcproj
scilab/modules/graphics/includes/Axes.h
scilab/modules/graphics/includes/BuildObjects.h
scilab/modules/graphics/includes/Champ.h
scilab/modules/graphics/includes/CurrentObjectsManagement.h
scilab/modules/graphics/includes/DrawObjects.h
scilab/modules/graphics/includes/Format.h
scilab/modules/graphics/includes/GetProperty.h
scilab/modules/graphics/includes/HandleManagement.h
scilab/modules/graphics/includes/InitObjects.h
scilab/modules/graphics/includes/ObjectStructure.h
scilab/modules/graphics/includes/Plo3d.h
scilab/modules/graphics/includes/SetProperty.h
scilab/modules/graphics/includes/WindowList.h
scilab/modules/graphics/includes/Xcall1.h [deleted file]
scilab/modules/graphics/includes/bcg.h [deleted file]
scilab/modules/graphics/includes/clipping.h [deleted file]
scilab/modules/graphics/includes/gw_graphics.h
scilab/modules/graphics/includes/handleDrawing/drawArcEntity.h [deleted file]
scilab/modules/graphics/includes/handleDrawing/drawAxesEntity.h [deleted file]
scilab/modules/graphics/includes/handleDrawing/drawCompoundEntity.h [deleted file]
scilab/modules/graphics/includes/handleDrawing/drawFecEntity.h [deleted file]
scilab/modules/graphics/includes/handleDrawing/drawFigureEntity.h [deleted file]
scilab/modules/graphics/includes/handleDrawing/drawGrayplotEntity.h [deleted file]
scilab/modules/graphics/includes/handleDrawing/drawLegendEntity.h [deleted file]
scilab/modules/graphics/includes/handleDrawing/drawPolylineEntity.h [deleted file]
scilab/modules/graphics/includes/handleDrawing/drawRectangleEntity.h [deleted file]
scilab/modules/graphics/includes/handleDrawing/drawSegsEntity.h [deleted file]
scilab/modules/graphics/includes/handleDrawing/drawSubWinEntity.h [deleted file]
scilab/modules/graphics/includes/handleDrawing/drawSurfaceEntity.h [deleted file]
scilab/modules/graphics/includes/handleDrawing/drawTextEntity.h [deleted file]
scilab/modules/graphics/includes/periFig.h [deleted file]
scilab/modules/graphics/includes/periGif.h [deleted file]
scilab/modules/graphics/includes/periMac.h [deleted file]
scilab/modules/graphics/includes/periPos.h [deleted file]
scilab/modules/graphics/includes/periScreen.h [deleted file]
scilab/modules/graphics/includes/periWin.h [deleted file]
scilab/modules/graphics/includes/periX11.h [deleted file]
scilab/modules/graphics/includes/sci_xsnative.h [deleted file]
scilab/modules/graphics/includes/scigraphic.h [deleted file]
scilab/modules/graphics/sci_gateway/c/gw_graphics.c
scilab/modules/graphics/sci_gateway/c/sci_StringBox.c
scilab/modules/graphics/sci_gateway/c/sci_UImenu.c
scilab/modules/graphics/sci_gateway/c/sci_addcb.c
scilab/modules/graphics/sci_gateway/c/sci_champ.c
scilab/modules/graphics/sci_gateway/c/sci_copy.c
scilab/modules/graphics/sci_gateway/c/sci_delete.c
scilab/modules/graphics/sci_gateway/c/sci_draw.c
scilab/modules/graphics/sci_gateway/c/sci_drawaxis.c
scilab/modules/graphics/sci_gateway/c/sci_drawlater.c
scilab/modules/graphics/sci_gateway/c/sci_drawnow.c
scilab/modules/graphics/sci_gateway/c/sci_driver.c
scilab/modules/graphics/sci_gateway/c/sci_fec.c
scilab/modules/graphics/sci_gateway/c/sci_geom3d.c
scilab/modules/graphics/sci_gateway/c/sci_get.c
scilab/modules/graphics/sci_gateway/c/sci_glue.c
scilab/modules/graphics/sci_gateway/c/sci_grayplot.c
scilab/modules/graphics/sci_gateway/c/sci_matplot.c
scilab/modules/graphics/sci_gateway/c/sci_matplot1.c
scilab/modules/graphics/sci_gateway/c/sci_move.c
scilab/modules/graphics/sci_gateway/c/sci_newaxes.c
scilab/modules/graphics/sci_gateway/c/sci_param3d.c
scilab/modules/graphics/sci_gateway/c/sci_param3d1.c
scilab/modules/graphics/sci_gateway/c/sci_plot2d.c
scilab/modules/graphics/sci_gateway/c/sci_plot2d1.c
scilab/modules/graphics/sci_gateway/c/sci_plot3d.c
scilab/modules/graphics/sci_gateway/c/sci_set.c
scilab/modules/graphics/sci_gateway/c/sci_set_posfig_dim.c
scilab/modules/graphics/sci_gateway/c/sci_show_window.c
scilab/modules/graphics/sci_gateway/c/sci_unglue.c
scilab/modules/graphics/sci_gateway/c/sci_unzoom.c
scilab/modules/graphics/sci_gateway/c/sci_winsid.c
scilab/modules/graphics/sci_gateway/c/sci_xarc.c
scilab/modules/graphics/sci_gateway/c/sci_xarcs.c
scilab/modules/graphics/sci_gateway/c/sci_xarrows.c
scilab/modules/graphics/sci_gateway/c/sci_xaxis.c
scilab/modules/graphics/sci_gateway/c/sci_xchange.c
scilab/modules/graphics/sci_gateway/c/sci_xclea.c
scilab/modules/graphics/sci_gateway/c/sci_xclear.c
scilab/modules/graphics/sci_gateway/c/sci_xclick.c
scilab/modules/graphics/sci_gateway/c/sci_xdel.c
scilab/modules/graphics/sci_gateway/c/sci_xend.c
scilab/modules/graphics/sci_gateway/c/sci_xfarcs.c
scilab/modules/graphics/sci_gateway/c/sci_xfpoly.c
scilab/modules/graphics/sci_gateway/c/sci_xfpolys.c
scilab/modules/graphics/sci_gateway/c/sci_xget.c
scilab/modules/graphics/sci_gateway/c/sci_xgetech.c
scilab/modules/graphics/sci_gateway/c/sci_xgetmouse.c
scilab/modules/graphics/sci_gateway/c/sci_xgrid.c
scilab/modules/graphics/sci_gateway/c/sci_xinit.c
scilab/modules/graphics/sci_gateway/c/sci_xlfont.c
scilab/modules/graphics/sci_gateway/c/sci_xname.c
scilab/modules/graphics/sci_gateway/c/sci_xpoly.c
scilab/modules/graphics/sci_gateway/c/sci_xpolys.c
scilab/modules/graphics/sci_gateway/c/sci_xrect.c
scilab/modules/graphics/sci_gateway/c/sci_xrects.c
scilab/modules/graphics/sci_gateway/c/sci_xs2bmp.c
scilab/modules/graphics/sci_gateway/c/sci_xs2emf.c
scilab/modules/graphics/sci_gateway/c/sci_xsave.c
scilab/modules/graphics/sci_gateway/c/sci_xsegs.c
scilab/modules/graphics/sci_gateway/c/sci_xset.c
scilab/modules/graphics/sci_gateway/c/sci_xsetech.c
scilab/modules/graphics/sci_gateway/c/sci_xsnative.c [deleted file]
scilab/modules/graphics/sci_gateway/c/sci_xstring.c
scilab/modules/graphics/sci_gateway/c/sci_xstringb.c
scilab/modules/graphics/sci_gateway/c/sci_xstringl.c
scilab/modules/graphics/sci_gateway/c/sci_xtitle.c
scilab/modules/graphics/sci_gateway/c/sci_zoom_rect.c
scilab/modules/graphics/sci_gateway/graphics_gateway.xml
scilab/modules/graphics/src/c/Actions.c
scilab/modules/graphics/src/c/Axes.c
scilab/modules/graphics/src/c/BuildObjects.c
scilab/modules/graphics/src/c/Champ.c
scilab/modules/graphics/src/c/CloneObjects.c
scilab/modules/graphics/src/c/Contour.c
scilab/modules/graphics/src/c/CurrentObjectsManagement.c
scilab/modules/graphics/src/c/DestroyObjects.c
scilab/modules/graphics/src/c/DrawObjects.c
scilab/modules/graphics/src/c/Events.c
scilab/modules/graphics/src/c/FeC.c
scilab/modules/graphics/src/c/Fec.h
scilab/modules/graphics/src/c/Format.c
scilab/modules/graphics/src/c/GetProperty.c
scilab/modules/graphics/src/c/Gray.c
scilab/modules/graphics/src/c/Gray.h
scilab/modules/graphics/src/c/HandleManagement.c
scilab/modules/graphics/src/c/InitObjects.c
scilab/modules/graphics/src/c/Plo2dEch.c
scilab/modules/graphics/src/c/Plo2dn.c
scilab/modules/graphics/src/c/Plo3d.c
scilab/modules/graphics/src/c/SciViewportGet.c [deleted file]
scilab/modules/graphics/src/c/SetProperty.c
scilab/modules/graphics/src/c/StringBox.c
scilab/modules/graphics/src/c/WindowList.c
scilab/modules/graphics/src/c/fill_grid_rectangles.c
scilab/modules/graphics/src/c/getHandleProperty/get_axes_size_property.c
scilab/modules/graphics/src/c/getHandleProperty/get_current_figure_property.c
scilab/modules/graphics/src/c/getHandleProperty/get_figure_size_property.c
scilab/modules/graphics/src/c/getHandleProperty/get_figures_id_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_axes_size_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_current_axes_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_current_figure_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_figure_id_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_figure_size_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_figure_style_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_rotation_angles_property.c
scilab/modules/graphics/src/c/getcolordef.c
scilab/modules/graphics/src/c/graphicModuleLoad.c
scilab/modules/graphics/src/c/handleDrawing/drawArcEntity.c [deleted file]
scilab/modules/graphics/src/c/handleDrawing/drawAxesEntity.c [deleted file]
scilab/modules/graphics/src/c/handleDrawing/drawCompoundEntity.c [deleted file]
scilab/modules/graphics/src/c/handleDrawing/drawFecEntity.c [deleted file]
scilab/modules/graphics/src/c/handleDrawing/drawFigureEntity.c [deleted file]
scilab/modules/graphics/src/c/handleDrawing/drawGrayplotEntity.c [deleted file]
scilab/modules/graphics/src/c/handleDrawing/drawLegendEntity.c [deleted file]
scilab/modules/graphics/src/c/handleDrawing/drawPolylineEntity.c [deleted file]
scilab/modules/graphics/src/c/handleDrawing/drawRectangleEntity.c [deleted file]
scilab/modules/graphics/src/c/handleDrawing/drawSegsEntity.c [deleted file]
scilab/modules/graphics/src/c/handleDrawing/drawSubWinEntity.c [deleted file]
scilab/modules/graphics/src/c/handleDrawing/drawSurfaceEntity.c [deleted file]
scilab/modules/graphics/src/c/handleDrawing/drawTextEntity.c [deleted file]
scilab/modules/graphics/src/c/sciCall.c
scilab/modules/graphics/src/c/xs2file.c
scilab/modules/graphics/src/nographics/nographics.c
scilab/modules/graphics/src/nographics/nographics.h
scilab/modules/gui/src/java/org/scilab/modules/gui/graphicWindow/ScilabGraphicWindow.java
scilab/modules/javasci/includes/javasci_globals.h
scilab/modules/javasci/src/c/javasci_Scilab.c
scilab/modules/renderer/graphics_Import.def
scilab/modules/renderer/src/cpp/axesDrawing/DrawableAxes.cpp
scilab/modules/renderer/src/cpp/compoundDrawing/DrawableCompound.cpp
scilab/modules/renderer/src/cpp/fecDrawing/DrawableFec.cpp
scilab/modules/renderer/src/cpp/figureDrawing/DrawableFigure.cpp
scilab/modules/renderer/src/cpp/figureDrawing/FigureScilabCall.cpp
scilab/modules/renderer/src/cpp/grayplotDrawing/DrawableGrayplot.cpp
scilab/modules/renderer/src/cpp/legendDrawing/DrawableLegend.cpp
scilab/modules/renderer/src/cpp/polylineDrawing/DrawablePolyline.cpp
scilab/modules/renderer/src/cpp/segsDrawing/DrawableSegs.cpp
scilab/modules/renderer/src/cpp/surfaceDrawing/DrawableSurface.cpp
scilab/modules/renderer/src/cpp/textDrawing/DrawableText.cpp

index 5e71114..13ae513 100644 (file)
@@ -164,19 +164,6 @@ void ScilabDoOneEvent(void)
 /*-----------------------------------------------------------------------------------*/
 int ScilabHaveAGraph(void)
 {
-       integer iflag =0,ids,num;
-       int vInt=0;
-
-       if ( getScilabMode() != SCILAB_NWNI )
-       {
-          sciGetIdFigure (&ids,&num,&iflag);
-          if (num > 0) { vInt = 1 ; }
-       }
-       else
-       {
-               vInt=0;
-       }
-
-       return vInt;
+  return sciHasFigures();
 }
 /*-----------------------------------------------------------------------------------*/
index d6548b8..82f25ba 100644 (file)
@@ -410,7 +410,6 @@ sci_gateway/c/sci_showalluimenushandles.c \
 sci_gateway/c/sci_xend.c \
 sci_gateway/c/sci_unglue.c \
 sci_gateway/c/gw_graphics.c \
-sci_gateway/c/sci_xsnative.c \
 sci_gateway/c/sci_zoom_rect.c \
 sci_gateway/c/sci_delete.c \
 sci_gateway/c/sci_xs2fig.c \
@@ -487,7 +486,6 @@ includes/periWin.h \
 includes/graphicSession.h \
 includes/periPos.h \
 includes/sci_xgraduate.h \
-includes/Xcall1.h \
 includes/sci_unzoom.h \
 includes/sci_xs2ppm.h \
 includes/sci_xsegs.h \
@@ -533,7 +531,6 @@ includes/sci_set_posfig_dim.h \
 includes/sci_set.h \
 includes/sci_help_gtk.h \
 includes/bcg.h \
-includes/sci_xsnative.h \
 includes/sci_delete.h \
 includes/sci_plot2d.h \
 includes/clipping.h \
index 97e548d..207f81a 100644 (file)
                                >
                        </File>
                        <File
-                               RelativePath=".\src\c\clipping.c"
-                               >
-                       </File>
-                       <File
                                RelativePath=".\src\c\CloneObjects.c"
                                >
                        </File>
                                >
                        </File>
                        <File
-                               RelativePath=".\src\c\handleDrawing\drawArcEntity.c"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\src\c\handleDrawing\drawAxesEntity.c"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\src\c\handleDrawing\drawCompoundEntity.c"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\src\c\handleDrawing\drawFecEntity.c"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\src\c\handleDrawing\drawFigureEntity.c"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\src\c\handleDrawing\drawGrayplotEntity.c"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\src\c\handleDrawing\drawLegendEntity.c"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\src\c\drawMarks.c"
-                               >
-                       </File>
-                       <File
                                RelativePath=".\src\c\DrawObjects.c"
                                >
                        </File>
                        <File
-                               RelativePath=".\src\c\handleDrawing\drawPolylineEntity.c"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\src\c\handleDrawing\drawRectangleEntity.c"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\src\c\handleDrawing\drawSegsEntity.c"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\src\c\handleDrawing\drawSubWinEntity.c"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\src\c\handleDrawing\drawSurfaceEntity.c"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\src\c\handleDrawing\drawTextEntity.c"
-                               >
-                       </File>
-                       <File
                                RelativePath=".\src\c\Events.c"
                                >
                        </File>
                                >
                        </File>
                        <File
-                               RelativePath=".\src\c\periEmpty.c"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\src\c\periFig.c"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\src\c\periGif.c"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\src\c\periPos.c"
-                               >
-                       </File>
-                       <File
                                RelativePath=".\src\c\pixel_mode.c"
                                >
                        </File>
                                >
                        </File>
                        <File
-                               RelativePath=".\src\c\Plo3dn.c"
-                               >
-                       </File>
-                       <File
                                RelativePath=".\sci_gateway\c\sci_addcb.c"
                                >
                        </File>
                                >
                        </File>
                        <File
-                               RelativePath=".\sci_gateway\c\sci_xsnative.c"
-                               >
-                       </File>
-                       <File
                                RelativePath=".\sci_gateway\c\sci_xstring.c"
                                >
                        </File>
                                >
                        </File>
                        <File
-                               RelativePath=".\src\c\SciViewportGet.c"
-                               >
-                       </File>
-                       <File
                                RelativePath=".\src\c\getHandleProperty\set_alignment_property.c"
                                >
                        </File>
                                >
                        </File>
                        <File
-                               RelativePath=".\src\c\Xcall.c"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\src\c\Xcall1.c"
-                               >
-                       </File>
-                       <File
                                RelativePath=".\src\c\xs2file.c"
                                >
                        </File>
                                >
                        </File>
                        <File
-                               RelativePath=".\includes\bcg.h"
-                               >
-                       </File>
-                       <File
                                RelativePath=".\includes\BuildObjects.h"
                                >
                        </File>
                                >
                        </File>
                        <File
-                               RelativePath=".\includes\clipping.h"
-                               >
-                       </File>
-                       <File
                                RelativePath=".\includes\CloneObjects.h"
                                >
                        </File>
                                >
                        </File>
                        <File
-                               RelativePath=".\src\c\handleDrawing\drawArcEntity.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\src\c\handleDrawing\drawAxesEntity.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\src\c\handleDrawing\drawCompoundEntity.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\src\c\handleDrawing\drawFecEntity.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\src\c\handleDrawing\drawFigureEntity.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\src\c\handleDrawing\drawGrayplotEntity.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\src\c\handleDrawing\drawLegendEntity.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\src\c\drawMarks.h"
-                               >
-                       </File>
-                       <File
                                RelativePath=".\includes\DrawObjects.h"
                                >
                        </File>
                        <File
-                               RelativePath=".\src\c\handleDrawing\drawPolylineEntity.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\src\c\handleDrawing\drawRectangleEntity.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\src\c\handleDrawing\drawSegsEntity.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\src\c\handleDrawing\drawSubWinEntity.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\src\c\handleDrawing\drawSurfaceEntity.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\src\c\handleDrawing\drawTextEntity.h"
-                               >
-                       </File>
-                       <File
                                RelativePath=".\includes\Events.h"
                                >
                        </File>
                                >
                        </File>
                        <File
-                               RelativePath=".\includes\periFig.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\includes\periGif.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\includes\periMac.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\includes\periPos.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\includes\periScreen.h"
-                               >
-                       </File>
-                       <File
                                RelativePath=".\includes\pixel_mode.h"
                                >
                        </File>
                                >
                        </File>
                        <File
-                               RelativePath=".\src\c\Plo3dn.h"
-                               >
-                       </File>
-                       <File
                                RelativePath=".\includes\PloEch.h"
                                >
                        </File>
                                >
                        </File>
                        <File
-                               RelativePath=".\includes\sci_xsnative.h"
-                               >
-                       </File>
-                       <File
                                RelativePath=".\includes\sci_xstring.h"
                                >
                        </File>
                                >
                        </File>
                        <File
-                               RelativePath=".\includes\scigraphic.h"
-                               >
-                       </File>
-                       <File
                                RelativePath=".\includes\sciMatrix.h"
                                >
                        </File>
                        <File
-                               RelativePath=".\src\c\SciViewportGet.h"
-                               >
-                       </File>
-                       <File
                                RelativePath=".\src\c\getHandleProperty\set_data_property.h"
                                >
                        </File>
                                >
                        </File>
                        <File
-                               RelativePath=".\includes\Xcall1.h"
-                               >
-                       </File>
-                       <File
                                RelativePath=".\includes\xs2file.h"
                                >
                        </File>
index e74c4d8..296002c 100644 (file)
 
 #include "ObjectStructure.h"
 
-/*--------------------------------------------------------------------------------------*/
-/* check if the graduation text foo is inside the old_rect */
-/* in this case it should not been displayed */
-BOOL CheckDisplay( double fact_h, double fact_w, char logflag, char *foo,int *posi,int *fontid,int *old_rect) ;
-
-/* The unit is the pixel */
-/* return 0 if the point is inside the rect */
-/* 1 if it is actually outside the rect */
-/* (rect[0],rect[1]) : upper left point of the bounding box  in pixel */
-/* (rect[2],rect[3]) : width and height in pixel */
-/* point[0] : x component */
-/* point[1] : y component */
-BOOL IsInsideRectangle(int * rect, int *point) ;
-
-/* get the bounding rectangle of a label of a ticks */
-/* similar to stringBoundingRect but only for ticks labels */
-void getTicksLabelBox( double   fact_h   ,
-                       double   fact_w   , 
-                       char   * label    ,
-                       int      pos[2]   ,
-                       int      fontId[2],
-                       char     logflag  ,
-                       int      bbox[4]  ,
-                       BOOL     changeFont ) ;
-
-/* remove the concealed ticks before display on the X and Y axis */
-BOOL checkXAxes2dTics( sciPointObj * psubwin  ,
-                       char          side     ,
-                       double        y        ,
-                       char        * cFormat  ,
-                       int           fontId[2],
-                       int           smallersize ) ;
-
-/* remove the concealed ticks before display on the X and Y axis */
-BOOL checkYAxes2dTics( sciPointObj * psubwin  ,
-                       char          side     ,
-                       double        x        ,
-                       char        * cFormat  ,
-                       int           fontId[2],
-                       int           smallersize ) ;
-
-
-void updateXaxesTics( sciPointObj * psubwin  ,
-                      char          side     ,
-                      double        y        ,
-                      int           fontId[2],
-                      int           smallersize ) ;
-
-void updateYaxesTics( sciPointObj * psubwin  ,
-                      char          side     ,
-                      double        x        ,
-                      int           fontId[2],
-                      int           smallersize ) ;
-
-/* remove in the ticks array the indices i such as removedTicks[i] */
-/* is true. The value nbtics is an in-out variable */
-void removeBadTicks( double * ticks, BOOL * removedTicks, int * nbTicks ) ;
-
-/* remove an element in the array from translating the next
-   elements on step backward */
-void removeIndex( double * changedArray, int size, int ind ) ;
-
-/* compute the needed formats to display the ticks of a subWin */
-void findFormat( sciPointObj * pSubWin, char formatX[5], char formatY[5] ) ;
-
-/*--------------------------------------------------------------------------------------*/
 
 /*--------------------------------------------------------------------------------------*/
 
@@ -99,43 +33,4 @@ void initSubWinBounds( sciPointObj * pSubWin ) ;
 BOOL checkRedrawing( void ) ;
 
 /*--------------------------------------------------------------------------------------*/
-/**
-* Update the current scale factors from a modified SubWindow.
-* This is sometimes required when the redraw is disable.
-*/
-void updateSubWinScale( sciPointObj * pSubWin ) ;
-
-/**
-* update the scale factors only if the SubWindow won't be automatically redrawn.
-* Should be called before dr("xstringl") for example.
-*/
-void updateScaleIfRequired( sciPointObj * pSubWin ) ;
-/*--------------------------------------------------------------------------------------*/
-/**
- * Draw the grid of an axes object if needed.
- */
-void drawAxesGrid( sciPointObj * psubwin ) ;
-/*--------------------------------------------------------------------------------------*/
-extern void axis_3ddraw(sciPointObj *pobj, double *xbox, double *ybox, double *zbox, integer *InsideU, integer *InsideD); /* DRAWINGS */
-extern void triedre(sciPointObj *pobj, double *xbox, double *ybox, double *zbox, integer *InsideU, integer *InsideD); /* DRAWINGS */
-void DrawAxesBackground( void ) ;
-int labels2D_draw( sciPointObj * psubwin ) ;
-void rebuild_strflag( sciPointObj * psubwin, char * STRFLAG) ;
-void axis_draw2(char strflag[]) ;
-void Sci_Axis(char pos, char xy_type, double *x, int *nx, double *y, int *ny,
-              char *str[], int subtics, char *format, int fontsize, int textcolor, 
-              int fontstyle, int ticscolor, char logflag, int seg_flag, int axisbuild_flag) ;
-/**
- * Trace un triedre : Indices[4] donne les indices des points qui 
- * constituent le triedre dans les tableaux xbox et ybox
- */
-void DrawAxis(double xbox[8], double ybox[8], integer Indices[4], integer style) ;
-
-/**
- * @author F.Leray 18.10.04
- */
-int Axes3dStrings2( integer * ixbox, integer * iybox, integer * xind ) ;
-
-/*--------------------------------------------------------------------------------------*/
-
 #endif /*__SCI_AXES_H_*/
index c2ce61f..f3f817e 100644 (file)
 
 extern sciPointObj *ConstructStatusBar (sciPointObj * pparentfigure); /* BUILD */
 
-#define SciWin() { if( C2F(sciwin)() != 0 ) { Scierror(999,"%s :Requested figure cannot be created \r\n",fname) ; return 0 ; } }
-int C2F(sciwin)( void ) ;
-
-sciPointObj * ConstructFigure ( sciPointObj * pparent, struct BCG *XGC ) ;/* BUILD */
-extern sciPointObj *ConstructSubWin (sciPointObj * pparentfigure,
-                                    int pwinnum); /* BUILD */
+sciPointObj * ConstructFigure (sciPointObj * pparent) ;/* BUILD */
+extern sciPointObj *ConstructSubWin (sciPointObj * pparentfigure); /* BUILD */
 extern sciPointObj *ConstructScrollV (sciPointObj * pparentfigure); /* BUILD */
 extern sciPointObj *ConstructScrollH (sciPointObj * pparentfigure); /* BUILD */
 
index f37b314..332f8b7 100644 (file)
@@ -26,25 +26,9 @@ void getChampDataBounds( double   xCoords[]  ,
                         double * yMin       ,
                         double * yMax        ) ;
 
-void sciChamp2DRealToPixel( integer * xm         ,
-                           integer * ym         ,
-                           integer * zm         ,
-                           integer * na         ,
-                           integer * arsize     ,
-                           double  * x          ,
-                           double  * y          ,
-                           double  * fx         ,
-                           double  * fy         ,
-                           integer * n1         ,
-                           integer * n2         ,
-                           double  * arfact     ,
-                           int     * typeofchamp,
-                           BOOL      clipping    ) ;
 
 double computeGridMinGap( double gridX[], double gridY[], int nbRow, int nbCol ) ;
 
-int computeArrowColor( double gridX[], double gridY[], int nbRow, int nbCol, int ind ) ;
-
 double getLongestVector( double vectX[], double vectY[], int nbRow, int nbCol, double scx, double scy ) ;
 
 #endif
index ccb015b..3f94f58 100644 (file)
@@ -9,7 +9,6 @@
 #define _GET_CURRENT_OBJECTS_H_
 
 #include "ObjectStructure.h"
-#include "bcg.h"
 
 /**
 * To know if the current figure is a graphic one.
@@ -22,18 +21,13 @@ void set_cf_type( int val ) ;
  */
 sciPointObj * sciGetCurrentFigure( void ) ;
 
-int sciInitCurrentFigure( sciPointObj * mafigure ) ;
-int sciSetCurrentFigure(  sciPointObj * mafigure ) ;
-
 /**
- * as sciGetCurrentFigure but do not create any figure if none exists.
+ * To know if a figure is the selected one.
  */
-sciPointObj * sciGetCurPointedFigure( void ) ;
-/*-----------------------------------------------------------------------------*/
-/**
- * Return the Bcg of the currently selected figure
- */
-struct BCG * sciGetCurrentScilabXgc( void ) ;
+BOOL sciIsCurrentFigure(sciPointObj * pFigure);
+
+int sciInitCurrentFigure( sciPointObj * mafigure ) ;
+int sciSetCurrentFigure(  sciPointObj * mafigure ) ;
 /*-----------------------------------------------------------------------------*/
 /**
  * Get the current Object
index b6b176d..0997804 100644 (file)
 #include "../../sparse/includes/spConfig.h"
 
 
-#include "bcg.h"
 #include "PloEch.h"
 #include "Vect2Matrix.h"
 #include "StringMatrix.h"
 
-void wininfo  __PARAMS((char *fmt,...));
-
 int get_cf_type( void ) ;
 
 extern void GPopupResize (struct BCG * ScilabXgc,int * width,int * height);
@@ -55,12 +52,12 @@ extern HFONT sciCreateFont (HDC hdc, char *szFaceName, int iDeciPtHeight, int iD
 
 extern void sciRedrawFigure(void); /* DRAWINGS */
 extern void sciRedrawF(int *num); /* DRAWINGS */
+void sciClearFigure(sciPointObj * pFigure) ; /* DRAWINGS */
 extern void sciXbasc(void);  /* DRAWINGS */
 extern void sciXclear(void); /* DRAWINGS */
  
 /* 3 next are in plo3d.c*/
 extern void SetEch3d1(double *xbox, double *ybox, double *zbox, double *bbox, double *teta, double *alpha, integer flag); /* DRAWINGS */
-extern void Convex_Box(double *xbox, double *ybox, integer *InsideU, integer *InsideD, char *legend, integer *flag, double *bbox); /* DRAWINGS */
 
 extern void Nextind(integer ind1, integer *ind2, integer *ind3); /* DRAWINGS */
 extern int GradLog(double _min, double _max, double *_grads, int * n_grads, int compNgrads );
@@ -73,23 +70,12 @@ extern void sciGetDisplayedBounds( sciPointObj * pSubWin,
                                    double      * ymax   ,
                                    double      * zmin   ,
                                    double      * zmax    ) ;
-extern void updateScale3d( sciPointObj * pobj    ,
-                           double        dbox[6] ,
-                           double        xbox[8] ,
-                           double        ybox[8] ,
-                           double        zbox[8]  );
 extern BOOL sci_update_frame_bounds_3d(sciPointObj *pobj);  /* DRAWINGS */
 extern BOOL sci_update_frame_bounds_2d(sciPointObj *pobj);  /* DRAWINGS */
 
 extern int ComputeNbSubTics(sciPointObj * pobj, int nbtics, char logflag, double * grads, int nbsubtics_input); /* DRAWINGS */
-extern int ComputeNbSubTicsFor3dUse(sciPointObj * pobj, int nbtics, char logflag, double * grads, int nbsubtics_input);
 extern int ComputeCorrectXindAndInsideUD(double Teta,double Alpha, double * dbox, integer *xind, integer *InsideU, integer *InsideD); /* DRAWINGS */
 extern int Axes3dStrings2(integer *ixbox, integer *iybox, integer *xind); /* DRAWINGS */
-extern int AdaptGraduationsOnZ(int x, int y, int size, integer *Ticsdir, int *fontid, sciPointObj * psubwin, double zminval, double zmaxval, double fx, double fy, double fz);
-extern int AdaptGraduationsOnXBottomRight(int iof, int x, int y, int size, integer *Ticsdir, int *fontid, sciPointObj * psubwin, double xminval, double xmaxval, double fx, double fy, double fz);
-extern int AdaptGraduationsOnYBottomRight(int iof, int x, int y, int size, integer *Ticsdir, int *fontid, sciPointObj * psubwin, double yminval, double ymaxval, double fx, double fy, double fz);
-extern int AdaptGraduationsOnXBottomLeft(int iof, int x, int y, int size, integer *Ticsdir, int *fontid, sciPointObj * psubwin, double xminval, double xmaxval, double fx, double fy, double fz);
-extern int AdaptGraduationsOnYBottomLeft(int iof, int x, int y, int size, integer *Ticsdir, int *fontid, sciPointObj * psubwin, double yminval, double ymaxval, double fx, double fy, double fz);
 
 extern int CheckDisplay(double fact_h, double fact_w, char logflag, char *foo,int *posi,int *fontid,int *old_rect);
 
@@ -99,9 +85,6 @@ extern int ComputeGoodTrans3d( sciPointObj * psubwin, int n, int *xm, int *ym, d
 extern void DrawAxesIfRequired(sciPointObj*); /* DRAWINGS */
 extern void DrawAxes(sciPointObj*); /* DRAWINGS */
 
-extern void UpdateSubwinScale(sciPointObj * pobj); /* DRAWINGS */
-
-//extern int sciDrawObj (sciPointObj * pobj); /* DRAWINGS */
 extern int sciDrawObjIfRequired (sciPointObj * pobj); /* DRAWINGS */
 extern int sciRefreshObj( sciPointObj * pobj ) ; /* DRAWINGS */
 
@@ -118,7 +101,6 @@ extern int Gen3DPoints (integer type,integer *polyx,integer *polyy,integer *fill
 extern int CheckPixelStatus(void);
 
 extern int GetDPIFromDriver(int * DPI);
-extern int ChooseFormatForOneGrad(char *c_format, double *grad);
 extern int GetBarNumber(sciPointObj * pobj);
 extern double FindWidth(sciPointObj * pobj, int n1, int bar_number, double *x);
 
index 54d8570..ea00b0e 100644 (file)
@@ -73,4 +73,6 @@ int TheTicks( double * xminv ,
 
 int GradEqual( const double grads[], const int * ngrads) ;
 
+char * getFPF(void);
+
 #endif /* _FORMAT_H_ */
index 01aa611..551e924 100644 (file)
@@ -21,7 +21,6 @@
 #include "ObjectStructure.h"
 #include "HandleManagement.h"
 #include "StringMatrix.h"
-#include "bcg.h"
 
 void *sciGetPointerToFeature (sciPointObj * pobj); /* GET */
 void sciGetPointerToUserData (sciPointObj * pobj,int ***user_data_ptr, int **size_ptr); /* GET */
@@ -90,7 +89,6 @@ POINT2D sciGetLegendPos (sciPointObj * pobj);
 sciPointObj *sciGetParentFigure (sciPointObj * pobj); /* GET */
 sciPointObj *sciGetParentSubwin (sciPointObj * pobj); /* GET */
 int sciGetNumFigure (sciPointObj * pobj); /* GET */
-struct BCG *sciGetScilabXgc (sciPointObj * pobj); /* GET */
 
 /* GMODE */
 scigMode *sciGetGraphicMode (sciPointObj * pobj);  /* GET */
@@ -120,11 +118,9 @@ BOOL sciGetIsFigureIconified (sciPointObj * pobj);  /* GET */
 int sciGetSubwindowPosX (sciPointObj * pobj);  /* GET */
 int sciGetSubwindowPosY (sciPointObj * pobj);  /* GET */
 sciPointObj *sciIsExistingSubWin (double *WRect); /* GET */ /* WARNING special case here */
-sciPointObj *sciIsExistingFigure(int *value); /* GET */ /* WARNING special case here */
 int sciGetScrollPosV (sciPointObj * pobj);  /* GET */
 int sciGetScrollPosH (sciPointObj * pobj);  /* GET */
 
-sciPointObj * sciGetCurPointedFigure( void ) ; /* GET */
 BOOL sciGetReplay (void); /* GET */
 
 
@@ -138,11 +134,7 @@ sciPointObj *sciGetAxes (sciPointObj *pparentfigure,sciPointObj *psubwin); /* GE
 
 int sciType (char *marker, sciPointObj *pobj); /* GET */
 
-int  sciGetNbFigure( void ) ; /* GET */
-void sciGetFiguresId( int figIds[] ) ; /* GET */
-void sciGetIdFigure (int *vect, int *id, int *flag); /* GET */
 unsigned int sciGetFontNameLength (sciPointObj * pobj); /* GET */
-/* struct BCG *sciGetCurrentScilabXgc (); /\* GET *\/ */
 
 sciPointObj *sciGetSurface(sciPointObj *psubwin); /* GET */
 
@@ -208,11 +200,12 @@ char * sciGetEventHandler( sciPointObj * pObj ) ;
 double * sciGetAxesBounds( sciPointObj * pObj ) ;
 double * sciGetMargins( sciPointObj * pObj ) ;
 
-BOOL sciGetIsReadyForRendering( sciPointObj * pobj ) ; /* GET */
-
 void sciGetRealDataBounds( sciPointObj * pObj, double bounds[6] ) ; /* GET */
 void sciGetDataBounds( sciPointObj * pObj, double bounds[6] ) ; /* GET */
 
 void sciGetViewingAngles( sciPointObj * pObj, double * alpha, double * theta) ; /* GET */
 
+int sciGetWhiteColorIndex(sciPointObj * pObj); /* GET */
+int sciGetBlackColorIndex(sciPointObj * pObj); /* GET */
+
 #endif /* __SCI_GET_PROPERTY__ */
index de6ee0c..7c4bb4f 100644 (file)
@@ -34,7 +34,6 @@ extern sciSons *sciGetLastSons (sciPointObj * pobj); /* HANDLE MANAGEMENT */
 extern sciSons * sciGetNextAccessibleSon( sciSons * son ) ; /* HANDLE MANAGEMENT */
 extern sciSons * sciGetFirstAccessibleSon( sciPointObj * pObj ) ; /* HANDLE MANAGEMENT */
 extern sciSons * sciFindSon( sciPointObj * searchedObj, sciPointObj * parentObj ) ;
-extern int sciGetNbFigures( void ) ;
 extern int sciRelocateHandles( unsigned long handles[], int nbHandles, unsigned long newParentHandle ) ;
 extern BOOL sciCanBeSonOf( sciPointObj * son, sciPointObj * parent ) ;
 extern int swapHandles( unsigned long firstHdl, unsigned long secondHdl ) ;
index ce1fe87..efa17a3 100644 (file)
@@ -42,4 +42,6 @@ sciPointObj * getAxesModel( void ) ;
 
 void destroyDefaultObjects( void ) ;
 
+void sciSetDefaultColorMap(sciPointObj * pFigure);
+
 #endif /* __SCI_INIT_GRAPHICS__ */
index b71f86c..6e45a83 100644 (file)
@@ -213,7 +213,7 @@ typedef struct
 {/** */
   sciEntityType entitytype;
   /**  points to the characteristic of the structure (figure, axes...) */
-  void *pfeatures;
+  void * pfeatures;
   /** List of all observers watching this object */
   DoublyLinkedList * pObservers ;
   /** Drawing object used to actually draw the graphic handle */
@@ -440,8 +440,7 @@ FigureModelData ;
  * Structure used to specify Figure (different to XGC) 
  */
 typedef struct
-{/** will be integrated in the new structure      */
-  struct BCG *pScilabXgc;      
+{      
   sciRelationShip relationship;
   scigMode gmode;
   sciGraphicContext graphiccontext; /* the only property used here is background */
@@ -453,9 +452,6 @@ typedef struct
   /** specifies the number of this window            */
   int number;
 
-  /** Specifies if the object has been totally build and is ready to be rendered on the screen */
-  BOOL isReadyForRendering;
-
   /** specifies the colr map                         */
   double *pcolormap;
   /** specifies if this window is iconified*/
index e9e5176..555df8d 100644 (file)
@@ -9,15 +9,8 @@
 #ifndef _PLO3D_H_
 #define _PLO3D_H_
 
-
-int C2F(box3d)(double *xbox, double *ybox, double *zbox) ;
-
 void DrawAxis(double *xbox, double *ybox, integer *Indices, integer style) ;
 
-void Convex_Box(double *xbox, double *ybox, integer *InsideU, integer *InsideD, char *legend, integer *flag, double *bbox) ;
-
-void AxesStrings(integer axflag, integer *ixbox, integer *iybox, integer *xind, char *legend, double *bbox) ;
-
 int triangleSort(integer *polyxin, integer *polyyin, integer *fillin, integer *polyx, integer *polyy, integer *fill);
 
 int scilab_shade(integer *polyx, integer *polyy, integer *fill, integer polysize, integer flag) ;
index 1796804..5199897 100644 (file)
@@ -83,12 +83,14 @@ extern int sciSetBoxType ( sciPointObj * pobj, EAxesBoxType type ) ; /* SET */
 
 extern int sciInitIsBoxed(sciPointObj * pobj, BOOL isboxed);
 extern int sciSetIsBoxed (sciPointObj * pobj, BOOL isboxed); /* SET */
-/* extern int sciSetIsInterpShaded (sciPointObj * pobj, BOOL isinterpshaded); /\* SET *\/ */
 
 /* Text Functions */
-extern int sciInitFontDeciWidth(sciPointObj * pobj, int fontdeciwidth);
+extern int sciInitFontDeciWidth(sciPointObj * pobj, int fontdeciwidth); /* SET */
 extern int sciSetFontDeciWidth (sciPointObj * pobj, int fontdeciwidth); /* SET */
 
+int sciInitFontWidth(sciPointObj * pobj, int width); /* SET */
+int sciSetFontWidth(sciPointObj * pobj, int width); /* SET */
+
 extern int sciInitFontOrientation(sciPointObj * pobj, int textorientation); /* SET */
 extern int sciSetFontOrientation (sciPointObj * pobj, int textorientation); /* SET */
 
@@ -155,8 +157,8 @@ extern int sciSetDefaultValues (void); /* SET */
 
 /* Window Functions */
 extern int sciSetName (sciPointObj * pobj, char *pvalue, int length); /* SET */
-extern int sciInitNum( sciPointObj * pobj, int * value ) ;
-extern int sciSetNum ( sciPointObj * pobj, int * value ) ; /* SET */
+extern int sciInitNum( sciPointObj * pobj, int value ) ;
+extern int sciSetNum ( sciPointObj * pobj, int value ) ; /* SET */
 
 extern int sciInitDimension( sciPointObj * pobj, int newWidth, int newHeight ) ;
 extern int sciSetDimension(  sciPointObj * pobj, int newWidth, int newHeight ) ; /* SET */
@@ -180,15 +182,12 @@ extern int sciSetSelectedSubWin (sciPointObj * psubwinobj); /* SET */
 
 extern int sciSetOriginalSubWin (sciPointObj * pfigure, sciPointObj * psubwin); /* SET */
 
-extern int sciInitCurrentFigure(sciPointObj * mafigure);
-extern int sciSetCurrentFigure (sciPointObj * mafigure); /* SET */
-
 extern int sciSetReplay (BOOL value); /* SET */
 /* extern int sciSetHDC (sciPointObj * pobj); /\* SET *\/ /\* unused?? *\/ */
 extern int sciSetPoint(sciPointObj * pthis, double *tab, int *numrow, int *numcol); /* SET */
 
 extern int sciSetdrawmode(BOOL mode); /* SET */
-extern int sciSwitchWindow(int *winnum); /* SET */
+extern int sciSwitchWindow(int winnum); /* SET */
 
 extern int sciInitUsedWindow( int winNum ) ; /* SET */
 extern int sciSetUsedWindow( int winNum ) ; /* SET */
@@ -245,14 +244,13 @@ int sciInitIsEventHandlerEnable( sciPointObj * pObj, BOOL enable ) ;
 int sciSetIsEventHandlerEnable(  sciPointObj * pObj, BOOL enable ) ;
 
 int sciSetSelectedObject( sciPointObj * pObj ) ;
-
-int sciInitIsReadyForRendering( sciPointObj * pObj, BOOL isReady ) ;
-
 int sciSetDataBounds( sciPointObj * pObj, double bounds[6] ) ; /* SET */
 
 int sciInitViewingAngles( sciPointObj * pObj, double alpha, double theta) ;
 int sciSetViewingAngles( sciPointObj * pObj, double alpha, double theta); /* SET */
 
+int setInfoMessageWithRotationAngles(sciPointObj * pFigure, double alpha, double theta);
+
 /*---------------------------------------------------------------------------*/
 /* return 0 if the string contains any % character, 1 if a %d has been found */
 /* and -1 otherwise. */
index d1438e4..b303efa 100644 (file)
@@ -9,82 +9,77 @@
 #ifndef _WINDOW_LIST_
 #define _WINDOW_LIST_
 
-#include "bcg.h"
 #include "machine.h"
+#include "ObjectStructure.h"
+#include "DoublyLinkedList.h"
 
 /**
- * definition of the list of windows
+ * List of all scilab figure
  */
-typedef struct WindowList
-{
-  struct BCG winxgc ;
-  struct WindowList * next ;
-} WindowList  ;
+typedef DoublyLinkedList FigureList;
 
 /**
  * to know if there are some opened graphic windows
  */
-BOOL isWindowListEmpty( void ) ;
+BOOL sciHasFigures( void ) ;
 
 /**
  * retrieve the scilab window list (The_List).
  */
-WindowList * getScilabWindowList( void ) ;
+FigureList * getScilabFigureList( void ) ;
 
 /**
  * get the fist BCG in the list
  */
-struct BCG * getFirstWindow( void ) ;
+sciPointObj * getFirstFigure( void ) ;
 
 /**
  * create a new element at the end of the scilab
  * window List and return it's BCG.
  */
-struct BCG * addWindowItem( void ) ;
+void addNewFigureToList(sciPointObj * figure);
 
 /**
- * remove the window with a certain BCG from the list
+ * remove a figure from the list.
  * @return 0  if the item was removed successfully
  *         -1 if the item has not been find.
  */
-int removeWindowItem( struct BCG * window ) ;
+void removeFigureFromList(sciPointObj * figure);
 
 /**
  * returns the graphic context of window i
  * or NULL if this window does not exists
  */
-struct BCG * getWindowXgcNumber( integer i ) ;
+sciPointObj * getFigureFromIndex(int figNum) ;
 
 /**
- * get ids of scilab windows
- * in array Ids,
- * @param[out] Num gives the number of windows
- * @param[in] flag if 1 ==> get the Ids 
- *                 if 0 ==> just get the Number Num 
+ * @return TRUE if the figure with index id exists
  */
-void getWins( integer * Num, integer * Ids, integer * flag ) ;
+BOOL sciIsExistingFigure(int figNum);
+
+
 
 /**
- * get the highest Id of scilab windows
- * or -1 if no windows
+ * @return number of opened windows in Scilab.
+ */
+int sciGetNbFigure(void);
+
+/**
+ * Fill the array Ids with all the figure ids currently used by Scilab.
+ * @param ids should be as long as there are figures.
  */
-int getWinsMaxId( void ) ;
+void sciGetFiguresId(int ids[]);
 
-/*----------------------------------------------------------------------------------*/
-/* Private */
 /**
- * find the last item in the windowList
+ * get the highest Id of Scilab figures.
+ * or -1 if no windows
  */
-WindowList * getLastWindowItem( void ) ;
+int sciGetFiguresMaxId( void ) ;
 
 /**
- * find an item in the windowList and its previous.
- * @param[in] window the looked for BCG
- * @param[out] item a pointer on the item. If it has not been find NULL.
- * @param[out] previous a pointer on the previous item. If the item is the first
- *                      in the list or has not been find NULL.
+ * @return an unused index by graphic figures. Used when creating a new window.
  */
-void findWindowItem( struct BCG * window, WindowList ** item, WindowList ** previous ) ;
+int getUnusedFigureIndex(void);
+
 
-/*----------------------------------------------------------------------------------*/
 #endif /* _WINDOW_LIST */
diff --git a/scilab/modules/graphics/includes/Xcall1.h b/scilab/modules/graphics/includes/Xcall1.h
deleted file mode 100644 (file)
index f59177f..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*------------------------------------------------------------------------
-*   Graphic library for 2D and 3D plotting 
-*   Copyright (C) 1998-2001 Chancelier Jean-Philippe 
-*   Copyright INRIA 2006
-*   Jean-Baptiste Silvy
-*--------------------------------------------------------------------------*/
-
-#ifndef _XCALL1_H_
-#define _XCALL1_H_
-
-#include "machine.h"
-
-int C2F(dr1)( char x0[],char x1[],integer *x2,integer *x3,integer *x4,integer *x5,integer *x6,
-              integer *x7,double *dx1,double *dx2,double *dx3,double *dx4,
-              integer lx0, integer lx1) ;
-
-int C2F(dr)(char x0[],char x1[],integer *x2,integer *x3,integer *x4,integer *x5,integer *x6,
-            integer *x7,double *dx1,double *dx2,double *dx3,double *dx4,
-            integer lx0, integer lx1) ;
-
-int C2F(xsetg)(char * str,char * str1,integer lx0,integer lx1) ;
-int C2F(xgetg)( char * str, char * str1, integer * len,integer  lx0,integer lx1) ;
-
-char GetDriver( void ) ;
-void GetDriver1(char *str, integer *v2,integer * v3,integer * v4, integer *v5,integer * v6,
-                integer * v7,double * dv1,double * dv2,double * dv3,double * dv4) ;
-
-int GetDriverId( void ) ;
-
-char * getFPF(void) ;
-
-void C2F(SetDriver)(char *x0, integer *v2,integer * v3,integer * v4, integer *v5,integer * v6, integer * v7,double * dv1,double * dv2,double * dv3,double * dv4);
-
-/**
- *we draw marks in pixel
- * Returns the DPI depending on the used driver
- */
-int GetDPIFromDriver( int DPI[2] ) ;
-
-#endif /* _XCALL1_H_ */
diff --git a/scilab/modules/graphics/includes/bcg.h b/scilab/modules/graphics/includes/bcg.h
deleted file mode 100644 (file)
index ad2a65e..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-/*------------------------------------------------------------------------
- *    Graphic library
- *    Copyright (C) 1998-2000 Enpc/Jean-Philippe Chancelier
- *    jpc@cereve.enpc.fr 
- --------------------------------------------------------------------------*/
-# ifndef __BCG__
-#define __BCG__
-
-
-
-#ifndef _MSC_VER
-#include <X11/Xlib.h>
-#include <X11/Intrinsic.h>
-#else
-#endif 
-
-#include "machine.h" /* to be sure that WITH_XXX are defined */
-#include "Events.h"
-
-#ifndef CoordModePrevious 
-#define CoordModePrevious 1
-#define CoordModeOrigin 0
-#endif 
-
-#ifndef _MSC_VER
-  #ifndef GXclear 
-   #define GXclear 0
-   #define GXand 1
-   #define GXandReverse 2
-   #define GXcopy 3
-   #define GXandInverted 4
-   #define GXnoop 5
-   #define GXxor 6
-   #define GXor 7
-   #define GXnor 8
-   #define GXequiv 9
-   #define GXinvert 10
-   #define GXorReverse 11
-   #define GXcopyInverted 12
-   #define GXorInverted 13
-   #define GXnand 14
-   #define GXset 15
-  #endif 
-#endif
-
-/** Structure to keep the graphic state  **/
-
-
-typedef struct _menu_entry { 
-  char *name; /* name of the entry */
-  char *accel;/* name of accelerator */
-  int status; /* active 1, not active 0, deleted -1*/
-  int nsub  ; /* if menu_entry is a sub_menu nsub gives its number else its value is one */
-  struct _menu_entry *subs; /* menu_entry has some submenus */
-  int winid ; /* associated window */
-  int action_type ; /* hard coded or macro */
-  char *fname;/* name of function to be called*/
-  struct _menu_entry *menu; /* point to the father for sub_menus */
-  struct _menu_entry *next; /* next one .... */
-} menu_entry;
-
-
-/* #include "Entities.h" */
-#include "ObjectStructure.h"
-
-typedef int (*EVTHANDLER) __PARAMS((int win,int x,int y,int ibut));
-
-typedef struct BCG 
-{ 
-  int CurWindow ;   /** Id of window **/
-  int CWindowWidth ; /** graphic window width **/
-  int CWindowHeight ; /** graphic window height **/
-  int FontSize ;
-  int FontId ;
-  int CurHardSymb;
-  int CurHardSymbSize;
-  int CurLineWidth;
-  int CurPattern;
-  int CurColor;
-  int CurPixmapStatus;
-  int CurResizeStatus;
-  int CurVectorStyle;
-  int CurDrawFunction;
-  int ClipRegionSet;
-  int CurClipRegion[4];
-  int CurDashStyle;
-  char CurNumberDispFormat[20]; 
-  int CurColorStatus;
-  int IDLastPattern; /* number of last patter or color */
-  /** Colormap Cmap; color map of current graphic window */
-  int CmapFlag ; /* set to 1 if the Cmap has default colors */
-  int Numcolors; /* number of colors */
-  float *Red; /* red value: between 0 and 1 */
-  float *Green; /* green value: between 0 and 1 */
-  float *Blue; /* blue value: between 0 and 1 */
-  int NumBackground;  /* number of Background */
-  int NumForeground; /* number of Foreground in the color table */
-  int NumHidden3d;  /* color for hidden 3d facets **/
-  int EventHandlerType; /* does the event handler removes the normal event handling*/
-  /* NG beg */
-  int CWindowWidthView;         /** graphic window width **/
-  int CWindowHeightView;  /** graphic window height **/
-  sciPointObj *mafigure;  /* Entities root */
-  /*int graphicsversion;*/ /* old style is dead */
-  /* NG end */
-#ifdef _MSC_VER
-#else 
-  /** Xwindow specific objects **/
-  Drawable Cdrawable ; /** The drawable = CWindow or a Pixmap */
-  int  Cdrawable_flag ; /** Cdrawable is not synchronized with graphics when == 1  */
-  Widget CinfoW ;  /** info widget of graphic window **/
-  Widget Viewport; /** Viewport for graphic window **/
-  Widget Panner ;  /** Panner widget **/
-  Widget drawbox ; /** the widget associated to CWindow **/
-  Widget popup   ; /** graphic window popupc **/
-  Window CWindow ; /** the graphic window **/
-  Window CBGWindow ; /** window of the top level graphic popup widget **/
-  XID FontXID;
-  Colormap Cmap; /* color map of current graphic window */
-  Pixel *Colors; /* vector of colors 
-                   Note that there are 2 colors more than Numcolors,
-                   ie black and white at the end of this vector */
-#endif
-} BCG ;
-
-
-extern struct BCG *GetWindowXgcNumber  (int i);
-
-
-#endif /* __BCG__ */
diff --git a/scilab/modules/graphics/includes/clipping.h b/scilab/modules/graphics/includes/clipping.h
deleted file mode 100644 (file)
index d93c70d..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/*----------------------------------------------------------------------------------------*/
-/* FILE      : clipping.h                                                                 */
-/* COPYRIGHT : INRIA 2006                                                                 */
-/* AUTHORS   : Jean-Baptiste Silvy, Jean-Philipe Chancelier                               */
-/* DESC.     : Management of clipping when drawing                                        */
-/*----------------------------------------------------------------------------------------*/
-
-#ifndef __SCI_CLIPPING__
-#define __SCI_CLIPPING__
-
-#include "ObjectStructure.h"
-#include "PloEch.h"
-
-/*----------------------------------------------------------------------------------------*/
-/*
- * @memo a structure to defined a clipping rectangle in pixels
- */
-typedef struct
-{
-  int leftX   ; /* abscissa of the left edge of the region */
-  int rightX  ; /* abscissa of the rigth edge */
-  int bottomY ; /* ordinate of the bottom edge */
-  int topY    ; /* ordinate of the upper edge */
-}
-SClipRegion ;
-
-/*----------------------------------------------------------------------------------------*/
-/**
- * To retrieve the current clipping region
- */
-SClipRegion getClipRegion( struct BCG * scilabXGC ) ;
-/*----------------------------------------------------------------------------------------*/
-/* 
- * use for drawing precomputing clipping when drawing polygons
- * Test a single point to be within the xleft,xright,ybot,ytop bbox.
- * Sets the returned integers 4 l.s.b. as follows:
- * bit 0 if to the left of xleft.
- * bit 1 if to the right of xright.
- * bit 2 if below of ybot.
- * bit 3 if above of ytop.
- * 0 is returned if inside.
- */
-int sciClipPoint(integer x, integer y, SClipRegion * clipping ) ;
-
-void sciClipLine( integer       x1      ,
-                  integer       yy1     ,
-                  integer       x2      ,
-                  integer       y2      ,
-                  integer     * x1n     ,
-                  integer     * yy1n    ,
-                  integer     * x2n     ,
-                  integer     * y2n     ,
-                  integer     * flag    ,
-                  SClipRegion * clipping  ) ;
-
-void sciDrawInsideSegments( integer       iib, 
-                            integer       iif, 
-                            integer     * vx , 
-                            integer     * vy ,
-                            SClipRegion * clipping ) ;
-
-/* draw the segement defined by (vx[index-1],vy[index-1]) (vx[index],vy[index]) */
-void sciDrawOutsideSegment( integer ind, 
-                            integer *vx,
-                            integer *vy, 
-                            SClipRegion * clipping ) ;
-/* 
- *  returns the first (vx[.],vy[.]) point inside 
- *  xleft,xright,ybot,ytop bbox. begining at index ideb
- *  or zero if the whole polyline is out 
- */
-integer sciFirstInClipRegion( integer       n   ,
-                              integer       ideb,
-                              integer     * vx  ,
-                              integer     * vy  ,
-                              SClipRegion * clipping ) ;
-/* 
- *  returns the first (vx[.],vy[.]) point outside
- *  xleft,xright,ybot,ytop bbox.
- *  or zero if the whole polyline is out 
- */
-integer sciFirstOutClipRegion( integer       n   ,
-                               integer       ideb,
-                               integer     * vx  ,
-                               integer     * vy  ,
-                               SClipRegion * clipping ) ;
-
-/* 
- * check every segment of the polyline and draw only the part which is in the
- * clip region
- */
-void C2F(clipPolyLine)( integer       n     , 
-                        integer     * vx    , 
-                        integer     * vy    , 
-                        integer       closed,
-                        SClipRegion * clipping ) ;
-
-/*----------------------------------------------------------------------------------------*/
-/*
- * get the real clipping (the set one the axe or the window borders) 
- * in pixels of a graphic object
- */
-void getPixelClipping( sciPointObj * pObj, SClipRegion * clipping ) ;
-/*----------------------------------------------------------------------------------------*/
-/**
- * Set the clipping rectangl.
- * Note that clipping is not supported at all in 3D mode for now :
- * This assertion includes axes (in 3D), surfaces and parametric curves objects.
- * @author Djalel ABDEMOUCHE
- * 29/11/2002
- */
-void sciClip ( sciPointObj * pobj ) ;
-
-/**
- * Clear the clipping rectangle 
- * @author Djalel ABDEMOUCHE
- * 29/11/2002
- */
-void sciUnClip ( sciPointObj * pobj ) ;
-/*----------------------------------------------------------------------------------------*/
-/**
- * use current scale to set the clipping rectangle 
- */
-void frame_clip_on(  void ) ;
-
-/**
- * disable clipping (to be called after frame_clip_on
- */
-void frame_clip_off( void ) ;
-/*----------------------------------------------------------------------------------------*/
-
-#endif /* __SCI_CLIPPING__ */
index f8b208e..2c977a0 100644 (file)
@@ -82,7 +82,6 @@ int sci_draw                       _PARAMS((char *fname, unsigned long fname_len
 int sci_xs2gif                     _PARAMS((char *fname, unsigned long fname_len));
 int sci_xs2ppm                     _PARAMS((char *fname, unsigned long fname_len));
 int sci_set_posfig_dim             _PARAMS((char *fname, unsigned long fname_len));
-int sci_xsnative                   _PARAMS((char *fname, unsigned long fname_len));
 int sci_zoom_rect                  _PARAMS((char *fname, unsigned long fname_len));
 int sci_unzoom                     _PARAMS((char *fname, unsigned long fname_len));
 int sci_xs2bmp                     _PARAMS((char *fname, unsigned long fname_len));
diff --git a/scilab/modules/graphics/includes/handleDrawing/drawArcEntity.h b/scilab/modules/graphics/includes/handleDrawing/drawArcEntity.h
deleted file mode 100644 (file)
index b26905f..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*------------------------------------------------------------------------*/
-/* file: drawArcEntity.h                                                  */
-/* Copyright INRIA 2006                                                   */
-/* Authors : Jean-Baptiste Silvy                                          */
-/* desc : Contains functions needed to draw an Arc handle                 */
-/*------------------------------------------------------------------------*/
-
-#ifndef _DRAW_ARC_ENTITY_H_
-#define _DRAW_ARC_ENTITY_H_
-
-#include "ObjectStructure.h"
-
-/**
-* Routine which draw an arc object
-* @param pObj the pointer on the arc object
-*/
-int drawArcEntity( sciPointObj * pObj ) ;
-
-#endif /* _DRAW_ARC_ENTITY_H_ */
diff --git a/scilab/modules/graphics/includes/handleDrawing/drawAxesEntity.h b/scilab/modules/graphics/includes/handleDrawing/drawAxesEntity.h
deleted file mode 100644 (file)
index ad12e30..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*------------------------------------------------------------------------*/
-/* file: drawAxesEntity.h                                                 */
-/* Copyright INRIA 2006                                                   */
-/* Authors : Jean-Baptiste Silvy                                          */
-/* desc : Contains functions needed to draw a Axes handle                 */
-/*------------------------------------------------------------------------*/
-
-#ifndef _DRAW_AXES_ENTITY_H_
-#define _DRAW_AXES_ENTITY_H_
-
-#include "ObjectStructure.h"
-
-/**
-* Routine which draw an axes object.
-* @param pObj the pointer on the axes object
-*/
-int drawAxesEntity( sciPointObj * pObj ) ;
-
-#endif /* _DRAW_AXES_ENTITY_H_ */
diff --git a/scilab/modules/graphics/includes/handleDrawing/drawCompoundEntity.h b/scilab/modules/graphics/includes/handleDrawing/drawCompoundEntity.h
deleted file mode 100644 (file)
index c2b93f9..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*------------------------------------------------------------------------*/
-/* file: drawCompoundEntity.h                                             */
-/* Copyright INRIA 2006                                                   */
-/* Authors : Jean-Baptiste Silvy                                          */
-/* desc : Contains functions needed to draw a compound handle             */
-/*------------------------------------------------------------------------*/
-
-#ifndef _DRAW_COMPOUND_ENTITY_H_
-#define _DRAW_COMPOUND_ENTITY_H_
-
-#include "ObjectStructure.h"
-
-/**
-* Routine which draw a compound object
-* @param pObj the pointer on the compound object
-*/
-int drawCompoundEntity( sciPointObj * pObj ) ;
-
-#endif /* _DRAW_COMPOUND_ENTITY_H_ */
diff --git a/scilab/modules/graphics/includes/handleDrawing/drawFecEntity.h b/scilab/modules/graphics/includes/handleDrawing/drawFecEntity.h
deleted file mode 100644 (file)
index 4b63109..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*------------------------------------------------------------------------*/
-/* file: drawFecEntity.h                                                  */
-/* Copyright INRIA 2006                                                   */
-/* Authors : Jean-Baptiste Silvy                                          */
-/* desc : Contains functions needed to draw a fec handle                  */
-/*------------------------------------------------------------------------*/
-
-#ifndef _DRAW_FEC_ENTITY_H_
-#define _DRAW_FEC_ENTITY_H_
-
-#include "ObjectStructure.h"
-
-/**
-* Routine which draw a fec object
-* @param pObj the pointer on the fec object
-*/
-int drawFecEntity( sciPointObj * pObj ) ;
-
-#endif /* _DRAW_FEC_ENTITY_H_ */
diff --git a/scilab/modules/graphics/includes/handleDrawing/drawFigureEntity.h b/scilab/modules/graphics/includes/handleDrawing/drawFigureEntity.h
deleted file mode 100644 (file)
index f7f4ef6..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*------------------------------------------------------------------------*/
-/* file: drawFigureEntity.h                                               */
-/* Copyright INRIA 2006                                                   */
-/* Authors : Jean-Baptiste Silvy                                          */
-/* desc : Contains functions needed to draw a figure handle               */
-/*------------------------------------------------------------------------*/
-
-#ifndef _DRAW_FIGURE_ENTITY_H_
-#define _DRAW_FIGURE_ENTITY_H_
-
-#include "ObjectStructure.h"
-
-/**
- * Routine which draw a figure object
- * @param pObj the pointer on the figure object
- */
-int drawFigureEntity( sciPointObj * pObj ) ;
-
-#endif /* _DRAW_FIGURE_ENTITY_H_ */
diff --git a/scilab/modules/graphics/includes/handleDrawing/drawGrayplotEntity.h b/scilab/modules/graphics/includes/handleDrawing/drawGrayplotEntity.h
deleted file mode 100644 (file)
index 0ca2705..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*------------------------------------------------------------------------*/
-/* file: drawGrayplotEntity.h                                             */
-/* Copyright INRIA 2006                                                   */
-/* Authors : Jean-Baptiste Silvy                                          */
-/* desc : Contains functions needed to draw a grayplot handle             */
-/*------------------------------------------------------------------------*/
-
-#ifndef _DRAW_GRAYPLOT_ENTITY_H_
-#define _DRAW_GRAYPLOT_ENTITY_H_
-
-#include "ObjectStructure.h"
-
-/**
-* Routine which draw a grayplot object
-* @param pObj the pointer on the grayplot object
-*/
-int drawGrayplotEntity( sciPointObj * pObj ) ;
-
-#endif /* _DRAW_GRAYPLOT_ENTITY_H_ */
diff --git a/scilab/modules/graphics/includes/handleDrawing/drawLegendEntity.h b/scilab/modules/graphics/includes/handleDrawing/drawLegendEntity.h
deleted file mode 100644 (file)
index c3be428..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*------------------------------------------------------------------------*/
-/* file: drawLegendEntity.h                                               */
-/* Copyright INRIA 2006                                                   */
-/* Authors : Jean-Baptiste Silvy                                          */
-/* desc : Contains functions needed to draw a legend handle               */
-/*------------------------------------------------------------------------*/
-
-#ifndef _DRAW_LEGEND_ENTITY_H_
-#define _DRAW_LEGEND_ENTITY_H_
-
-#include "ObjectStructure.h"
-
-/**
-* Routine which draw a legend object
-* @param pObj the pointer on the legend object
-*/
-int drawLegendEntity( sciPointObj * pObj ) ;
-
-#endif /* _DRAW_LEGEND_ENTITY_H_ */
diff --git a/scilab/modules/graphics/includes/handleDrawing/drawPolylineEntity.h b/scilab/modules/graphics/includes/handleDrawing/drawPolylineEntity.h
deleted file mode 100644 (file)
index 1915f3c..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*------------------------------------------------------------------------*/
-/* file: drawPolylineEntity.h                                             */
-/* Copyright INRIA 2006                                                   */
-/* Authors : Jean-Baptiste Silvy                                          */
-/* desc : Contains functions needed to draw a Polyline handle             */
-/*------------------------------------------------------------------------*/
-
-#ifndef _DRAW_POLYLINE_ENTITY_H_
-#define _DRAW_POLYLINE_ENTITY_H_
-
-#include "ObjectStructure.h"
-
-/**
-* Routine which draw a polyline object
-* @param pObj the pointer on the polyline object
-*/
-int drawPolylineEntity( sciPointObj * pObj ) ;
-
-/**
- * 
- * BuildXYZvectForClipping_IfNanOrLogON : this function is used for polylines to determine if we have to cut the polyline data for 2 reasons:
- * - clipping is forced because we have a Nan inside the data columns
- * - clipping is forced because we have a log scale on an axis and polyline data < 0 on this axis (clipping on X11 or Win is based on pixel we compute so if
- * the algo tried to evaluate log(-5.6) (for example) and then we tried to make a Xscale (or logXscale) on it, it doesn't work at all!!
- * What we do is: we cut the polyline into several polylines and reject Nan values and data<0 if axis is in log scale
- * @author F.Leray 02.11.04
- */
-int BuildXYZvectForClipping_IfNanOrLogON( sciPointObj *   ppolyline,
-                                          sciPointObj *   psubwin  ,
-                                          int         *   nb_curves,
-                                          double      *** xvect    ,
-                                          double      *** yvect    ,
-                                          double      *** zvect    ,
-                                          int         **  curves_size ) ;
-
-void Plo2dTo3d(integer type, integer *n1, integer *n2, double x[], double y[], double z[], double xOut[], double yOut[], double zOut[]) ;
-
-#endif /* _DRAW_POLYLINE_ENTITY_H_ */
diff --git a/scilab/modules/graphics/includes/handleDrawing/drawRectangleEntity.h b/scilab/modules/graphics/includes/handleDrawing/drawRectangleEntity.h
deleted file mode 100644 (file)
index 6fc71be..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*------------------------------------------------------------------------*/
-/* file: drawRectangleEntity.h                                            */
-/* Copyright INRIA 2006                                                   */
-/* Authors : Jean-Baptiste Silvy                                          */
-/* desc : Contains functions needed to draw a Rectangle handle            */
-/*------------------------------------------------------------------------*/
-
-#ifndef _DRAW_RECTANGLE_ENTITY_H_
-#define _DRAW_RECTANGLE_ENTITY_H_
-
-#include "ObjectStructure.h"
-
-/**
-* Routine which draw a rectangle object
-* @param pObj the pointer on the rectangle object
-*/
-int drawRectangleEntity( sciPointObj * pObj ) ;
-
-#endif /* _DRAW_RECTANGLE_ENTITY_H_ */
diff --git a/scilab/modules/graphics/includes/handleDrawing/drawSegsEntity.h b/scilab/modules/graphics/includes/handleDrawing/drawSegsEntity.h
deleted file mode 100644 (file)
index 4fe2e7e..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*------------------------------------------------------------------------*/
-/* file: drawSegsEntity.h                                                 */
-/* Copyright INRIA 2006                                                   */
-/* Authors : Jean-Baptiste Silvy                                          */
-/* desc : Contains functions needed to draw a segs handle                 */
-/*------------------------------------------------------------------------*/
-
-#ifndef _DRAW_SEGS_ENTITY_H_
-#define _DRAW_SEGS_ENTITY_H_
-
-#include "ObjectStructure.h"
-
-/**
- * Routine which draw a segs object
- * @param pObj the pointer on the segs object
- */
-int drawSegsEntity( sciPointObj * pObj ) ;
-
-/**
- * Compute the arrow size which must be used in (dr)(xarrows).
- * @param[in] pSegs object of which we are displaying arrows.
- * @param[in] X coordinates in pixels of the segments
- * @param[in] Y coordinates in pixels of the segments
- * @return    Size to use in xarrows.
- */
-int computeRealArrowSize( sciPointObj * pSegs, int nbSegs, int xCoord[], int yCoord[] ) ;
-
-#endif /* _DRAW_SEGS_ENTITY_H_ */
diff --git a/scilab/modules/graphics/includes/handleDrawing/drawSubWinEntity.h b/scilab/modules/graphics/includes/handleDrawing/drawSubWinEntity.h
deleted file mode 100644 (file)
index 338df9c..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*------------------------------------------------------------------------*/
-/* file: drawSubWinEntity.h                                               */
-/* Copyright INRIA 2006                                                   */
-/* Authors : Jean-Baptiste Silvy                                          */
-/* desc : Contains functions needed to draw a subwindow handle            */
-/*------------------------------------------------------------------------*/
-
-#ifndef _DRAW_SUBWIN_ENTITY_H_
-#define _DRAW_SUBWIN_ENTITY_H_
-
-#include "ObjectStructure.h"
-
-/**
-* Routine which draw a subwindow object
-* @param pObj the pointer on the subwindow object
-*/
-int drawSubWinEntity( sciPointObj * pObj ) ;
-
-#endif /* _DRAW_FIGURE_ENTITY_H_ */
diff --git a/scilab/modules/graphics/includes/handleDrawing/drawSurfaceEntity.h b/scilab/modules/graphics/includes/handleDrawing/drawSurfaceEntity.h
deleted file mode 100644 (file)
index 8920617..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*------------------------------------------------------------------------*/
-/* file: drawSurfaceEntity.h                                              */
-/* Copyright INRIA 2006                                                   */
-/* Authors : Jean-Baptiste Silvy                                          */
-/* desc : Contains functions needed to draw a surface handle              */
-/*------------------------------------------------------------------------*/
-
-#ifndef _DRAW_SURFACE_ENTITY_H_
-#define _DRAW_SURFACE_ENTITY_H_
-
-#include "ObjectStructure.h"
-
-/**
-* Routine which draw a surface object.
-* @param pObj the pointer on the surface object
-*/
-int drawSurfaceEntity( sciPointObj * pObj ) ;
-
-#endif /* _DRAW_SURFACE_ENTITY_H_ */
diff --git a/scilab/modules/graphics/includes/handleDrawing/drawTextEntity.h b/scilab/modules/graphics/includes/handleDrawing/drawTextEntity.h
deleted file mode 100644 (file)
index 6162415..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*------------------------------------------------------------------------*/
-/* file: drawTextEntity.h                                                 */
-/* Copyright INRIA 2006                                                   */
-/* Authors : Jean-Baptiste Silvy                                          */
-/* desc : Contains functions needed to draw a text handle                 */
-/*------------------------------------------------------------------------*/
-
-#ifndef _DRAW_TEXT_ENTITY_H_
-#define _DRAW_TEXT_ENTITY_H_
-
-#include "ObjectStructure.h"
-#include "StringMatrix.h"
-#include "Vect2Matrix.h"
-
-
-/**
- * Routine which draw a text object
- * @param pObj the pointer on the text object
- */
-int drawTextEntity( sciPointObj * pObj ) ;
-
-/**
- * Given a matrix of strings and an array of cells positions, draw each strings in
- * the corresponding cell. The array of cells must not been turned, this function
- * manage the rotation itself. The alignment is also respected.
- * @param strings     set of strings to display.
- * @param cellsArray  position of the cells in which the strings are dispalyed.
- * @param center      position of the center of the string array around which the rotation
- *                    is done.
- * @param angle       rotation angle in radian of the displayed matrix around its
- *                    lower left point.
- * @param align       position of strings inside their cells.
- */
-void drawStringsInPosition( StringMatrix     * strings    ,
-                            Vect2iMatrix     * cellsArray ,
-                            int                center[2]  ,
-                            double             angle      ,
-                            sciTextAlignment   align       ) ;
-
-/**
- * Draw a string inside a box. The box can be rotated.
- * @param string displayed string
- * @param blCorner  Bottom left corner of the string.
- * @param urCorner  Upper right corner of the string.
- * @param rotCenter Rotation center.
- * @param angle     Rotation angle in radian.
- * @param align     Position of the string inside the box.
- */
-void drawStringInCell( char             * string      ,
-                       int                blCorner[2] ,
-                       int                urCorner[2] ,
-                       int                rotCenter[2],
-                       double             angle       ,
-                       sciTextAlignment   align        ) ;
-
-/**
- * Inside a cell, return the margin to be used for the display of a string inside a cell.
- * @param stringSize width and height of the string wich will be displayed.
- * @param blCorner   the bottom left corner of the cell. The cell must not be turned
- *                   (ie axes aligned).
- * @param urCorner   the upper right corner of the cell.
- * @param align      specify the position of the string inside the cell.
- * @param lMargin    left margin (horizontal).
- * @param bMargin    bottom margin (vertical).
-
- */
-void getStringMargins( int                stringSize[2],
-                       int                blCorner[2]  ,
-                       int                urCorner[2]  ,
-                       sciTextAlignment   align        ,
-                       int              * lMargin      ,
-                       int              * bMargin       ) ;
-
-
-#endif /* _DRAW_TEXT_HANDLE_H_ */
diff --git a/scilab/modules/graphics/includes/periFig.h b/scilab/modules/graphics/includes/periFig.h
deleted file mode 100644 (file)
index 45e2805..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/*------------------------------------------------------------------------
- *    Graphic library
- *    Copyright (C) 1998-2000 Enpc/Jean-Philippe Chancelier
- *    jpc@cereve.enpc.fr 
- --------------------------------------------------------------------------*/
-#ifndef __PERIFIG_H__
-#define __PERIFIG_H__
-
-#include "bcg.h"
-
-
- extern void  C2F(drawarcXfig)();
- extern void  C2F(fillarcsXfig)();
- extern void  C2F(drawarcsXfig)();
- extern void  C2F(fillareaXfig)();
- extern void  C2F(drawaxisXfig)();
- extern void  C2F(clearareaXfig)();
- extern void  C2F(clearwindowXfig)();
- extern void  C2F(xclickXfig)();
- extern void  C2F(xclick_anyXfig)();
- extern void  C2F(xgetmouseXfig)();
- extern void  C2F(xendXfig)();
- extern void  C2F(fillarcXfig)();
- extern void  C2F(viderbuffXfig)();
- extern void  C2F(fillrectangleXfig)();
- extern void  C2F(scilabgcgetXfig)();
- extern void  C2F(initgraphicXfig)();
- extern void  C2F(initgraphicfromscreenXfig)();
- extern void  C2F(drawpolylineXfig)();
- extern void  C2F(drawClippedPolylineXfig)();
- extern void  C2F(drawpolylinesXfig)();
- extern void  C2F(fillpolylinesXfig)();
- extern void  C2F(fillpolylineXfig)();
- extern void  C2F(drawpolymarkXfig)();
- extern void  C2F(getFontMaxSizeXfig)();
- extern void  C2F(displaynumbersXfig)();
- extern void  C2F(drawrectangleXfig)();
- extern void  C2F(drawrectanglesXfig)();
- extern void  C2F(drawsegmentsXfig)();
- extern void  C2F(xselgraphicXfig)();
- extern void  C2F(scilabgcsetXfig)();
- extern void  C2F(SetDriverXfig)();
- extern void  C2F(displaystringXfig)();
- extern void  C2F(boundingboxXfig)();
- extern void  C2F(drawarrowsXfig)(); 
- extern void  C2F(loadfamilyXfig)();
- extern void  C2F(queryfamilyXfig)() ;
-
-void C2F(getwindowdimXfig)(integer *verbose, integer *x, integer *narg, double *dummy) ;
-
-void C2F(set_dash_or_color_Xfig)(integer *value, integer *v2, integer *v3, integer *v4);
-
-void C2F(set_dash_and_color_Xfig)(integer *value, integer *v2, integer *v3, integer *v4);
-
-void C2F(set_line_style_Xfig)(integer *value, integer *v2, integer *v3, integer *v4);
-
-void C2F(setgccolormapXfig)(struct BCG *Xgc,integer m, double *a, integer *v3);
-
-void C2F(getcolormapsizeXfig)(integer *v1, integer *v2, integer *v3, double *val);
-
-void C2F(getcolormapXfig)(integer *v1, integer *v2, integer *v3, double *val);
-
-void C2F(get_dash_or_color_Xfig)(integer *verbose, integer *value, integer *narg, double *dummy);
-
-void C2F(get_dash_and_color_Xfig)(integer *verbose, integer *value, integer *narg, double *dummy);
-
-void C2F(boundingboxXfig)(char *string, integer *x, integer *y, integer *rect, integer *v5, integer *v6, integer *v7, double *dx1, double *dx2, double *dx3, double *dx4);
-
-void C2F(fillarcsXfig_old)(char *str, integer *vects, integer *fillvect, integer *n, integer *v5, integer *v6, integer *v7, double *dx1, double *dx2, double *dx3, double *dx4);
-
-void C2F(drawarcsXfig_old)(char *str, integer *vects, integer *style, integer *n, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
-
-
-void C2F(drawClippedPolylineXfig)(char *str, integer *n, integer *vx, integer *vy, integer *closeflag, integer *v6, integer *v7, double *dx1, double *dx2, double *dx3, double *dx4);
-
-void C2F(queryfamilyXfig)(char *name, integer *j, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
-
-void C2F(getFontMaxSizeXfig)(char *str, integer * sizeMin, integer *sizeMax, integer *v1, integer *v2, integer *v3, integer *v4, double *dx1, double *dx2, double *dx3, double *dx4);
-
-void C2F(boundingboxXfigM)(char *string, integer *x, integer *y, integer *rect, integer *v5, integer *v6, integer *v7, double *dx1, double *dx2, double *dx3, double *dx4);
-
-void C2F(drawarcXfig_old)(char *str, integer *x, integer *y, integer *width, integer *height, integer *angle1, integer *angle2, double *dx1, double *dx2, double *dx3, double *dx4);
-
-void C2F(fillarcXfig_old)(char *str, integer *x, integer *y, integer *width, integer *height, integer *angle1, integer *angle2, double *dx1, double *dx2, double *dx3, double *dx4);
-
-void C2F(initgraphicfromscreenXfig)(char *string, integer *v2, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dx1, double *dx2, double *dx3, double *dx4);
-
-#endif /*__PERIFIG_H__*/
-
diff --git a/scilab/modules/graphics/includes/periGif.h b/scilab/modules/graphics/includes/periGif.h
deleted file mode 100644 (file)
index e1910c3..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/*------------------------------------------------------------------------
- *    Graphic library
- *    Copyright (C) 1998-2000 Enpc/Jean-Philippe Chancelier
- *    jpc@cereve.enpc.fr 
- --------------------------------------------------------------------------*/
-/*------------------------------------------------------------------------
- *    SCILAB GIF Output based on GD Library from: http://www.boutell.com/gd
- *   Modelled after the original PostScript Driver in periPos.c
- *   Copyright (C) 1999, Tom Leitner, tom@finwds01.tu-graz.ac.at
- *--------------------------------------------------------------------------*/
-#ifndef __PERIGIF_H__
-#define __PERIGIF_H__
-
- extern void  C2F(drawarcGif)(char *str, integer *x, integer *y, integer *width, integer *height, integer *angle1, integer *angle2, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(fillarcsGif)(char *str, integer *vects, integer *fillvect, integer *n, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(drawarcsGif)(char *str, integer *vects, integer *style, integer *n, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(fillpolylineGif)(char *str, integer *n, integer *vx, integer *vy, integer *closeareaflag, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(drawaxisGif)(char *str, integer *alpha, integer *nsteps, integer *v2, integer *initpoint, integer *v6, integer *v7, double *size, double *dx2, double *dx3, double *dx4);
- extern void  C2F(clearareaGif)(char *str, integer *x, integer *y, integer *w, integer *h, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(clearwindowGif)(char *v1, integer *v2, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(xclickGif)(char *str, integer *ibutton, integer *xx1, integer *yy1, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(xclick_anyGif)(char *str, integer *ibutton, integer *xx1, integer *yy1, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(xgetmouseGif)(char *str, integer *ibutton, integer *xx1, integer *yy1, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(xendGif)(char *v1, integer *v2, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(fillarcGif)(char *str, integer *x, integer *y, integer *width, integer *height, integer *angle1, integer *angle2, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(fillrectangleGif)(char *str, integer *x, integer *y, integer *width, integer *height, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(scilabgcgetGif)(char *str, integer *verbose, integer *x1, integer *x2, integer *x3, integer *x4, integer *x5, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(initgraphicGif)(char *string, integer *v2, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(initgraphicfromscreenGif)(char *,integer *,integer *,integer *,integer *,integer *,integer *,double *,double *,double *,double *); 
- extern void  C2F(drawpolylineGif)(char *str, integer *n, integer *vx, integer *vy, integer *closeflag, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(fillpolylinesGif)(char *str, integer *vectsx, integer *vectsy, integer *fillvect, integer *n, integer *p, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(drawpolylinesGif)(char *str, integer *vectsx, integer *vectsy, integer *drawvect, integer *n, integer *p, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(drawpolymarkGif)(char *str, integer *n, integer *vx, integer *vy, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(getFontMaxSizeGif)(char *str, integer *sizeMin, integer *sizeMax, integer *v1, integer *v2, integer *v3, integer *v4, double *dx1, double *dx2, double *dx3, double *dx4) ;
- extern void  C2F(displaynumbersGif)(char *str, integer *x, integer *y, integer *v1, integer *v2, integer *n, integer *flag, double *z, double *alpha, double *dx3, double *dx4);
- extern void  C2F(drawrectangleGif)(char *str, integer *x, integer *y, integer *width, integer *height, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(drawrectanglesGif)(char *str, integer *vects, integer *fillvect, integer *n, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(drawsegmentsGif)(char *str, integer *vx, integer *vy, integer *n, integer *style, integer *iflag, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(xselgraphicGif)(char *v1, integer *v2, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(scilabgcsetGif)(char *str, integer *x1, integer *x2, integer *x3, integer *x4, integer *x5, integer *x6, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(SetDriverGif)();
- extern void  C2F(displaystringGif)(char *string, integer *x, integer *y, integer *v1, integer *flag, integer *v6, integer *v7, double *angle, double *dv2, double *dv3, double *dv4);
- extern void  C2F(boundingboxGif)(char *string, integer *x, integer *y, integer *rect, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(drawarrowsGif)(char *str, integer *vx, integer *vy, integer *n, integer *as, integer *style, integer *iflag, double *dv1, double *dv2, double *dv3, double *dv4); 
- extern void  C2F(loadfamilyGif)(char *name, integer *j, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(queryfamilyGif)(char *name, integer *j, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
-
-void InitScilabGCGif(integer *v1, integer *v2, integer *v3, integer *v4) ;
-
-void C2F(setthicknessGif)(integer *value, integer *v2, integer *v3, integer *v4) ;
-void C2F(setalufunctionGif)(char *string) ;
-void C2F(unsetclipGif)(integer *v1, integer *v2, integer *v3, integer *v4) ;
-void C2F(setpatternGif)(integer *num, integer *v2, integer *v3, integer *v4) ;
-void C2F(setdashGif)(integer *value, integer *v2, integer *v3, integer *v4) ;
-void C2F(sethidden3dGif)(integer *num, integer *v2, integer *v3, integer *v4) ;
-void C2F(usecolorGif)(integer *num, integer *v2, integer *v3, integer *v4) ;
-
-#endif /* __PERIGIF_H__ */
-
-
diff --git a/scilab/modules/graphics/includes/periMac.h b/scilab/modules/graphics/includes/periMac.h
deleted file mode 100644 (file)
index e29caf0..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*------------------------------------------------------------------------
-    Graphic library for 2D and 3D plotting 
-    Copyright (C) 1998 Chancelier Jean-Philippe
-    jpc@cergrene.enpc.fr 
- --------------------------------------------------------------------------*/
-
-/*-------------BEGIN--------------------------------------------------------
----------------------------------------------------------------------------*/
-#ifndef __PERIMAC_H__
-#define __PERIMAC_H__
-
- extern int C2F(drawarc)();
- extern int C2F(fillarcs)();
- extern int C2F(drawarcs)();
- extern int C2F(fillpolyline)();
- extern int C2F(drawaxis)();
- extern int C2F(cleararea)();
- extern int C2F(clearwindow)();
- extern int C2F(xclick)();
- extern int C2F(xgetmouse)();
- extern int C2F(xend)();
- extern int C2F(fillarc)();
- extern int C2F(viderbuff)();
- extern int C2F(fillrectangle)();
- extern int C2F(MissileGCget)();
- extern int C2F(initgraphic)();
- extern int C2F(drawpolyline)();
- extern int C2F(fillpolylines)();
- extern int C2F(drawpolylines)();
- extern int C2F(drawpolymark)();
- extern int C2F(displaynumbers)();
- extern int C2F(drawrectangle)();
- extern int C2F(drawrectangles)();
- extern int C2F(drawsegments)();
- extern int C2F(xselgraphic)();
- extern int C2F(MissileGCset)();
- extern int C2F(SetDriver)();
- extern int C2F(displaystring)();
- extern int C2F(boundingbox)();
- extern int C2F(drawarrows)();
- extern int C2F(loadfamily)();
- extern int C2F(xinfo)();
-/*---------------------END------------------------------*/
-
-#endif /*__PERIMAC_H__*/
diff --git a/scilab/modules/graphics/includes/periPos.h b/scilab/modules/graphics/includes/periPos.h
deleted file mode 100644 (file)
index f0c36da..0000000
+++ /dev/null
@@ -1,136 +0,0 @@
-/*------------------------------------------------------------------------
- *    Graphic library
- *    Copyright (C) 1998-2000 Enpc/Jean-Philippe Chancelier
- *    jpc@cereve.enpc.fr
- *    Copyrigth INRIA 2006
- *    Jean-Baptiste Silvy
- --------------------------------------------------------------------------*/
-#ifndef __PERIPOS_H__
-#define __PERIPOS_H__
-
-#include "bcg.h"
-
- extern void  C2F(drawarcPos)(char *str, integer *x, integer *y, integer *width, integer *height, integer *angle1, integer *angle2, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(fillarcsPos)(char *str, integer *vects, integer *fillvect, integer *n, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(drawarcsPos)(char *str, integer *vects, integer *style, integer *n, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(fillpolylinePos)(char *str, integer *n, integer *vx, integer *vy, integer *closeareaflag, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(drawaxisPos)(char *str, integer *alpha, integer *nsteps, integer *v2, integer *initpoint, integer *v6, integer *v7, double *size, double *dx2, double *dx3, double *dx4);
- extern void  C2F(clearareaPos)(char *str, integer *x, integer *y, integer *w, integer *h, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(clearwindowPos)(char *v1, integer *v2, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(xclickPos)(char *str, integer *ibutton, integer *xx1, integer *yy1, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(xclick_anyPos)(char *str, integer *ibutton, integer *xx1, integer *yy1, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(xgetmousePos)(char *str, integer *ibutton, integer *xx1, integer *yy1, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(xendPos)(char *v1, integer *v2, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(fillarcPos)(char *str, integer *x, integer *y, integer *width, integer *height, integer *angle1, integer *angle2, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(fillrectanglePos)(char *str, integer *x, integer *y, integer *width, integer *height, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(scilabgcgetPos)(char *str, integer *verbose, integer *x1, integer *x2, integer *x3, integer *x4, integer *x5, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(initgraphicPos)(char *string, integer *v2, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(initgraphicfromscreenPos)(char *,integer *,integer *,integer *,integer *,integer *,integer *,double *,double *,double *,double *); 
- extern void  C2F(drawpolylinePos)(char *str, integer *n, integer *vx, integer *vy, integer *closeflag, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(fillpolylinesPos)(char *str, integer *vectsx, integer *vectsy, integer *fillvect, integer *n, integer *p, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(drawpolylinesPos)(char *str, integer *vectsx, integer *vectsy, integer *drawvect, integer *n, integer *p, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(drawpolymarkPos)(char *str, integer *n, integer *vx, integer *vy, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(getFontMaxSizePos)(char *str, integer *sizeMin, integer *sizeMax, integer *v1, integer *v2, integer *v3, integer *v4, double *dx1, double *dx2, double *dx3, double *dx4) ;
- extern void  C2F(displaynumbersPos)(char *str, integer *x, integer *y, integer *v1, integer *v2, integer *n, integer *flag, double *z, double *alpha, double *dx3, double *dx4);
- extern void  C2F(drawrectanglePos)(char *str, integer *x, integer *y, integer *width, integer *height, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(drawrectanglesPos)(char *str, integer *vects, integer *fillvect, integer *n, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(drawsegmentsPos)(char *str, integer *vx, integer *vy, integer *n, integer *style, integer *iflag, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(xselgraphicPos)(char *v1, integer *v2, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(scilabgcsetPos)(char *str, integer *x1, integer *x2, integer *x3, integer *x4, integer *x5, integer *x6, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(SetDriverPos)();
- extern void  C2F(displaystringPos)(char *string, integer *x, integer *y, integer *v1, integer *flag, integer *v6, integer *v7, double *angle, double *dv2, double *dv3, double *dv4);
- extern void  C2F(boundingboxPos)(char *string, integer *x, integer *y, integer *rect, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(drawarrowsPos)(char *str, integer *vx, integer *vy, integer *n, integer *as, integer *style, integer *iflag, double *dv1, double *dv2, double *dv3, double *dv4); 
- extern void  C2F(loadfamilyPos)(char *name, integer *j, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void  C2F(queryfamilyPos)(char *name, integer *j, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
-/*----------------------------------END---------------------------*/
-
-
-void C2F(set_dash_or_color_Pos)(integer *value, integer *v2, integer *v3, integer *v4);
-
-void C2F(set_dash_and_color_Pos)(integer *value, integer *v2, integer *v3, integer *v4);
-
-void C2F(set_line_style_Pos)(integer *value, integer *v2, integer *v3, integer *v4);
-
-void C2F(get_dash_or_color_Pos)(integer *verbose, integer *value, integer *narg, double *dummy);
-
-void C2F(get_dash_and_color_Pos)(integer *verbose, integer *value, integer *narg, double *dummy);
-
-void C2F(setgccolormapPos)( struct BCG * Xgc,integer m, double *a, integer *v3);
-
-void C2F(getcolormapsizePos)(integer *v1, integer *v2, integer *v3, double *val);
-
-void C2F(getcolormapPos)(integer *v1, integer *v2, integer *v3, double *val);
-
-void C2F(setwwhowPos)(integer *verbose, integer *v2, integer *v3, integer *v4);
-
-void InitScilabGCPos(integer *v1, integer *v2, integer *v3, integer *v4) ;
-
-void setposfig( integer * i, integer * j ) ;
-
-void C2F(xendgraphicPos)(void) ;
-
-void C2F(getwindowposPos)(integer *verbose, integer *x, integer *narg, double *dummy) ;
-
-void C2F(setwindowposPos)(integer *x, integer *y, integer *v3, integer *v4) ;
-
-void C2F(getwindowdimPos)(integer *verbose, integer *x, integer *narg, double *dummy) ;
-
-void C2F(setwindowdimPos)(integer *x, integer *y, integer *v3, integer *v4) ;
-
-void C2F(setcurwinPos)(integer *intnum, integer *v2, integer *v3, integer *v4) ;
-
-void C2F(getcurwinPos)(integer *verbose, integer *intnum, integer *narg, double *dummy) ;
-
-void C2F(setclipPos)(integer *x, integer *y, integer *w, integer *h) ;
-
-void C2F(unsetclipPos)(integer *v1, integer *v2, integer *v3, integer *v4) ;
-
-void C2F(getclipPos)(integer *verbose, integer *x, integer *narg, double *dummy) ;
-
-void C2F(setabsourelPos)(integer *num, integer *v2, integer *v3, integer *v4) ;
-
-void C2F(getabsourelPos)(integer *verbose, integer *num, integer *narg, double *dummy) ;
-
-void C2F(setalufunctionPos)(char *string) ;
-
-void C2F(setalufunction1Pos)(integer *num, integer *v2, integer *v3, integer *v4) ;
-
-void C2F(getalufunctionPos)(integer *verbose, integer *value, integer *narg, double *dummy) ;
-
-void C2F(setthicknessPos)(integer *value, integer *v2, integer *v3, integer *v4) ;
-
-void C2F(getthicknessPos)(integer *verbose, integer *value, integer *narg, double *dummy) ;
-
-void C2F(setpatternPos)(integer *num, integer *v2, integer *v3, integer *v4) ;
-
-void C2F(getpatternPos)(integer *verbose, integer *num, integer *narg, double *dummy) ;
-
-void C2F(getlastPos)(integer *verbose, integer *num, integer *narg, double *dummy) ;
-
-void C2F(setdashPos)(integer *value, integer *v2, integer *v3, integer *v4) ;
-
-void C2F(usecolorPos)(integer *num, integer *v2, integer *v3, integer *v4) ;
-
-void C2F(getusecolorPos)(integer *verbose, integer *num, integer *narg, double *dummy) ;
-
-void C2F(setcolormapPos)(integer *v1, integer *v2, integer *v3, integer *v4, integer *v5, integer *v6, double *a) ;
-
-void ColorInit(void) ;
-
-void C2F(getbackgroundPos)(integer *verbose, integer *num, integer *narg, double *dummy) ;
-
-void C2F(getforegroundPos)(integer *verbose, integer *num, integer *narg, double *dummy) ;
-
-void C2F(sethidden3dPos)(integer *num, integer *v2, integer *v3, integer *v4) ;
-
-void C2F(gethidden3dPos)(integer *verbose, integer *num, integer *narg, double *dummy) ;
-
-void C2F(semptyPos)(integer *v1, integer *v2, integer *v3, integer *v4) ;
-
-void C2F(gemptyPos)(integer *verbose, integer *v2, integer *v3, double *dummy) ;
-
-void C2F(drawlinePos)(integer *xx1, integer *yy1, integer *x2, integer *y2) ;
-
-#endif /*__PERIPOS_H__*/
-
diff --git a/scilab/modules/graphics/includes/periScreen.h b/scilab/modules/graphics/includes/periScreen.h
deleted file mode 100644 (file)
index c288461..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*------------------------------------------------------------------------*/
-/* file: periScreen.h                                                     */
-/* Copyright INRIA 2006                                                   */
-/* Authors : Jean-Baptiste Silvy                                          */
-/* desc : include file for periX11 or periWin files                       */
-/*------------------------------------------------------------------------*/
-
-#ifndef _PERI_SCREEN_H_
-#define _PERI_SCREEN_H_
-
-#include "machine.h"
-
-#ifdef _MSC_VER
-#include "periWin.h"
-#else
-#include "periX11.h"
-#endif
-
-#endif /* _PERI_SCREEN_H_ */
diff --git a/scilab/modules/graphics/includes/periWin.h b/scilab/modules/graphics/includes/periWin.h
deleted file mode 100644 (file)
index 26a1dd4..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-/*------------------------------------------------------------------------
- *    Graphic library
- *    Copyright (C) 1998-2000 Enpc/Jean-Philippe Chancelier
- *    jpc@cereve.enpc.fr 
- --------------------------------------------------------------------------*/
-
-#ifndef __PERIWIN_H__
-#define __PERIWIN_H__
-
-
- extern void C2F(drawarc)();
- extern void C2F(fillarcs)();
- extern void C2F(drawarcs)();
- extern void C2F(fillpolyline)();
- extern void C2F(drawaxis)();
- extern void C2F(cleararea)();
- extern void C2F(clearwindow)();
- extern void C2F(xclick)();
- extern void C2F(xclick_any)();
- extern void C2F(xgetmouse)();
- extern void C2F(xend)();
- extern void C2F(fillarc)();
- extern void C2F(viderbuff)();
- extern void C2F(fillrectangle)();
- extern void C2F(MissileGCget)();
- extern void C2F(initgraphic)();
- extern void C2F(drawpolyline)();
- extern void C2F(drawClippedPolyline)();
- extern void C2F(fillpolylines)();
-  extern void C2F(drawpolymark)();
- extern void C2F(setpopupname)();
- extern void C2F(getFontMaxSize)();
-  extern void C2F(drawrectangle)();
- extern void C2F(drawrectangles)();
- extern void C2F(drawsegments)();
- extern void C2F(xselgraphic)();
- extern void C2F(MissileGCset)();
- extern void C2F(SetDriver)(char *x0, integer *v2,integer * v3,integer * v4, integer *v5,integer * v6, integer * v7,double * dv1,double * dv2,double * dv3,double * dv4);
- extern void C2F(displaystring)();
- extern void C2F(boundingbox)();
- extern void C2F(drawarrows)();
- extern void C2F(loadfamily)();
- extern void  C2F(queryfamily)();
- extern void C2F(xinfo)();
-extern void C2F(drawpolylines)();
-extern void C2F(displaynumbers)();
-/** set and get the number of the background or foreground */
-void C2F(setforeground)( integer * num, integer * v2, integer * v3, integer * v4) ;
-void C2F(setbackground)( integer * num, integer * v2, integer * v3, integer * v4) ;
-void C2F(xsetfont)( integer * fontid, integer * fontsize, integer * v3, integer * v4 ) ;
-void C2F(xgetfont)( integer * verbose, integer * font, integer * nargs, double * dummy) ;
-void C2F(xsetmark)( integer * number, integer * size, integer * v3, integer * v4) ;
-void C2F(xgetmark)( integer * verbose,  integer *symb, integer * narg, double * dummy) ;
-
- extern void C2F(getwins)( integer * Num, integer Ids[] , integer * flag) ;
-
- extern void getcolordef( integer * screenc ) ;
- extern void setcolordef( integer   screenc ) ;
-
-extern int SwitchWindow( integer * intnum ) ;
-
- void C2F(getwins)( integer * Num, integer Ids[] , integer * flag) ;
-
- void wininfo(char *fmt,...) ;
-
-void deletePoints( void ) ;
-
-/*-------------------------------------------------------------------------------*/
-int   MaybeSetWinhdc( void ) ;
-void  ReleaseWinHdc( void ) ;
-
-#ifdef _MSC_VER
-static int flag_DO; /* F.Leray 16.02.04 flag global pour la fonction recursive DrawObj*/
-#endif
-/*-------------------------------------------------------------------------------*/
-
-void set_clip_box( integer xxleft ,
-                   integer xxright,
-                   integer yybot  ,
-                   integer yytop  ) ;
-
-void clip_line( integer   x1  ,
-                integer   yy1 ,
-                integer   x2  ,
-                integer   y2  ,
-                integer * x1n ,
-                integer * yy1n,
-                integer * x2n ,
-                integer * y2n ,
-                integer * flag ) ;
-
-
-int CheckColormap( int * m ) ;
-
-void get_r( int i, float * r ) ;
-void get_g( int i, float * g ) ;
-void get_b( int i, float * b ) ;
-
-
-void C2F(getwindowdim)( integer * verbose, integer * x, integer * narg, double * dummy ) ;
-
-int C2F(sedeco)( int * flag ) ;
-
-int C2F(store_points)( integer n, integer * vx, integer * vy, integer onemore) ;
-int C2F(AllocVectorStorage)( void ) ;
-
-/*--------------------------------------------------------------------------------------------*/
-
-void SetWinhdc( void ) ;
-
-void SciMouseCapture( void ) ;
-void SciMouseRelease( void ) ;
-
-void DeleteSGWin( integer intnum ) ;
-
-void CPixmapResize1( void ) ;
-
-void SciG_Font_Printer(int scale) ;
-
-/**
- * Utilise le ScilabXgc courant pour reinitialiser le gc XWindow
- * cela est utilis'e quand on change de fenetre graphique
- */
-
-void ResetScilabXgc( void ) ;
-void SciG_Font(void)  ;
-void wininfo(char *fmt,...) ;
-
-void C2F(DispStringAngle)( integer * x0, integer * yy0, char * string, double * angle) ;
-
-void CPixmapResize1( void ) ;
-
-/*--------------------------------------------------------------------------------------------*/
-
-
-#endif /* __PERIWIN_H__ */
-
-
diff --git a/scilab/modules/graphics/includes/periX11.h b/scilab/modules/graphics/includes/periX11.h
deleted file mode 100644 (file)
index d44be03..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-/*-------------BEGIN--------------------------------------------------------
----------------------------------------------------------------------------*/
-#ifndef __PERIX11_H__
-#define __PERIX11_H__
-#include "bcg.h"
-
- extern void XDroutine( int npts ) ;
-
- extern void C2F(drawarc)(char *str, integer *x, integer *y, integer *width, integer *height, integer *angle1, integer *angle2, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void C2F(fillarcs)(char *str, integer *vects, integer *fillvect, integer *n, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void C2F(drawarcs)(char *str, integer *vects, integer *style, integer *n, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void C2F(fillpolyline)(char *str, integer *n, integer *vx, integer *vy, integer *closeflag, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void C2F(drawaxis)(char *str, integer *alpha, integer *nsteps, integer *v2, integer *initpoint, integer *v6, integer *v7, double *size, double *dx2, double *dx3, double *dx4);
- extern void C2F(cleararea)(char *str, integer *x, integer *y, integer *w, integer *h, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void C2F(clearwindow)(char *v1, integer *v2, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void C2F(xclick)(char *str, integer *ibutton, integer *x1, integer *yy1, integer *iflag, integer *istr, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void C2F(xclick_any)(char *str, integer *ibutton, integer *x1, integer *yy1, integer *iwin, integer *iflag, integer *istr, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void C2F(xgetmouse)(char *str, integer *ibutton, integer *x1, integer *yy1, integer *iflag, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void C2F(xend)(char *v1, integer *v2, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void C2F(fillarc)(char *str, integer *x, integer *y, integer *width, integer *height, integer *angle1, integer *angle2, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void C2F(viderbuff)();
- extern void C2F(fillrectangle)(char *str, integer *x, integer *y, integer *width, integer *height, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void C2F(MissileGCget)(char *str, integer *verbose, integer *x1, integer *x2, integer *x3, integer *x4, integer *x5, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void C2F(initgraphic)(char *string, integer *v2, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void C2F(drawpolyline)(char *str, integer *n, integer *vx, integer *vy, integer *closeflag, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void C2F(drawClippedPolyline)(char *str, integer *n, integer *vx, integer *vy, integer *closeflag, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4) ;
- extern void C2F(fillpolylines)(char *str, integer *vectsx, integer *vectsy, integer *fillvect, integer *n, integer *p, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void C2F(drawpolylines)(char *str, integer *vectsx, integer *vectsy, integer *drawvect, integer *n, integer *p, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void C2F(drawpolymark)(char *str, integer *n, integer *vx, integer *vy, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void C2F(getFontMaxSize)(char *str, integer *sizeMin, integer *sizeMax, integer *v1, integer *v2, integer *v3, integer *v4, double *dx1, double *dx2, double *dx3, double *dx4) ;
- extern void C2F(displaynumbers)(char *str, integer *x, integer *y, integer *v1, integer *v2, integer *n, integer *flag, double *z, double *alpha, double *dx3, double *dx4);
- extern void C2F(drawrectangle)(char *str, integer *x, integer *y, integer *width, integer *height, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void C2F(drawrectangles)(char *str, integer *vects, integer *fillvect, integer *n, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void C2F(drawsegments)(char *str, integer *vx, integer *vy, integer *n, integer *style, integer *iflag, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void C2F(xselgraphic)(char *v1, integer *v2, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void C2F(MissileGCset)(char *str, integer *x1, integer *x2, integer *x3, integer *x4, integer *x5, integer *x6, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void C2F(SetDriver)(char *x0, integer *v2,integer * v3,integer * v4, integer *v5,integer * v6, integer * v7,double * dv1,double * dv2,double * dv3,double * dv4);
- extern void C2F(displaystring)(char *string, integer *x, integer *y, integer *v1, integer *flag, integer *v6, integer *v7, double *angle, double *dv2, double *dv3, double *dv4);
- extern void C2F(boundingbox)(char *string, integer *x, integer *y, integer *rect, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void C2F(drawarrows)(char *str, integer *vx, integer *vy, integer *n, integer *as, integer *style, integer *iflag, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void C2F(loadfamily)(char *name, integer *j, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void C2F(queryfamily)(char *name, integer *j, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void C2F(xinfo)(char *message, integer *v2, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4);
- extern void C2F(setpopupname)(char *x0, integer *v2, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4, integer lx0); 
-
-void deletePoints( void ) ;
-
-void set_clip_box( integer xxleft ,
-                  integer xxright,
-                  integer yybot  ,
-                  integer yytop  ) ;
-
-void clip_line( integer   x1  ,
-               integer   yy1 ,
-               integer   x2  ,
-               integer   y2  ,
-               integer * x1n ,
-               integer * yy1n,
-               integer * x2n ,
-               integer * y2n ,
-               integer * flag ) ;
-
-int CheckColormap( int * m ) ;
-
-
-void getcolordef( integer * screenc ) ;
-void setcolordef( int screenc ) ;
-
-void get_r( int i, float * r ) ;
-void get_g( int i, float * g ) ;
-void get_b( int i, float * b ) ;
-
-void C2F(getwindowdim)( integer * verbose, integer * x, integer * narg, double * dummy ) ;
-
-int C2F(sedeco)( int * flag ) ;
-
-void CPixmapResize1(void) ;
-
-void CPixmapResize(int x, int y) ;
-
-void SwitchWindow(integer *intnum) ;
-
-int C2F(store_points)(integer n, integer *vx, integer *vy, integer onemore) ;
-
-void C2F(xendgraphic)(void) ;
-
-void SciClick(integer *ibutton, integer *x1, integer *yy1, integer *iflag, int getmouse, int getrelease, int dyn_men, char *str, integer *lstr) ;
-
-void set_c(integer col) ;
-
-int get_pixel(int i) ;
-
-void C2F(drawline)(integer *x1, integer *yy1, integer *x2, integer *y2) ;
-
-void fill_grid_rectangles(integer *x, integer *y, double *z, integer n1, integer n2) ;
-
-void fill_grid_rectangles1(integer *x, integer *y, double *z, integer n1, integer n2) ;
-
-void DeleteWindowToList(integer num) ;
-
-void DeleteSGWin(integer intnum) ;
-
-void wininfo(char *format,...) ;
-
-void C2F(bitmap)(char *string, integer w, integer h) ;
-
-int C2F(CurSymbXOffset)(void) ;
-
-int C2F(CurSymbYOffset)(void) ;
-
-integer first_in(integer n, integer ideb, integer *vx, integer *vy) ;
-
-integer first_out(integer n, integer ideb, integer *vx, integer *vy) ;
-
-/*---------------------END------------------------------*/
-#endif /* __PERIX11_H__ */
-
-
diff --git a/scilab/modules/graphics/includes/sci_xsnative.h b/scilab/modules/graphics/includes/sci_xsnative.h
deleted file mode 100644 (file)
index 7c83625..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*------------------------------------------------------------------------*/
-/* file: sci_xsnative.h                                                   */
-/* Copyright INRIA 2006                                                   */
-/* Authors : Allan Cornet, Jean-Baptiste Silvy                            */
-/* desc : interface for clc routine                                       */
-/*------------------------------------------------------------------------*/
-
-#ifndef _INT_XSNATIVE_H_
-#define _INT_XSNATIVE_H_
-
-/**
-* interface function for the xsnative routine.
-*
-* @param[in] fname     name of the routine (ie xsnative)
-* @param[in] fname_len length of fname
-* @return 0 if success, -1 otherwise
-*/
-int sci_xsnative( char * fname, unsigned long fname_len ) ;
-
-#endif /* _INT_XSNATIVE_H_ */
diff --git a/scilab/modules/graphics/includes/scigraphic.h b/scilab/modules/graphics/includes/scigraphic.h
deleted file mode 100644 (file)
index 200b0eb..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-
-#include "bcg.h"
-
-/**
- * Sets the dimension of the scroll bars
- * @attention Do not call SetScrollInfo windows function,
- * sciSetScrollInfo do that and more things !
- * @param[in] Scilabgc
- * @param[in] sb_ctl
- * @param[in] si
- * @param[in] bRedraw
- *@author Matthieu PHILIPPE 
- *@date Dec 1999
- **/
-int sciSetScrollInfo(struct BCG *Scilabgc, int sb_ctl, SCROLLINFO *si, BOOLEAN bRedraw);
-
-/**
- * Returns the dimension of the scroll bars
- * @attention Do not call GetScrollInfo windows function,
- * sciGetScrollInfo do that and more things !
- * @param[in] Scilabgc
- * @param[in] sb_ctl
- * @param[in] si
- *@author Matthieu PHILIPPE 
- *@date Dec 1999
- **/
-int sciGetScrollInfo(struct BCG *Scilabgc, int sb_ctl, SCROLLINFO *si);
-
-/**
- * Returns the wresize status.
- * 0: it's in scroll bars mode
- * 1: it's in wresize mode
- *@author Matthieu PHILIPPE 
- *@date Dec 1999
- **/
-integer sciGetwresize();
-
-/**
- * Returns the pixmap status.
- * 0: it's drawn directly on screen
- * 1: it's drawn by a pixmap first
- *@author Matthieu PHILIPPE 
- *@date Dec 1999
- **/
-integer sciGetPixmapStatus();
-
-/**
- * used to move the panner and the viewport interactively 
- * through scilab command.
- * @param[in] struct BCG *ScilabGC : structure associated to a Scilab Graphic window
- * @param[in] int x,y : the x,y point of the graphic window to be moved at the up-left position of the viewport
- **/
-void SciViewportMove __PARAMS((struct BCG *ScilabXgc,int x,int y));
-
-/**
- * A little beat different to windowdim. GPopupResize sets the visible window (parents dimension)
- * @param[in] struct BCG *ScilabXgc
- * @param[in] int * x,y , where x,y are the new dimension
- * @see setwindowdim
- **/
-void GPopupResize __PARAMS((struct BCG *ScilabXgc,int *x,int *y));
-
index 691c547..780c1b6 100644 (file)
@@ -73,7 +73,6 @@ static gw_generic_table Tab[]={
        {sci_xs2bmp,"xs2bmp"},
        {sci_xs2emf,"xs2emf"},
        {sci_set_posfig_dim,"set_posfig_dim"},
-       {sci_xsnative,"xsnative"},
        {sci_zoom_rect,"zoom_rect"},
        {sci_unzoom,"unzoom"},
        {sci_StringBox,"StringBox"},
index 0883776..def36d2 100644 (file)
@@ -62,7 +62,6 @@ int sci_StringBox( char * fname, unsigned long fname_len )
   }
 
   /* create a window if needed to initialize the X11 graphic context  */
-  SciWin() ;
 
   /* get the string box */
   getTextBoundingBox( pText, NULL, corners ) ;
index 56e220a..614d002 100644 (file)
@@ -39,7 +39,6 @@ int sci_UImenu( char *fname,unsigned long fname_len )
     {
       if ( (VarType(1) == sci_strings) && (VarType(2) == sci_strings) )
        {
-         SciWin();
          pParent= (sciPointObj *) sciGetCurrentFigure(); 
                        
 
index af8f7d2..4831897 100644 (file)
@@ -24,7 +24,6 @@ int sci_addcb(char *fname,unsigned long fname_len)
   CheckLhs(0,1);
 
   /*  set or create a graphic window*/
-  SciWin();
   switch(VarType(1)) 
   {
   case 1: /* first is a scalar argument so it's a legend(hdl,"str1",...)*/
index 93da022..9c66d8d 100644 (file)
@@ -86,7 +86,6 @@ int sci_champ_G(char *fname,int (*func) (),unsigned long fname_len)
   GetRect(fname,6,opts,&rect);
   GetStrf(fname,7,opts,&strf);
 
-  SciWin();
   SciGerase() ;
 
   if ( isDefStrf( strf ) )
index 2f1208e..833b2af 100644 (file)
@@ -28,7 +28,6 @@ int sci_copy(char *fname,unsigned long fname_len)
   CheckLhs(0,1);
 
   /*  set or create a graphic window*/
-  SciWin();
   lw = 1 + Top - Rhs;
   GetRhsVar(1,GRAPHICAL_HANDLE_DATATYPE,&m1,&n1,&l1); /* Gets the Handle passed as argument*/
   if (m1!=1||n1!=1) {
index 789358d..da6cc0b 100644 (file)
@@ -13,7 +13,6 @@
 #include "SetProperty.h"
 #include "GetProperty.h"
 #include "DrawObjects.h"
-#include "Xcall1.h"
 #include "Interaction.h"
 #include "CurrentObjectsManagement.h"
 #include "ObjectSelection.h"
@@ -45,7 +44,6 @@ int sci_delete(char *fname,unsigned long fname_len)
     GetRhsVar(1,STRING_DATATYPE,&m2,&n2,&l2);
     if (strcmp(cstk(l2),"all") == 0)
     {
-      SciWin();
       sciXbasc();return 0;
     }
     else
index b69ea98..cc1fe60 100644 (file)
@@ -22,8 +22,6 @@ int sci_draw( char * fname, unsigned long fname_len )
   sciPointObj *pobj, *psubwin, *tmpsubwin;
   integer m,n,l,lw;
 
-
-  SciWin() ;
   CheckRhs(0,1) ;
   CheckLhs(0,1) ;
 
index c28b607..d19e05d 100644 (file)
@@ -44,8 +44,6 @@ int sci_drawaxis( char * fname, unsigned long fname_len )
 
   nopt = NumOpt();
 
-  SciWin();
-
   CheckRhs(minrhs,maxrhs+nopt) ;
   CheckLhs(minlhs,maxlhs) ;
 
index abce589..e13407f 100644 (file)
@@ -17,9 +17,7 @@
 int sci_drawlater( char * fname, unsigned long fname_len )
 {
   sciPointObj *pfigure = NULL;
-  /*   integer m,n,l,i; */
 
-  SciWin(); 
   CheckRhs(0,0);
   CheckLhs(0,1); 
 
index ce7848d..a6ce6d9 100644 (file)
@@ -23,7 +23,6 @@ int sci_drawnow(char *fname,unsigned long fname_len)
 
   startGraphicDataWriting();
 
-  SciWin(); 
   CheckRhs(0,0);
   CheckLhs(0,1); 
 
index 3044491..ae95bed 100644 (file)
@@ -9,25 +9,22 @@
 
 #include "sci_driver.h"
 #include "stack-c.h"
-#include "Xcall1.h"
+#include "returnProperty.h"
 
 /*-----------------------------------------------------------------------------------*/
 int sci_driver(char *fname,unsigned long fname_len)
 {
-  integer m1=3,n1=1,l1,v ;
-  double dv;
+  integer m1=3,n1=1,l1;
   CheckRhs(-1,1);
   CheckLhs(0,1);
   if (Rhs <= 0) 
   {
-    CreateVar(Rhs+1,STRING_DATATYPE,&m1,&n1,&l1);
-    C2F(dr1)("xgetdr", cstk(l1), &v, &v, &v, &v, &v, &v, &dv, &dv, &dv, &dv, 7L, m1);
-    LhsVar(1) = Rhs+1;
+    return sciReturnString("Rec");
   } 
   else 
   {
     GetRhsVar(1,STRING_DATATYPE,&m1,&n1,&l1);
-    C2F(dr1)("xsetdr", cstk(l1), &v, &v, &v, &v, &v, &v, &dv, &dv, &dv, &dv, 7L, m1);
+
     LhsVar(1)=0;
   }
   return 0;
index 359b2e2..c2236fb 100644 (file)
@@ -84,7 +84,6 @@ int sci_fec(char *fname,unsigned long fname_len)
   GetColOut(fname,11,opts,&colOut);
   GetWithMesh(fname,12,opts,&withMesh);
 
-  SciWin();
   SciGerase() ;
 
   if ( isDefStrf ( strf ) ) {
index b2e0278..089c3c9 100644 (file)
@@ -107,7 +107,7 @@ int sci_geom3d( char * fname, unsigned long fname_len )
   CheckSameDims(1,2,m1,n1,m2,n2);
   CheckSameDims(2,3,m2,n2,m3,n3);
   if (m1 * n1 == 0)  { LhsVar(1) = 0; return 0;}
-  SciWin();
+
   ix1 = m1 * n1;
   geom3d(stk(l1), stk(l2), stk(l3), &ix1);
   LhsVar(1)=1;
index a915f0a..5e7fdb3 100644 (file)
@@ -73,12 +73,6 @@ int sci_get(char *fname,unsigned long fname_len)
           &&  *hstk(l1) != sciGetHandle(pSUBWIN_FEATURE(getAxesModel())->mon_y_label) /* Addings here F.Leray 10.06.04 */
           &&  *hstk(l1) != sciGetHandle(pSUBWIN_FEATURE(getAxesModel())->mon_z_label))
        {
-         if ((strcmp(cstk(l2),"old_style") !=0)
-             &&(strcmp(cstk(l2),"default_figure") !=0) 
-              && (strcmp(cstk(l2),"default_axes") !=0) )
-          {
-            SciWin();
-          }
 
          hdl = (unsigned long)*hstk(l1); /* on recupere le pointeur d'objet par le handle */
           
@@ -100,7 +94,6 @@ int sci_get(char *fname,unsigned long fname_len)
          else
            {
               sciPointObj * ppobj;
-             SciWin();
 
               /* Test debug F.Leray 13.04.04 */
               if ((strcmp(cstk(l2),"children") != 0) &&  
index 28b90e3..c3dccf9 100644 (file)
@@ -27,7 +27,6 @@ int sci_glue( char * fname, unsigned long fname_len )
   CheckLhs(0,1);
 
   /*  set or create a graphic window */
-  SciWin();
   GetRhsVar(1,GRAPHICAL_HANDLE_DATATYPE,&numrow,&numcol,&l1); /* We get the scalar value if it is ones */
   n=numrow*numcol;
   CreateVar(Rhs+1,MATRIX_OF_DOUBLE_DATATYPE,&numrow,&numcol,&l2);
index 8f12acc..3b791ee 100644 (file)
@@ -64,7 +64,6 @@ int sci_grayplot( char *fname, unsigned long fname_len )
   GetRect(fname,5,opts,&rect);
   GetNax(6,opts,&nax,&flagNax);
 
-  SciWin();
   SciGerase() ;
 
   if ( isDefStrf( strf ) )
index 5d2fe1e..2a9fd26 100644 (file)
@@ -57,7 +57,6 @@ int sci_matplot(char *fname,unsigned long fname_len)
   GetRect(fname,3,opts,&rect);
   GetNax(4,opts,&nax,&flagNax);
 
-  SciWin();
   SciGerase() ;
 
   if ( isDefStrf( strf ) ) {
index 4979ee9..24ca056 100644 (file)
@@ -32,7 +32,6 @@ int sci_matplot1( char * fname, unsigned long fname_len )
     LhsVar(1) = 0 ;
     return 0 ;
   } 
-  SciWin();
 
   /* NG beg */
 
index 7f52a74..da9b906 100644 (file)
@@ -19,7 +19,6 @@ int sci_move( char * fname, unsigned long fname_len )
 
   CheckRhs(1,3);
   /*  set or create a graphic window */
-  SciWin();
   opt = FALSE;
   if (Rhs ==3) {
     GetRhsVar(3,STRING_DATATYPE,&m3,&n3,&l3);
index 0cd355a..e4b8acd 100644 (file)
@@ -23,8 +23,7 @@ int sci_newaxes( char * fname,unsigned long fname_len )
   CheckRhs(minrhs,maxrhs) ;
   CheckLhs(minlhs,maxlhs) ;
 
-  SciWin();
-  if ((masousfen = ConstructSubWin (sciGetCurrentFigure(), 0)) != NULL)
+  if ((masousfen = ConstructSubWin (sciGetCurrentFigure())) != NULL)
   {
     sciSetCurrentObj(masousfen);
     sciSetSelectedSubWin(masousfen);
index 81d586c..a85b118 100644 (file)
@@ -58,7 +58,6 @@ int sci_param3d( char * fname, unsigned long fname_len )
   CheckSameDims(1,2,m1,n1,m2,n2);
   CheckSameDims(2,3,m2,n2,m3,n3);
 
-  SciWin();
   GetOptionalDoubleArg(fname,4,"theta",&theta,1,opts);
   GetOptionalDoubleArg(fname,5,"alpha",&alpha,1,opts);
   GetLabels(fname,6,opts,&labels);
index 2bf12dd..7b29734 100644 (file)
@@ -104,7 +104,6 @@ int sci_param3d1( char *fname, unsigned long fname_len )
   GetOptionalDoubleArg(fname,8,"ebox",&ebox,6,opts);
 
   if (m1 == 1 && n1 > 1) { m1 = n1;    n1 = 1; }
-  SciWin();
   SciGerase() ;
   /* NG beg */
   isfac=-1;
index 04b24da..268e57a 100644 (file)
@@ -181,7 +181,6 @@ int sci_plot2d( char * fname, unsigned long fname_len )
   GetNax( 7+iskip, opts, &nax, &flagNax ) ;
   if (iskip==0) { GetLogflags( fname, 8, opts, &logFlags ) ; }
 
-  SciWin(); 
   SciGerase() ;
 
   if ( isDefStrf( strf ) )
index 996749f..7b00cb1 100644 (file)
@@ -210,7 +210,6 @@ int sci_plot2d1_G( char * fname, int ptype, unsigned long fname_len )
   GetNax(7+iskip,opts,&nax,&flagNax);
   if (iskip==0) GetLogflags(fname,8,opts,&logFlags);
 
-  SciWin();
   C2F(scigerase)();
 
   if ( isDefStrf( strf ) ) {
index 8fe3fa2..83153d9 100644 (file)
@@ -106,7 +106,6 @@ int sci_plot3d( char * fname, unsigned long fname_len )
       return 0;
     }
   }
-  SciWin();
   iflag_def[1]=8;
 
   GetOptionalDoubleArg(fname,4,"theta",&theta,1,opts);
@@ -137,7 +136,6 @@ int sci_plot3d( char * fname, unsigned long fname_len )
   }
 
   if (m1 * n1 == 0 || m2 * n2 == 0 || m3 * n3 == 0) { LhsVar(1)=0; return 0;} 
-  SciWin();
   SciGerase() ;
 
   /******************** 24/015/2002 ********************/
index 391fc12..255b988 100644 (file)
@@ -6,7 +6,6 @@
 /*------------------------------------------------------------------------*/
 /*-----------------------------------------------------------------------------------*/
 #include "sci_set.h"
-#include "bcg.h"
 #include "stack-c.h"
 #include "HandleManagement.h"
 #include "GetProperty.h"
@@ -15,7 +14,6 @@
 #include "BuildObjects.h"
 #include "gw_graphics.h"
 #include "DrawObjects.h"
-#include "Xcall1.h"
 #include "CurrentObjectsManagement.h"
 #include "GraphicSynchronizerInterface.h"
 
@@ -62,7 +60,7 @@ int sci_set(char *fname, unsigned long fname_len)
   }
   else /* others types */
   {
-         integer m1,n1,l1,m2,n2,l2,num,cur,na,verb=0;
+         integer m1,n1,l1,m2,n2,l2;
          integer numrow3 = 0 ;
          integer numcol3 = 0 ;
          integer l3 = 0 ;
@@ -131,17 +129,7 @@ int sci_set(char *fname, unsigned long fname_len)
                                        pobj = sciGetPointerFromHandle(hdl);
                                }
 
-                       GetRhsVar(2,STRING_DATATYPE,&m2,&n2,&l2); /* Gets the command name */  
-                       if ( *hstk(l1) != sciGetHandle(getFigureModel()) && *hstk(l1) != sciGetHandle(getAxesModel())
-                         &&  *hstk(l1) != sciGetHandle(pSUBWIN_FEATURE(getAxesModel())->mon_title)
-                         &&  *hstk(l1) != sciGetHandle(pSUBWIN_FEATURE(getAxesModel())->mon_x_label)
-                         &&  *hstk(l1) != sciGetHandle(pSUBWIN_FEATURE(getAxesModel())->mon_y_label) 
-                         &&  *hstk(l1) != sciGetHandle(pSUBWIN_FEATURE(getAxesModel())->mon_z_label))
-                       {
-                               if ((strcmp(cstk(l2),"old_style") !=0) 
-                                 &&(strcmp(cstk(l2),"default_figure") !=0) 
-                                 && (strcmp(cstk(l2),"default_axes") !=0) ) SciWin();
-                       }
+                       GetRhsVar(2,STRING_DATATYPE,&m2,&n2,&l2); /* Gets the command name */ 
 
                        valueType = VarType(3) ;
 
@@ -182,7 +170,6 @@ int sci_set(char *fname, unsigned long fname_len)
                                }
                                else
                                {
-                                       SciWin();
                                        if ((strcmp(cstk(l2),"zoom_") !=0) && 
                                          (strcmp(cstk(l2),"auto_") !=0) && 
                                          (strcmp(cstk(l2),"clip_box") !=0) )   
@@ -289,21 +276,13 @@ int sci_set(char *fname, unsigned long fname_len)
                                 && pobj != pSUBWIN_FEATURE(getAxesModel())->mon_z_label )
                         { 
                                 /* Addings F.Leray 10.06.04 */
-                                num= sciGetNumFigure (pobj);    
-                                C2F (dr) ("xget", "window",&verb,&cur,&na,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-                                C2F (dr) ("xset", "window",&num,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);  
-
-                                //sciDrawObj(sciGetParentFigure(pobj)); /* F.Leray we redraw here */
                                 sciDrawObj(pobj) ;
-
-                                C2F (dr) ("xset", "window",&cur,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
                         }
                 }
         }
         else if ( ( setStatus = sciSet( NULL, cstk(l2), &l3, valueType, &numrow3, &numcol3) ) < 0 )
         {
-               // endGraphicDataWriting();
-               // return 0;
+
         }
 
         endGraphicDataWriting();
index 2a0f9d7..4610be1 100644 (file)
@@ -6,17 +6,18 @@
 /*------------------------------------------------------------------------*/
 
 #include "sci_set_posfig_dim.h"
-#include "periPos.h"
+#include "stack-c.h"
+
 
 /*-----------------------------------------------------------------------------------*/
 int sci_set_posfig_dim( char * fname, unsigned long fname_len )
 {
-  integer m1,n1,l1,m2,n2,l2;
+  int m1,n1,l1,m2,n2,l2;
   CheckRhs(2,2);
   CheckLhs(1,1);
   GetRhsVar(1,MATRIX_OF_INTEGER_DATATYPE,&m1,&n1,&l1);
   GetRhsVar(2,MATRIX_OF_INTEGER_DATATYPE,&m2,&n2,&l2);
-  setposfig(istk(l1),istk(l2));
+  /* TODO */
   LhsVar(1)=0;
   return 0;
 }
index dbe4ed7..ca5b663 100644 (file)
@@ -8,7 +8,6 @@
 #include "sci_show_window.h"
 #include "getHandleProperty/getPropertyAssignedValue.h"
 #include "HandleManagement.h"
-#include "Xcall1.h"
 #include "stack-c.h"
 #include "sciprint.h"
 #include "SetProperty.h"
@@ -75,8 +74,6 @@ int sci_show_window( char *fname,unsigned long fname_len )
     sciSetUsedWindow( winNum ) ;
 
   }
-
-  C2F(dr)("xselect","v",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,8L,2L);
   
   /* if no window were opened (ie curFigure is NULL) then we created the first figure */
   /* and it is already the selected one */
index 59af7f8..cc2181a 100644 (file)
@@ -25,7 +25,6 @@ int sci_unglue(char *fname,unsigned long fname_len)
   CheckRhs(1,1);
   CheckLhs(0,1);
   /*  set or create a graphic window */
-  SciWin();
   GetRhsVar(1,GRAPHICAL_HANDLE_DATATYPE,&m1,&n1,&l1);
   hdl = (unsigned long)*hstk(l1);
   pobj = sciGetPointerFromHandle(hdl);
index 4f9762d..493a430 100644 (file)
@@ -16,8 +16,7 @@
 int sci_unzoom(char *fname,unsigned long fname_len)
 {
   CheckRhs(0,1) ;
-  CheckLhs(0,1) ;
-  SciWin() ;
+  CheckLhs(0,1) ;;
   if ( Rhs == 0 )
   {
     unzoom();
index 3034305..c865b95 100644 (file)
@@ -6,23 +6,28 @@
 /*------------------------------------------------------------------------*/
 
 #include "sci_winsid.h"
-#include "stack-c.h"
-#include "periScreen.h"
-#undef Top
+#include "MALLOC.h"
 #include "WindowList.h"
+#include "sciprint.h"
+#include "returnProperty.h"
 
 /*-----------------------------------------------------------------------------------*/
 int sci_winsid(char *fname,unsigned long fname_len)
 {
-  integer iflag =0,ids,num,un=1,l1;
+  int one = 1;
+  int * ids = NULL;
+  int nbFigure = sciGetNbFigure();
+  CheckRhs(-1,0);
 
-  CheckRhs(-1,0) ;
-  getWins(&num,&ids ,&iflag);
-  CreateVar(Rhs+1,MATRIX_OF_INTEGER_DATATYPE,&un,&num,&l1);
-  iflag = 1; 
-  getWins(&num,istk(l1),&iflag);
-  LhsVar(1)=Rhs+1;
+  ids = MALLOC(nbFigure * sizeof(int));
+  if (ids == NULL)
+  {
+    sciprint("Error in function winsid, unable to perform operations, memory full.\n");
+    return 0;
+  }
 
-  return 0;
+  sciGetFiguresId(ids);
+
+  return sciReturnRowVectorFromInt(ids, nbFigure);
 }
 /*-----------------------------------------------------------------------------------*/
index 3800935..a5203e5 100644 (file)
@@ -23,8 +23,6 @@ int sci_xarc(char *fname,unsigned long fname_len)
   sciPointObj * psubwin = NULL;
   sciPointObj * pFigure = NULL;
 
-  SciWin();
-
   startGraphicDataWriting();
   pFigure = sciGetCurrentFigure();
   psubwin = sciGetCurrentSubWin();
index 9fafe8c..1e829b1 100644 (file)
@@ -12,6 +12,7 @@
 #include "GetProperty.h"
 #include "sciCall.h"
 #include "CurrentObjectsManagement.h"
+#include "GraphicSynchronizerInterface.h"
 
 /*-----------------------------------------------------------------------------------*/
 int sci_xarcs(char *fname,unsigned long fname_len)
@@ -21,8 +22,8 @@ int sci_xarcs(char *fname,unsigned long fname_len)
   /* NG beg */
   long  hdl;
   int i,a1,a2;
+  sciPointObj * pFigure = NULL;
   /* NG end */
-  SciWin();
   CheckRhs(1,2);
 
   GetRhsVar(1,MATRIX_OF_DOUBLE_DATATYPE,&m1,&n1,&l1);
@@ -38,6 +39,10 @@ int sci_xarcs(char *fname,unsigned long fname_len)
     }
   }
 
+  startGraphicDataWriting();
+  pFigure = sciGetCurrentFigure();
+  endGraphicDataWriting();
+  startFigureDataWriting(pFigure);
   if (Rhs == 2) 
   {
     GetRhsVar(2,MATRIX_OF_INTEGER_DATATYPE,&m2,&n2,&l2);
@@ -53,7 +58,7 @@ int sci_xarcs(char *fname,unsigned long fname_len)
     m2=1,n2=n1; CreateVar(2,MATRIX_OF_INTEGER_DATATYPE,&m2,&n2,&l2);
     for (i2 = 0; i2 < n2; ++i2)
     { 
-      *istk(l2 + i2) =  sciGetForeground(sciGetCurrentSubWin() );
+      *istk(l2 + i2) = sciGetForeground(sciGetCurrentSubWin() );
     }
   }  
   /* NG beg */
@@ -65,7 +70,8 @@ int sci_xarcs(char *fname,unsigned long fname_len)
       stk(l1+(6*i)+2),stk(l1+(6*i)+3),istk(l2+i),NULL,FALSE,TRUE,&hdl); 
   }
   /** construct Compound and make it current object **/
-  sciSetCurrentObj (ConstructCompoundSeq (n1));
+  sciSetCurrentObj(ConstructCompoundSeq(n1));
+  endFigureDataWriting(pFigure);
   /* NG end */
   LhsVar(1)=0;
   return 0;
index f5df1e8..52cc917 100644 (file)
@@ -20,7 +20,6 @@ int sci_xarrows(char *fname,unsigned long fname_len)
   integer m4,n4,l4,mn2;
   double arsize=-1.0;
 
-  SciWin();
   CheckRhs(2,4);
 
   GetRhsVar(1,MATRIX_OF_DOUBLE_DATATYPE,&m1,&n1,&l1);
index 5de85e5..c2c1fb3 100644 (file)
@@ -6,17 +6,13 @@
 /*------------------------------------------------------------------------*/
 
 #include "sci_xaxis.h"
-#include "Xcall1.h"
 #include "BuildObjects.h"
 #include "gw_graphics.h"
 
 /*-----------------------------------------------------------------------------------*/
 int sci_xaxis(char *fname,unsigned long fname_len)
 {
-  integer v;
   integer m1,n1,l1,m2,n2,l2,m3,n3,l3,m4,n4,l4;
-  double dv;
-
   CheckRhs(2,4);
 
   GetRhsVar(1,MATRIX_OF_DOUBLE_DATATYPE,&m1,&n1,&l1); CheckScalar(1,m1,n1);
@@ -24,8 +20,7 @@ int sci_xaxis(char *fname,unsigned long fname_len)
   GetRhsVar(3,MATRIX_OF_DOUBLE_DATATYPE,&m3,&n3,&l3); CheckLength(1,m3*n3,3);
   GetRhsVar(4,MATRIX_OF_DOUBLE_DATATYPE,&m4,&n4,&l4); CheckLength(1,m4*n4,2);
 
-  SciWin();
-  C2F(dr1)("xaxis","v",&v,istk(l2),&v,&v,&v,&v,stk(l1),stk(l3),stk(l4),&dv,6L,2L);
+  /* TODO: transalte in new graphic */
   LhsVar(1)=0;
   return 0;
 }
index 220a0a8..29d2742 100644 (file)
@@ -25,7 +25,6 @@ int sci_xchange( char * fname, unsigned long fname_len )
   GetRhsVar(3,STRING_DATATYPE,&m3,&n3,&l3);
   CheckSameDims(1,2,m1,n1,m2,n2);
 
-  SciWin();
   if ( strcmp(cstk(l3),"i2f") == 0) 
   {
     GetRhsVar(1,MATRIX_OF_INTEGER_DATATYPE,&m1,&n1,&l1);
index 157ff2a..7041119 100644 (file)
@@ -7,7 +7,6 @@
 
 #include "sci_xclea.h"
 #include "stack-c.h"
-#include "Xcall1.h"
 #include "BuildObjects.h"
 #include "gw_graphics.h"
 
 int sci_xclea( char *fname,unsigned long fname_len )
 {
   integer m1,n1,l1,m2,n2,l2,m3,n3,l3,m4,n4,l4;
-  integer v;
 
-  SciWin();
+  /* TODO translate in new graphic mode */
+
   CheckRhs(1,4);
   switch ( Rhs ) 
   {
   case 1 :
     GetRhsVar(1,MATRIX_OF_DOUBLE_DATATYPE,&m1,&n1,&l1); 
     CheckLength(1,m1*n1,4);
-    C2F(dr1)(fname,"v",&v,&v,&v,&v,&v,&v,stk(l1),stk(l1+1),stk(l1+2),stk(l1+3),fname_len,2L);      
+    
     break;
   case 4 :
     GetRhsVar(1,MATRIX_OF_DOUBLE_DATATYPE,&m1,&n1,&l1); CheckScalar(1,m1,n1);
     GetRhsVar(2,MATRIX_OF_DOUBLE_DATATYPE,&m2,&n2,&l2); CheckScalar(2,m2,n2);
     GetRhsVar(3,MATRIX_OF_DOUBLE_DATATYPE,&m3,&n3,&l3); CheckScalar(3,m3,n3);
     GetRhsVar(4,MATRIX_OF_DOUBLE_DATATYPE,&m4,&n4,&l4); CheckScalar(4,m4,n4);
-    C2F(dr1)(fname,"v",&v,&v,&v,&v,&v,&v,stk(l1),stk(l2),stk(l3),stk(l4),fname_len,2L);
+    
     break;
   default :
     Scierror(999,"%s: wrong number of rhs argumens (%d), rhs must be 1 or 4\r\n",fname,Rhs);
index b02d5de..7a4ed4e 100644 (file)
@@ -8,42 +8,33 @@
 #include "sci_xclear.h"
 #include "BuildObjects.h"
 #include "gw_graphics.h"
-#include "Xcall1.h"
 #include "GetProperty.h"
 #include "DrawObjects.h"
+#include "WindowList.h"
 
 
 /*-----------------------------------------------------------------------------------*/
 int sci_xclear( char * fname, unsigned long fname_len )
 {
-  integer verb=0,wid,cur,win,na;
+  integer wid;
   integer ix,m1,n1,l1/*,v=0*/;
-  double dv;
 
   CheckRhs(0,2); /* NG  */ /*CheckRhs(-1,1) */ 
   CheckLhs(0,1);
-  SciWin();
   if (Rhs == 1) 
   {
     GetRhsVar(1,MATRIX_OF_DOUBLE_DATATYPE,&m1,&n1,&l1);
-    C2F(dr1)("xget","window",&verb,&cur,&na,PI0,PI0,PI0,&dv,&dv,&dv,&dv,5L,7L);
     for (ix = 0 ; ix < m1*n1 ; ++ix) 
     {
       wid = (integer) *stk(l1 +ix );
-      C2F(dr1)("xset","window",&wid,PI0,PI0,PI0,PI0,PI0,&dv,&dv,&dv,&dv,5L,7L);
-      C2F(dr1)("xclear","v",PI0,PI0,PI0,PI0,PI0,PI0,&dv,&dv,&dv,&dv,7L,2L);
+      sciClearFigure(getFigureFromIndex(wid));
     }
-    C2F(dr1)("xset","window",&cur,PI0,PI0,PI0,PI0,PI0,&dv,&dv,&dv,&dv,5L,7L);
   }
   else 
   {
-    C2F(dr1)("xget","window",&verb,&win,&na,PI0,PI0,PI0,&dv,&dv,&dv,&dv,5L,7L);
-    C2F(dr1)("xset","window",&win,PI0,PI0,PI0,PI0,PI0,&dv,&dv,&dv,&dv,5L,7L);
-    C2F(dr1)("xclear","v",PI0,PI0,PI0,PI0,PI0,PI0,&dv,&dv,&dv,&dv,7L,2L); 
+    sciXclear() ;
   } 
 
-  sciXclear();   /* NG */
-
   LhsVar(1)=0;
   return 0;
 }
index cab31ad..09f4391 100644 (file)
@@ -8,7 +8,6 @@
 #include <string.h>
 
 #include "sci_xclick.h"
-#include "Xcall1.h"
 #include "stack-c.h"
 #include "BuildObjects.h"
 #include "gw_graphics.h"
 /*-----------------------------------------------------------------------------------*/
 int sci_xclick(char *fname,unsigned long fname_len)
 {
-  int un=1,trois=3,rep,iw;
-  integer istr,ix,iflag,v;
-  double x,y,dv;
+  int un=1,trois=3,rep;
+  int iw = 0;
+  integer istr;
+  int ix = 0;
+  int iflag = 0;
+  double x = 0.0;
+  double y = 0.0;
 
   CheckRhs(-1,1) ;
   CheckLhs(1,5) ;
 
   iflag = ( Rhs >= 1) ? 1 :0;
 
-  SciWin();
 
   switch (Lhs) {
   case 4 : 
-    C2F(dr1)("xclickany","xv",&ix,&iw,&iflag,&v,&v,&v,&x,&y,&dv,&dv,10L,3L);
+    /* C2F(dr1)("xclickany","xv",&ix,&iw,&iflag,&v,&v,&v,&x,&y,&dv,&dv,10L,3L); */
     break;
   case 5 :
     istr = 1;
-    C2F(dr1)("xclickany",C2F(cha1).buf,&ix,&iw,&iflag,&v,&v,&istr,&x,&y,&dv,&dv,10L,bsiz);
+    /* C2F(dr1)("xclickany",C2F(cha1).buf,&ix,&iw,&iflag,&v,&v,&istr,&x,&y,&dv,&dv,10L,bsiz); */
     break;
   default :
     istr = 0;
-    C2F(dr1)("xclick","xv",&ix,&iflag,&istr,&v,&v,&v,&x,&y,&dv,&dv,7L,3L);
+    /* C2F(dr1)("xclick","xv",&ix,&iflag,&istr,&v,&v,&v,&x,&y,&dv,&dv,7L,3L); */
   }
 
   if ( ix < 0 ) {
-    x=y=-1; /*C2F(returnanan)(); */ /* to better manage string conversion of the output */ /* F.Leray 20.04.05 */
+    x=y=-1; /* to better manage string conversion of the output */ /* F.Leray 20.04.05 */
   }
 
   if ( Lhs == 1 )
index c453620..f527797 100644 (file)
@@ -7,26 +7,25 @@
 
 #include "sci_xdel.h"
 #include "stack-c.h"
-#include "Xcall1.h"
 #include "DestroyObjects.h"
+#include "GetProperty.h"
+#include "CurrentObjectsManagement.h"
 
 /*-----------------------------------------------------------------------------------*/
 int sci_xdel(char *fname,unsigned long fname_len)
 { 
-  integer verb=0,na,v,m1,n1,l1,win;
-  double dv;
+  integer m1,n1,l1;
   CheckRhs(-1,1);
   if (Rhs >= 1) {
     int i;
     GetRhsVar(1,MATRIX_OF_DOUBLE_DATATYPE,&m1,&n1,&l1); 
     for ( i=0; i < m1*n1 ; i++ ) 
     {
-      win = (integer) *stk(l1+i);
+      int win = (int) *stk(l1+i);
       sciDeleteWindow( win ) ;
     }
   } else {
-    C2F(dr)("xget","window",&verb,&win,&na,&v,&v,&v,&dv,&dv,&dv,&dv,5L,7L);
-    sciDeleteWindow( win ) ;
+    sciDeleteWindow( sciGetNum(sciGetCurrentFigure()) ) ;
   }
   LhsVar(1)=0;
   return 0;
index b858b3f..0ef08e8 100644 (file)
@@ -12,7 +12,6 @@
 #include "DestroyObjects.h"
 #include "stack-c.h"
 #include "ObjectStructure.h"
-#include "Xcall1.h"
 #include "GetProperty.h"
 #include "DrawObjects.h"
 #include "graphicSession.h"
 /*-----------------------------------------------------------------------------------*/
 int sci_xend(char *fname,unsigned long fname_len)
 {
-  integer v;
-  double dv;
   sciPointObj * figure = NULL;
-  struct BCG *Xgc;
 
-  SciWin();
 
   CheckRhs(-1,0);
 
   closeGraphicSession() ;   /* we DO draw now into the file/memory (depending on the driver type) */
   figure = sciGetCurrentFigure();
   sciDrawObj(figure);
-  C2F(dr1)("xend","v",&v,&v,&v,&v,&v,&v,&dv,&dv,&dv,&dv,5L,2L);
 
   /* figure already defined above */
-  Xgc = pFIGURE_FEATURE(figure)->pScilabXgc;
   DestroyAllGraphicsSons (figure);
-  DestroyFigure (figure); figure = (sciPointObj *) NULL;
-  Xgc->mafigure = (sciPointObj *) NULL;
+  DestroyFigure(figure);
 
   LhsVar(1)=0;
   return 0;
index 6433ece..a282694 100644 (file)
@@ -21,7 +21,6 @@ int sci_xfarcs( char * fname, unsigned long fname_len )
   long  hdl;
   int i,a1,a2;
 
-  SciWin();
   CheckRhs(1,2);
 
   GetRhsVar(1,MATRIX_OF_DOUBLE_DATATYPE,&m1,&n1,&l1);
index 636054e..78f3144 100644 (file)
@@ -24,7 +24,6 @@ int sci_xfpoly(char *fname,unsigned long fname_len)
   long hdl; /* NG */
   sciPointObj * psubwin = NULL ;
 
-  SciWin();
   CheckRhs(2,3);
 
   GetRhsVar(1,MATRIX_OF_DOUBLE_DATATYPE,&m1,&n1,&l1);
index b921b41..aa120e5 100644 (file)
@@ -27,7 +27,6 @@ int sci_xfpolys( char *fname, unsigned long fname_len )
   long hdl;
   sciPointObj * psubwin = NULL ;
 
-  SciWin();
 
   CheckRhs(2,3);
   GetRhsVar(1,MATRIX_OF_DOUBLE_DATATYPE,&m1,&n1,&l1);
index 8b81453..5ae70a2 100644 (file)
@@ -9,14 +9,18 @@
 #include "stack-c.h"
 #include "sci_demo.h"
 #include "XsetXgetParameters.h"
-#include "Xcall1.h"
 #include "GetProperty.h"
 #include "ObjectStructure.h"
 #include "BuildObjects.h"
 #include "gw_graphics.h"
 #include "CurrentObjectsManagement.h"
+#include "Format.h"
+#include "sciprint.h"
+#include "ObjectSelection.h"
 
 /*-----------------------------------------------------------------------------------*/
+int C2F(xgetg)( char * str, char * str1, integer * len,integer  lx0,integer lx1);
+/*-----------------------------------------------------------------------------------*/
 int sci_xget(char *fname,unsigned long fname_len)
 {
   integer flagx=0,x1[10],x2=0, m1,n1,l1,m2,n2,l2,l3,v = 0,i ;
@@ -24,7 +28,6 @@ int sci_xget(char *fname,unsigned long fname_len)
   int one = 1 ;
   BOOL keyFound = FALSE ;
 
-  SciWin();
   if ( Rhs <= 0 )
   {
     int zero = 0 ;
@@ -157,7 +160,7 @@ int sci_xget(char *fname,unsigned long fname_len)
     }
     else
     {
-      C2F(dr1)("xget",cstk(l1),&flagx,x1,&x2,&v,&v,&v,&dv,&dv,&dv,&dv,5L,bsiz);
+      sciprint("Unhandled propery.\n");
     }
     if (x2 > 0) {
       CreateVar(Rhs+1,MATRIX_OF_DOUBLE_DATATYPE,&one,&x2,&l3);
@@ -172,3 +175,29 @@ int sci_xget(char *fname,unsigned long fname_len)
   return 0;
 }
 /*-----------------------------------------------------------------------------------*/
+int C2F(xgetg)( char * str, char * str1, integer * len,integer  lx0,integer lx1)
+{
+  if ( strcmp(str,"fpf") == 0) 
+  {
+    strncpy(str1,getFPF(),32);
+    *len= (integer)strlen(str1);
+  }
+  else if ( strcmp(str,"auto clear")==0) 
+  {
+    int autoclear;
+    sciPointObj * subwin = sciGetFirstTypedSelectedSon( sciGetCurrentFigure(), SCI_SUBWIN ) ;
+    autoclear = !(sciGetAddPlot(subwin));
+    if (autoclear == 1) 
+    {
+      strncpy(str1,"on",2);
+      *len=2;
+    }
+    else 
+    {
+      strncpy(str1,"off",3);
+      *len=3;
+    }
+  }
+  return 0;
+}
+/*-----------------------------------------------------------------------------------*/
index c820e36..df811d6 100644 (file)
@@ -25,7 +25,7 @@ int sci_xgetech( char *fname, unsigned long fname_len )
   if ( Lhs >=2 ) { CreateVar( 2,MATRIX_OF_DOUBLE_DATATYPE, &un, &quatre,&l2); F= stk(l2);}
   if ( Lhs >=3 ) { CreateVar( 3,STRING_DATATYPE, &un, &deux,  &l3); L= cstk(l3);}
   if ( Lhs >=4 ) { CreateVar( 4,MATRIX_OF_DOUBLE_DATATYPE, &un, &quatre,&l4); A= stk(l4);}
-  SciWin();
+
   getscale2d(W,F,L,A);
   for ( i = 1 ; i <= Lhs ; i++) LhsVar(i) = i;
   return 0;
index 45ea2cc..1b85faa 100644 (file)
@@ -9,15 +9,15 @@
 #include "BuildObjects.h"
 #include "gw_graphics.h"
 #include "stack-c.h"
-#include "Xcall1.h"
 
 /*-----------------------------------------------------------------------------------*/
 int sci_xgetmouse( char *fname,unsigned long fname_len )
 {
-  integer  m1=1,n1=3,l1,l2,button,v;
+  integer  m1=1,n1=3,l1,l2;
+  int button = 0;
   integer iflag;
   integer sel[2],m,n,v2;
-  double x,y,dv;
+  double x,y;
 
   CheckRhs(0,2);
   CheckLhs(1,2);
@@ -44,12 +44,10 @@ int sci_xgetmouse( char *fname,unsigned long fname_len )
     }
   }
 
-  SciWin();
 
   switch (Lhs) {
   case 1: 
     v2=0;
-    C2F(dr1)("xgetmouse","xv",&button,&iflag,&v,&v,sel,&v2,&x,&y,&dv,&dv,10L,3L); 
     CreateVar(Rhs+1,MATRIX_OF_DOUBLE_DATATYPE,&m1,&n1,&l1);
     if (button==-100)
     {
@@ -65,7 +63,6 @@ int sci_xgetmouse( char *fname,unsigned long fname_len )
     return 0;
   case 2:
     v2=2;
-    C2F(dr1)("xgetmouse","xv",&button,&iflag,&v,&v,sel,&v2,&x,&y,&dv,&dv,10L,3L);
     CreateVar(Rhs+1,MATRIX_OF_DOUBLE_DATATYPE,&m1,&n1,&l1);
     if (button==-100)
     {
index 6ce6f73..dc9172e 100644 (file)
@@ -26,7 +26,6 @@ int sci_xgrid(char *fname,unsigned long fname_len)
     CheckScalar(1,m1,n1);
     style = (integer) *stk(l1);
   }
-  SciWin();
   LhsVar(1)=0;
   status = sciSetGridStyle( sciGetCurrentSubWin(), style, style, style ) ;
   if ( status == 0 )
index 3e300a5..f0b3694 100644 (file)
@@ -8,30 +8,21 @@
 #include "sci_xinit.h"
 #include "stack-c.h"
 #include "GetProperty.h"
-#include "Xcall1.h"
 #include "DrawObjects.h"
 #include "graphicSession.h"
 
 /*-----------------------------------------------------------------------------------*/
 int sci_xinit(char *fname, unsigned long fname_len )
 {
-  integer m1,n1,l1,v,v1=-1;
-  double dv;
   CheckRhs(-1,1);
 
   if (Rhs <= 0 )
   {
-    C2F(dr1)("xinit"," ",&v1,&v,&v,&v,&v,&v,&dv,&dv,&dv,&dv,6L,2L);
-    openGraphicSession() ; /* we do not draw now into the file/memory (depending on the driver type) */
+    /* TODO */
   } 
   else 
   {
-    char *param1=NULL;
-    GetRhsVar(1,STRING_DATATYPE,&m1,&n1,&l1);
-
-    param1=cstk(l1);
-    C2F(dr1)("xinit",cstk(l1),&v1,&v,&v,&v,&v,&v,&dv,&dv,&dv,&dv,6L,m1);
-    openGraphicSession() ; /* we do not draw now into the file/memory (depending on the driver type) */
+    /* TODO */
 
   }
   LhsVar(1)=0;
index de146ea..242c4c7 100644 (file)
 #include "stack-c.h"
 #include "BuildObjects.h"
 #include "gw_graphics.h"
-#include "Xcall1.h"
 #include "MALLOC.h"
 
 /*-----------------------------------------------------------------------------------*/
 int sci_xlfont( char * fname, unsigned long fname_len )
 {
-  integer m1,n1,l1,m2,n2,l2,v,i,count,sz[10],num;
-  double dv;
-
-  SciWin();
-  if (Rhs <= 0)
-  {
-    int one = 1 ;
-    char **S;
-    /*     we list the fonts and return their names in a string matrix */
-    int m = 0;
-    C2F(dr1)("xgfont",C2F(cha1).buf,&m,sz,&v,&v,&v,&v,&dv,&dv,&dv,&dv,7L,bsiz);
-    if (m == 0) { LhsVar(1)=0; return 0;}
-    if (( S= (char **) MALLOC( (m+1)*sizeof(char*))) == NULL) 
-    {
-      Scierror(999,"%s: running out of memory \r\n",fname);
-      return 0;
-    }
-    count =0;
-    /* OS Windows: Pb here due to fonttab again: its size is 10 and NUMBERFONT is 11 (=m) so...*/
-    /* By-pass here for the moment: FONTNUMBER set to FONTNUMBER-- in queryfamily (file periWin.c)*/
-    for ( i = 0 ; i < m ; i++) {
-      if ((S[i]= (char *) MALLOC((sz[i]+1)*sizeof(char))) == NULL) 
-      {
-        Scierror(999,"%s: running out of memory \r\n",fname);
-        return 0;
-      }
-      strncpy(S[i],C2F(cha1).buf+count,sz[i]);
-      count += sz[i]; 
-      S[i][sz[i]]='\0';
-    } 
-    S[m]= (char *) 0;
-    CreateVarFromPtr(Rhs+1,MATRIX_OF_STRING_DATATYPE,&one,&m,S);
-       if (S)
-       {
-               int j=0;
-               for(j=0;j<m+1;j++)
-               {
-                       if (S[j])
-                       {
-                               FREE(S[j]);
-                               S[j]=NULL;
-                       }
-               }
-               FREE(S);
-               S=NULL;
-       }
-    LhsVar(1)=Rhs+1;
-    return 0;
-  }
-  CheckRhs(2,2);
-  GetRhsVar(1,STRING_DATATYPE,&m1,&n1,&l1);
-  GetRhsVar(2,MATRIX_OF_DOUBLE_DATATYPE,&m2,&n2,&l2);  CheckScalar(2,m2,n2);  num = (integer) *stk(l2);
-  C2F(dr1)("xlfont",cstk(l1),&num,&v,&v,&v,&v,&v,&dv,&dv,&dv,&dv,7L,m1);
+  /* TODO */
   LhsVar(1)=0;
   return 0;
 }
index e1eb90f..3fc78bc 100644 (file)
@@ -9,7 +9,6 @@
 #include "stack-c.h"
 #include "GetProperty.h"
 #include "SetProperty.h"
-#include "Xcall1.h"
 #include "BuildObjects.h"
 #include "gw_graphics.h"
 #include "CurrentObjectsManagement.h"
@@ -21,7 +20,6 @@ int sci_xname(char *fname,unsigned long fname_len)
   CheckRhs(1,1);
   CheckLhs(1,1);
   GetRhsVar(1,STRING_DATATYPE,&m1,&n1,&l1);
-  SciWin();
   
   sciSetName( sciGetCurrentFigure(), cstk(l1), m1 ) ;
 
index ab79e57..79fac22 100644 (file)
@@ -27,8 +27,6 @@ int sci_xpoly( char * fname, unsigned long fname_len )
   sciPointObj * pobj    = NULL ;
   sciPointObj * psubwin = NULL ;
 
-  SciWin();
-
   CheckRhs(2,4);
   GetRhsVar(1,MATRIX_OF_DOUBLE_DATATYPE,&m1,&n1,&l1);
   GetRhsVar(2,MATRIX_OF_DOUBLE_DATATYPE,&m2,&n2,&l2);
index f245a6f..f385037 100644 (file)
@@ -25,7 +25,6 @@ int sci_xpolys(char *fname,unsigned long fname_len)
 
   sciPointObj *psubwin = NULL ;
 
-  SciWin();
   CheckRhs(2,3);
 
   GetRhsVar(1,MATRIX_OF_DOUBLE_DATATYPE,&m1,&n1,&l1);
index a975add..ba64d37 100644 (file)
@@ -24,8 +24,6 @@ int sci_xrect( char *fname, unsigned long fname_len )
   sciPointObj * pFigure = NULL;
 
   CheckRhs(1,4);
-  
-  SciWin();
 
   startGraphicDataWriting();
   pFigure = sciGetCurrentFigure();
index cb1563a..8a1d963 100644 (file)
@@ -14,6 +14,7 @@
 #include "GetProperty.h"
 #include "SetProperty.h"
 #include "CurrentObjectsManagement.h"
+#include "GraphicSynchronizerInterface.h"
 
 /*-----------------------------------------------------------------------------------*/
 int sci_xrects( char *fname, unsigned long fname_len )
@@ -21,8 +22,8 @@ int sci_xrects( char *fname, unsigned long fname_len )
   integer m1,n1,l1,m2,n2,l2;
   long  hdl;
   int i;
-  sciPointObj * psubwin = NULL ;
-  SciWin();
+  sciPointObj * psubwin = NULL;
+  sciPointObj * pFigure = NULL;
   CheckRhs(1,2);
 
   GetRhsVar(1,MATRIX_OF_DOUBLE_DATATYPE,&m1,&n1,&l1);
@@ -49,8 +50,11 @@ int sci_xrects( char *fname, unsigned long fname_len )
     for (i = 0; i < n2; ++i)  { *istk(l2 + i) = 0; }
   }  
   
+  startGraphicDataWriting();
   psubwin = sciGetCurrentSubWin();
-
+  pFigure = sciGetParentFigure(psubwin);
+  endGraphicDataWriting();
+  startFigureDataWriting(pFigure);
   for (i = 0; i < n1; ++i) { 
     /*       j = (i==0) ? 0 : 1; */
     if (*istk(l2+i) == 0){
@@ -75,9 +79,12 @@ int sci_xrects( char *fname, unsigned long fname_len )
     }
   }
   /** construct Compound and make it current object **/
-  sciSetCurrentObj (ConstructCompoundSeq (n1));  
+  sciSetCurrentObj(ConstructCompoundSeq(n1));
+  endFigureDataWriting(pFigure);
 
-  sciDrawObjIfRequired(sciGetCurrentObj ());
+  startFigureDataReading(pFigure);
+  sciDrawObjIfRequired(sciGetCurrentObj());
+  endFigureDataReading(pFigure);
 
   LhsVar(1)=0;
   return 0;
index 2bdd20b..b956a73 100644 (file)
@@ -31,7 +31,6 @@ int sci_xs2bmp( char * fname, unsigned long fname_len )
       char *FileName=NULL;
       GetRhsVar(2,STRING_DATATYPE,&m1,&n1,&l1);
       FileName=cstk(l1);
-      // bOK=Interface_XS2BMP(figurenum,FileName);
     }
     else
     {
index c358a97..2465bcf 100644 (file)
@@ -12,6 +12,7 @@
 #include "stack-c.h"
 #include "sciprint.h"
 #include "gw_graphics.h"
+#include "stack-c.h"
 /*-----------------------------------------------------------------------------------*/
 extern int IsAScalar(int RhsNumber);
 /*-----------------------------------------------------------------------------------*/
@@ -33,7 +34,6 @@ int sci_xs2emf( char * fname, unsigned long fname_len )
       char *FileName=NULL;
       GetRhsVar(2,STRING_DATATYPE,&m1,&n1,&l1);
       FileName=cstk(l1);
-      //bOK=Interface_XS2EMF(figurenum,FileName);
     }
     else
     {
index d850dda..95ede08 100644 (file)
@@ -9,7 +9,6 @@
 #include "stack-c.h"
 #include "BuildObjects.h"
 #include "gw_graphics.h"
-#include "Xcall1.h"
 #include "GetProperty.h"
 
 /*-----------------------------------------------------------------------------------*/
index fd09487..4eb6b06 100644 (file)
@@ -23,7 +23,6 @@ int sci_xsegs(char *fname,unsigned long fname_len)
   double arsize = 0.0 ;
   sciPointObj * psubwin = NULL ;
 
-  SciWin();
 
   CheckRhs(2,3);
 
index d49c594..dfc010e 100644 (file)
@@ -9,7 +9,6 @@
 
 #include "sci_xset.h"
 #include "stack-c.h"
-#include "Xcall1.h"
 #include "GetProperty.h"
 #include "SetProperty.h"
 #include "ObjectStructure.h"
 #include "DrawObjects.h"
 #include "InitObjects.h"
 #include "XsetXgetParameters.h"
-#include "periScreen.h"
 #include "CurrentObjectsManagement.h"
 #include "sciprint.h"
+#include "Format.h"
+#include "ObjectSelection.h"
+
+/*-----------------------------------------------------------------------------------*/
+int C2F(xsetg)(char * str,char * str1,integer lx0,integer lx1) ;
 /*-----------------------------------------------------------------------------------*/
 int sci_xset( char *fname, unsigned long fname_len )
 {
-  integer m1,n1,l1,m2,n2,l2, xm[5],xn[5],x[5], i, v, isdc;
-  integer lr, mark[2], font[2], verb=0;
-  double  xx[5],dv ;
+  integer m1,n1,l1,m2,n2,l2, xm[5],xn[5],x[5], i, v;
+  integer lr, fontSize;
+  double  xx[5];
   sciPointObj *subwin = NULL; 
   BOOL keyFound = FALSE ;
 
@@ -83,16 +86,6 @@ int sci_xset( char *fname, unsigned long fname_len )
     GetRhsVar(i,MATRIX_OF_DOUBLE_DATATYPE,&xm[i-2],&xn[i-2],&lr);
     x[i - 2] = (integer) *stk(lr); xx[i - 2] = *stk(lr);
   }
-  /* initialisation of a window if argument is not xset('window') 
-  * with special cases if xset('colormap') or xset('default') 
-  * and window does not exists we want to get into set_default_colormap 
-  * only once 
-  */
-  isdc = 0;
-  if (strcmp(cstk(l1),"colormap") == 0 || strcmp(cstk(l1),"default") == 0) { C2F(sedeco)(&isdc); }
-  if (strcmp(cstk(l1),"window") != 0) { SciWin(); }
-  isdc = 1;
-  if (strcmp(cstk(l1),"colormap") == 0 || strcmp(cstk(l1),"default") == 0) C2F(sedeco)(&isdc);
   if (strcmp(cstk(l1),"wdim") == 0 || strcmp(cstk(l1),"wpdim") == 0) {
     /* Xwindows limits dimensions to 2^16 */
     if ( (x[0]>65535)||(x[1]>65535)) {
@@ -103,23 +96,22 @@ int sci_xset( char *fname, unsigned long fname_len )
     }
   }
 
-  if (strcmp(cstk(l1),"clipping") == 0) 
-    C2F(dr1)("xset",cstk(l1),&v,&v,&v,&v,&v,&v,&xx[0],&xx[1],&xx[2],&xx[3],5L,bsiz);
+  if (strcmp(cstk(l1),"clipping") == 0)
+  {
+    sciSetClipping(sciGetCurrentObj(),xx);
+  }
   else if ( strcmp(cstk(l1),"colormap") == 0)
   {
     sciSetColormap (sciGetCurrentFigure(), stk(lr), *xm, *xn);
     sciRedrawFigure();
   }
-  else if ( strcmp(cstk(l1),"mark size") == 0) {
-    C2F(dr1)("xget","mark",&verb,mark,&v,&v,&v,&v,&dv,&dv,&dv,&dv,5L,5L);
+  else if ( strcmp(cstk(l1),"mark size") == 0)
+  {
 
     subwin = sciGetCurrentSubWin() ;
     sciSetMarkSizeUnit(subwin,2); /* force switch to tabulated mode : old syntax */
-
-
-    mark[1]=(int)xx[0];
     subwin = sciGetCurrentSubWin();
-    sciSetMarkSize(subwin,mark[1]);
+    sciSetMarkSize(subwin,(int)xx[0]);
     
   }
   else if ( strcmp(cstk(l1),"mark") == 0)
@@ -131,10 +123,9 @@ int sci_xset( char *fname, unsigned long fname_len )
     
   }
   else if ( strcmp(cstk(l1),"font size") == 0) {
-    verb=0;
-    C2F(dr1)("xget","font",&verb,font,&v,&v,&v,&v,&dv,&dv,&dv,&dv,5L,5L);
-    font[1]=(int)xx[0];
-    C2F(dr1)("xset","font",&(font[0]),&(font[1]),&v,&v,&v,&v,stk(lr),&dv,&dv,&dv,5L,5L);
+    fontSize = (int)xx[0];
+    sciSetFontWidth(sciGetCurrentSubWin(), fontSize);
+    sciSetFontWidth(sciGetParent(subwin), fontSize);
   } 
   /* NG beg */
   else if ( strcmp(cstk(l1),"old_style") == 0)
@@ -172,11 +163,13 @@ int sci_xset( char *fname, unsigned long fname_len )
     sciPointObj * psubwin = sciGetCurrentSubWin();
     pSUBWIN_FEATURE(psubwin)->hiddencolor = x[0];
   }
-  else 
-    C2F(dr1)("xset",cstk(l1),&x[0],&x[1],&x[2],&x[3],&x[4],&v,&dv,&dv,&dv,&dv,5L,bsiz);
+  else
+  {
+    sciprint("Unhandled property.\n");
+  }
   /* NG beg */
   if ( strcmp(cstk(l1),"window") == 0 )
-    if (sciSwitchWindow(&x[0]) != 0){
+    if (sciSwitchWindow(x[0]) != 0){
       Scierror(999,"%s: It was not possible to create the requested figure",fname);
     }
 
@@ -212,9 +205,8 @@ int sci_xset( char *fname, unsigned long fname_len )
         sciSetColormap(sciGetParent(subwin), stk(lr),xm[0], xn[0]);
       }
       else if ( strcmp(cstk(l1),"font size") == 0) {
-        int fontsize_ = 100*font[1];
-        sciSetFontDeciWidth(subwin, fontsize_); 
-        sciSetFontDeciWidth(sciGetParent(subwin), fontsize_);
+        sciSetFontWidth(subwin, fontSize); 
+        sciSetFontWidth(sciGetParent(subwin), fontSize);
       }     
       else if ( strcmp(cstk(l1),"dashes") == 0) {
         sciSetLineStyle(subwin, x[0]); 
@@ -292,3 +284,31 @@ int sci_xset( char *fname, unsigned long fname_len )
     return 0;
 }
 /*-----------------------------------------------------------------------------------*/
+int C2F(xsetg)(char * str,char * str1,integer lx0,integer lx1)
+{
+  if ( strcmp(str,"fpf") == 0) 
+  {
+    strncpy(getFPF(),str1,32);
+  }
+  else if ( strcmp(str,"auto clear")==0) 
+  {
+    sciPointObj * subwin = sciGetFirstTypedSelectedSon(sciGetCurrentFigure(), SCI_SUBWIN);
+    if (strcmp(str1,"on")==0 )
+    {
+      sciSetAddPlot( subwin,FALSE);
+    }
+    else{
+      sciSetAddPlot( subwin,TRUE);
+    }
+  }
+  else if ( strcmp(str,"default")==0)
+  {
+    getFPF()[0]='\0';
+  }
+  else 
+  {
+    sciprint("xset(arg,<string>): Unrecognized arg: %s\r\n",str);
+  }
+  return 0;
+}
+/*-----------------------------------------------------------------------------------*/
index 28281db..fb38a10 100644 (file)
@@ -31,7 +31,6 @@ int sci_xsetech(char* fname,unsigned long fname_len)
   int minrhs = 0,maxrhs = 0,minlhs=0,maxlhs=1,nopt;
 
   nopt = NumOpt();
-  SciWin();
 
   if ( nopt == 0) 
   {
@@ -86,7 +85,6 @@ int sci_xsetech(char* fname,unsigned long fname_len)
       wrect = stk(opts[3].l);  CheckLength(opts[3].position,opts[3].m*opts[3].n,4);
     } 
   }
-  SciWin();
   C2F(Nsetscale2d)(wrect,arect,frect,logflag,0L);
   LhsVar(1)=0;
   return 0;
diff --git a/scilab/modules/graphics/sci_gateway/c/sci_xsnative.c b/scilab/modules/graphics/sci_gateway/c/sci_xsnative.c
deleted file mode 100644 (file)
index 9fd622b..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-/*------------------------------------------------------------------------*/
-/* file: sci_xsnative.c                                                   */
-/* Copyright INRIA 2006                                                   */
-/* Authors : Allan Cornet, Jean-Baptiste Silvy                            */
-/* desc : interface for clc routine                                       */
-/*------------------------------------------------------------------------*/
-
-#include "sci_xsnative.h"
-
-#ifdef _MSC_VER
-#include <Windows.h>
-#undef Top
-#endif
-
-#include "stack-c.h"
-
-#ifdef _MSC_VER
-
-#include "Os_specific.h"
-//#include "../../gui/src/c/wsci/Errors.h"
-//#include "../../gui/src/c/wsci/ExportBmpEmf.h"
-#include "GetProperty.h"
-#include "WindowList.h"
-#include "MALLOC.h"
-#include "cluni0.h"
-
-/*-----------------------------------------------------------------------------------*/
-static int NumBMP=0;
-static char DefaultFilenameTests[PATH_MAX]="IMG";
-#define ExtensionTests ".bmp"
-/*-----------------------------------------------------------------------------------*/
-int sci_xsnative( char * fname, unsigned long fname_len )
-{
-  static int l1, m1, n1;
-  char FilenameBMP[PATH_MAX];
-  integer iflag =0,ids,num,un=1;
-  int *ArrayWGraph=NULL;
-  int i=0;
-
-  switch( Rhs )
-  {
-
-  case 0:
-    {
-      /*DefaultFilenameTests*/
-    }
-    break;
-
-  case 1:
-    {
-      if ( GetType(1) == 1 ) 
-      {
-        GetRhsVar(1,MATRIX_OF_INTEGER_DATATYPE,&m1,&n1,&l1);
-        NumBMP=*istk(l1);
-      }
-      else if( GetType(1) == 10 )
-      {
-        char *Input;
-        int out_n;
-        GetRhsVar(1,STRING_DATATYPE,&m1,&n1,&l1);
-        Input=cstk(l1);
-
-        C2F(cluni0)(Input,DefaultFilenameTests, &out_n,(long)strlen(Input),PATH_MAX);
-        NumBMP=0;
-      }
-      else
-      {
-        //Scierror(999,MSG_ERROR35);
-        LhsVar(1)=0;
-        return 0;
-      }
-
-    }
-    break;
-
-  default:
-    {
-      //Scierror(999,MSG_ERROR35);
-      LhsVar(1)=0;
-      return 0;
-    }
-    break;
-  }
-
-
-  sciGetIdFigure (&ids,&num,&iflag);
-  iflag = 1;
-  ArrayWGraph = MALLOC( sizeof(int) * num );
-  sciGetIdFigure (ArrayWGraph,&num,&iflag);    
-
-  for (i=0;i<num;i++)
-  {
-    struct BCG *ScilabGC=NULL;
-
-    wsprintf(FilenameBMP,"%s%d.bmp",DefaultFilenameTests,NumBMP);
-
-    ScilabGC = getWindowXgcNumber (ArrayWGraph[i]);
-
-    if (ScilabGC != (struct BCG *) 0)
-    {
-      //ExportBMP(ScilabGC,FilenameBMP);
-      NumBMP++;
-    }
-  }
-
-  FREE(ArrayWGraph);
-  ArrayWGraph=NULL;
-
-
-  LhsVar(1)=0;
-  return 0;
-
-}
-/*-----------------------------------------------------------------------------------*/
-#else
-int sci_xsnative( char * fname, unsigned long fname_len )
-{
-  Scierror(999,"Not yet implemented\n") ;
-  LhsVar(1)=0;
-  C2F(putlhsvar)() ;
-  return 0;
-}
-#endif
index 2062bee..6fb81a9 100644 (file)
@@ -47,7 +47,6 @@ int sci_xstring( char *fname, unsigned long fname_len )
     flagx = (integer) *stk(l5);
   }
 
-  SciWin();
   wc = 0.;/* to keep the size of the largest line */
 
 
index bf1b7f2..9ec12bc 100644 (file)
@@ -16,7 +16,6 @@
 #include "GetProperty.h"
 #include "MALLOC.h"
 #include "sciCall.h"
-#include "Xcall1.h"
 
 /*-----------------------------------------------------------------------------------*/
 int sci_xstringb(char *fname,unsigned long fname_len)
@@ -29,8 +28,6 @@ int sci_xstringb(char *fname,unsigned long fname_len)
   long hdlstr;
   double userSize[2] ;
 
-  SciWin();
-
   if ( Rhs <= 0 )
   {
     /* demo */
index d09e340..8e723cf 100644 (file)
@@ -11,7 +11,6 @@
 #include "stack-c.h"
 #include "BuildObjects.h"
 #include "gw_graphics.h"
-#include "Xcall1.h"
 #include "MALLOC.h"
 #include "DrawObjects.h"
 #include "Axes.h"
 /*-----------------------------------------------------------------------------------*/
 int sci_xstringl( char *fname, unsigned long fname_len )
 {
-  double rect[4],wc,dv,x,y,yi;
-  integer i,j,v,verb=0,un=1,quatre=4,m4,n4,l4,m1,n1,l1,m2,n2,l2,m3,n3;
+  integer m4,n4,l4,m1,n1,l1,m2,n2,l2,m3,n3;
   integer m5,n5,l5;
-  int font_[2], cur_font_[2];
+  int one = 1;
+  int four = 4;
   char **Str;
 
   CheckRhs(3,5);
   CheckLhs(0,1);
 
-  GetRhsVar(1,MATRIX_OF_DOUBLE_DATATYPE,&m1,&n1,&l1); CheckScalar(1,m1,n1); x = *stk(l1);
-  GetRhsVar(2,MATRIX_OF_DOUBLE_DATATYPE,&m2,&n2,&l2); CheckScalar(2,m2,n2); yi = y = *stk(l2);
+  GetRhsVar(1,MATRIX_OF_DOUBLE_DATATYPE,&m1,&n1,&l1); CheckScalar(1,m1,n1);
+  GetRhsVar(2,MATRIX_OF_DOUBLE_DATATYPE,&m2,&n2,&l2); CheckScalar(2,m2,n2);
   GetRhsVar(3,MATRIX_OF_STRING_DATATYPE,&m3,&n3,&Str);
 
   if ( m3*n3 == 0 ) { LhsVar(1)=0; return 0;} 
-  SciWin();
 
-  C2F(dr1)("xget","font",&verb,font_,&v,&v,&v,&v,&dv,&dv,&dv,&dv,5L,5L);
+  if (Rhs >= 4) { GetRhsVar(4,MATRIX_OF_INTEGER_DATATYPE,&m4,&n4,&l4); CheckScalar(4,m4,n4);}
+  if (Rhs >= 5) { GetRhsVar(5,MATRIX_OF_INTEGER_DATATYPE,&m5,&n5,&l5); CheckScalar(5,m5,n5);}
 
-  cur_font_[0] = font_[0];
-  cur_font_[1] = font_[1];
 
-  if (Rhs >= 4) { GetRhsVar(4,MATRIX_OF_INTEGER_DATATYPE,&m4,&n4,&l4); CheckScalar(4,m4,n4); font_[0] = *istk(l4);}
-  if (Rhs >= 5) { GetRhsVar(5,MATRIX_OF_INTEGER_DATATYPE,&m5,&n5,&l5); CheckScalar(5,m5,n5); font_[1] = *istk(l5);}
-
-  C2F(dr1)("xset","font",&font_[0],&font_[1],PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-
-  updateScaleIfRequired( sciGetCurrentSubWin() ) ;
-
-
-  wc = 0.;
-  for (i = m3 -1 ; i >= 0; --i) 
-  {
-    int ib = 0;
-    for (j = 0 ; j < n3 ; ++j) 
-    {
-      strcpy(C2F(cha1).buf + ib,Str[i+ m3*j]);
-      ib +=  (int)strlen(Str[i+ m3*j]);
-      if ( j != n3-1) { C2F(cha1).buf[ib]=' '; ib++;}
-    }
-    C2F(dr1)("xstringl",C2F(cha1).buf,&v,&v,&v,&v,&v,&v,&x,&y,rect,&dv,9L,bsiz);
-    wc = Max(wc,rect[2]);
-    if (i != 0 ) 
-      y += rect[3] * 1.2;
-    else 
-      y += rect[3];
-  }
-  if (Str)
-  {
-         int li=0;
-         for(li=0;li<m3*n3;li++)
-         {
-                 if (Str[li])
-                 {
-                         FREE(Str[li]);
-                         Str[li]=NULL;
-                 }
-         }
-         FREE(Str);
-         Str=NULL;
-  }
-  CreateVar(Rhs+1,MATRIX_OF_DOUBLE_DATATYPE,&un,&quatre,&l4);
-  *stk(l4) = x; 
-  *stk(l4+1) = y;
-  *stk(l4+2) = wc ;
-  *stk(l4+3) = y-yi;
-
-  C2F(dr1)("xset","font",&cur_font_[0],&cur_font_[1],PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
+  CreateVar(Rhs+1,MATRIX_OF_DOUBLE_DATATYPE,&one,&four,&l4);
+  *stk(l4) = 0.0; 
+  *stk(l4+1) = 0.0;
+  *stk(l4+2) = 0.0;
+  *stk(l4+3) = 0.0;
 
   LhsVar(1)=Rhs+1;
   return 0;
index 74fd9e8..00bce45 100644 (file)
@@ -77,7 +77,6 @@ int sci_xtitle( char * fname, unsigned long fname_len )
     nbLabels-- ; /* it is not a label text */
   }
 
-  SciWin();
 
   psubwin = sciGetCurrentSubWin();
 
index 6f84aff..9803f74 100644 (file)
@@ -18,7 +18,6 @@ int sci_zoom_rect(char *fname,unsigned long fname_len)
   int x_pixel=0,y_pixel=0;
   CheckRhs(0,1) ;
   CheckLhs(0,1) ;
-  SciWin() ;
   if (Rhs <= 0) 
   {
     zoom();
index cf696a9..28148c7 100644 (file)
 <PRIMITIVE gatewayId="7" primitiveId="62" primitiveName="xs2bmp" />
 <PRIMITIVE gatewayId="7" primitiveId="63" primitiveName="xs2emf" />
 <PRIMITIVE gatewayId="7" primitiveId="64" primitiveName="set_posfig_dim" />
-<PRIMITIVE gatewayId="7" primitiveId="65" primitiveName="xsnative" />
-<PRIMITIVE gatewayId="7" primitiveId="66" primitiveName="zoom_rect" />
-<PRIMITIVE gatewayId="7" primitiveId="67" primitiveName="unzoom" />
-<PRIMITIVE gatewayId="7" primitiveId="68" primitiveName="StringBox" />
-<PRIMITIVE gatewayId="7" primitiveId="69" primitiveName="move" />
-<PRIMITIVE gatewayId="7" primitiveId="70" primitiveName="glue" />
-<PRIMITIVE gatewayId="7" primitiveId="71" primitiveName="unglue" />
-<PRIMITIVE gatewayId="7" primitiveId="72" primitiveName="drawnow" />
-<PRIMITIVE gatewayId="7" primitiveId="73" primitiveName="drawlater" />
-<PRIMITIVE gatewayId="7" primitiveId="74" primitiveName="draw" />
-<PRIMITIVE gatewayId="7" primitiveId="75" primitiveName="addcb" />
-<PRIMITIVE gatewayId="7" primitiveId="76" primitiveName="copy" />
-<PRIMITIVE gatewayId="7" primitiveId="77" primitiveName="delete" />
-<PRIMITIVE gatewayId="7" primitiveId="78" primitiveName="get" />
-<PRIMITIVE gatewayId="7" primitiveId="79" primitiveName="set" />
-<PRIMITIVE gatewayId="7" primitiveId="80" primitiveName="newaxes" />
-<PRIMITIVE gatewayId="7" primitiveId="81" primitiveName="relocate_handle" />
-<PRIMITIVE gatewayId="7" primitiveId="82" primitiveName="swap_handles" />
-<PRIMITIVE gatewayId="7" primitiveId="83" primitiveName="help_gtk" />
-<PRIMITIVE gatewayId="7" primitiveId="84" primitiveName="UImenu" />
-<PRIMITIVE gatewayId="7" primitiveId="85" primitiveName="showalluimenushandles" />
-<PRIMITIVE gatewayId="7" primitiveId="86" primitiveName="readxbm" />
-<PRIMITIVE gatewayId="7" primitiveId="87" primitiveName="readgif" />
+<PRIMITIVE gatewayId="7" primitiveId="65" primitiveName="zoom_rect" />
+<PRIMITIVE gatewayId="7" primitiveId="66" primitiveName="unzoom" />
+<PRIMITIVE gatewayId="7" primitiveId="67" primitiveName="StringBox" />
+<PRIMITIVE gatewayId="7" primitiveId="68" primitiveName="move" />
+<PRIMITIVE gatewayId="7" primitiveId="69" primitiveName="glue" />
+<PRIMITIVE gatewayId="7" primitiveId="70" primitiveName="unglue" />
+<PRIMITIVE gatewayId="7" primitiveId="71" primitiveName="drawnow" />
+<PRIMITIVE gatewayId="7" primitiveId="72" primitiveName="drawlater" />
+<PRIMITIVE gatewayId="7" primitiveId="73" primitiveName="draw" />
+<PRIMITIVE gatewayId="7" primitiveId="74" primitiveName="addcb" />
+<PRIMITIVE gatewayId="7" primitiveId="75" primitiveName="copy" />
+<PRIMITIVE gatewayId="7" primitiveId="76" primitiveName="delete" />
+<PRIMITIVE gatewayId="7" primitiveId="77" primitiveName="get" />
+<PRIMITIVE gatewayId="7" primitiveId="78" primitiveName="set" />
+<PRIMITIVE gatewayId="7" primitiveId="79" primitiveName="newaxes" />
+<PRIMITIVE gatewayId="7" primitiveId="80" primitiveName="relocate_handle" />
+<PRIMITIVE gatewayId="7" primitiveId="81" primitiveName="swap_handles" />
+<PRIMITIVE gatewayId="7" primitiveId="82" primitiveName="help_gtk" />
+<PRIMITIVE gatewayId="7" primitiveId="83" primitiveName="UImenu" />
+<PRIMITIVE gatewayId="7" primitiveId="84" primitiveName="showalluimenushandles" />
+<PRIMITIVE gatewayId="7" primitiveId="85" primitiveName="readxbm" />
+<PRIMITIVE gatewayId="7" primitiveId="86" primitiveName="readgif" />
 </GATEWAY>
\ No newline at end of file
index 673e9ad..3ce346a 100644 (file)
 #include "GetProperty.h"
 #include "SetProperty.h"
 #include "DrawObjects.h"
-#include "Xcall1.h"
 #include "WindowList.h"
 #include "MALLOC.h"
-#include "Xcall1.h"
 #include "sciprint.h"
-#include "periScreen.h"
 #include "Actions.h"
 #include "syncexec.h"
+#include "DrawingBridge.h"
+#include "CurrentObjectsManagement.h"
 extern int xinitxend_flag;
 
 /********************************************************
@@ -33,8 +32,7 @@ extern int xinitxend_flag;
  *            flag scig_buzy  is used to check for that 
  *            
  ********************************************************/
-extern int sciSwitchWindow  __PARAMS((int *winnum));/* NG */
-extern void sciGetIdFigure __PARAMS((int *vect, int *id, int *iflag));/* NG */
+
 #if !defined(_MSC_VER)
 extern int WithBackingStore();
 #endif
@@ -68,61 +66,17 @@ Scig_handler scig_handler = scig_handler_none;
 void scig_replay(integer win_num)
 {
   /* Modification Allan CORNET Mai 2004 */
-  integer verb=0,cur,pix,na,backing;
-  char name[4];
   if ( scig_buzy  == 1 ) return ;
   scig_buzy =1;
-  GetDriver1(name,PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0);
-  C2F(dr)("xget","window",&verb,&cur,&na,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);  
-  C2F(dr)("xset","window",&win_num,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F(dr)("xget","pixmap",&verb,&pix,&na,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);  
-
-#if defined(_MSC_VER)
-  backing = 0;
-#else
-  backing = WithBackingStore();
-#endif
-  if (backing) 
-    {
-      C2F(dr)("xset","wshow",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);    
-    }
-  else 
-    {
-      if (pix == 0) 
-       {
-         if ( (GetDriver()) != 'R') C2F(SetDriver)("Rec",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0);
-         C2F(dr)("xclear","v",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-         sciRedrawFigure();
-         C2F(dr)("xset","wshow",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-       }
-      else
-       {
-         C2F(dr)("xset","wshow",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);    
-       }
-    }
-
-  C2F(dr)("xset","window",&cur,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F(dr)("xsetdr",name, PI0, PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
+  sciDrawObj(getFigureFromIndex(win_num));
   scig_buzy = 0;
 }
 
 
 void scig_erase(integer win_num)
 {
-  integer verb=0,cur,na;
-  char name[4];
   if ( scig_buzy  == 1 ) return ;
-  scig_buzy =1;
-  GetDriver1(name,PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0);
-  if ( (GetDriver()) !='R') 
-    C2F(SetDriver)("Rec",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0);
-  C2F(dr)("xget","window",&verb,&cur,&na,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);  
-  C2F(dr)("xset","window",&win_num,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  sciXbasc() ;
-  C2F(dr)("xclear","v",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F(dr)("xstart","v",&win_num,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F(dr)("xset","window",&cur,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F(dr)("xsetdr",name, PI0, PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
+  sciClearFigure(getFigureFromIndex(win_num));
   scig_buzy = 0;
 }
 
@@ -130,77 +84,46 @@ void scig_erase(integer win_num)
 
 int scig_2dzoom(integer win_num)
 {
-  char name[4];
-  int ret = 0;
-  integer verb=0,cur,na;
 
-  if ( scig_buzy  == 1 ) return 0; ;
+  if ( scig_buzy  == 1 ) return 0;
   scig_buzy =1;
-  GetDriver1(name,PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0);
 
-  C2F(dr)("xget","window",&verb,&cur,&na,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);  
-  C2F(dr)("xset","window",&win_num,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  ret=zoom();
-  if (cur != win_num)
-         C2F(dr)("xset","window",&cur,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F(dr)("xsetdr",name, PI0, PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
+  /* TODO */
 
-  scig_buzy = 0;
-  return ret;
+  return 0;
 }
 
 void scig_unzoom(integer win_num)
 {
-  integer verb=0,cur,na;
-  char name[4];
   if ( scig_buzy  == 1 ) return ;
   scig_buzy =1;
-  GetDriver1(name,PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0);
-  C2F(dr)("xget","window",&verb,&cur,&na,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);  
-  C2F(dr)("xset","window",&win_num,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  unzoom();
-  if (cur != win_num)
-       C2F(dr)("xset","window",&cur,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F(dr)("xsetdr",name, PI0, PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
+  /* TODO */
+
   scig_buzy = 0;
 }
 
 int scig_3drot(integer win_num)
 {
-  integer verb=0,cur,na,ret;
-  char name[4];
   if ( scig_buzy  == 1 ) return 0;
   scig_buzy =1;
-  GetDriver1(name,PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0);
-
-  C2F(dr)("xget","window",&verb,&cur,&na,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);  
-  C2F(dr)("xset","window",&win_num,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  ret=I3dRotation();
-  if (cur != win_num)
-       C2F(dr)("xset","window",&cur,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F(dr)("xsetdr",name, PI0, PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
+  
+  /* TODO */
+
   scig_buzy = 0;
-  return ret;
+  return 0;
 }
 
 void scig_sel(integer win_num)
 {
-  char c ;
-  int v=1;
-  if ((c=GetDriver())=='R' || c == 'X' || c == 'W')
-    {
-      C2F(dr)("xset","window",&win_num,&v,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-      sciSwitchWindow(&win_num) ;
-    }
+  sciSwitchWindow(win_num) ;
 }
 
 void scig_loadsg(int win_num, char *filename)
 {
-  integer verb = 0 ;
-  int cur = 0 ;
-  int narg = 0 ;
-  int ierr = 0 ;
-  int seq = 1 ;
+  integer ierr ;
+  integer seq = 1 ;
+  int curFigId = sciGetNum(sciGetCurrentFigure());
   char * macroCall = NULL ;
   /* the sting is "xload('(1)')" where (1) is filemame */
   /* Consequently we have 9 fixed character and two variable strings. */
@@ -208,10 +131,9 @@ void scig_loadsg(int win_num, char *filename)
 
   if ( scig_buzy  == 1 ) { return ; }
   scig_buzy  = 1 ;
-
-  C2F(dr)("xget","window",&verb,&cur,&narg,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F(dr)("xset","window",&win_num,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
   
+  sciSetUsedWindow(win_num);
+
   macroCall = MALLOC( (macroCallLength+1) * sizeof(char) ) ; /* +1 for the \0 terminating character */
   sprintf(macroCall,"xload('%s')",filename);
 
@@ -220,7 +142,8 @@ void scig_loadsg(int win_num, char *filename)
   FREE( macroCall ) ;
   if(ierr != 0) { sciprint("Wrong plot file : %s\r\n",filename) ; }
 
-  C2F(dr)("xset","window",&cur,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
+  sciSetUsedWindow(curFigId);
+
   scig_buzy = 0;
 }
 
@@ -249,44 +172,11 @@ void scig_savesg( int win_num, char * filename )
 
 void scig_expose(integer win_num)
 {
-  integer verb=0,cur,pix,na,backing;
-  char name[4];
   if ( scig_buzy  == 1 ) return ;
   scig_buzy =1;
-  GetDriver1(name,PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0);
-  C2F(dr)("xget","window",&verb,&cur,&na,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);  
-  C2F(dr)("xset","window",&win_num,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F(dr)("xget","pixmap",&verb,&pix,&na,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);  
-
-#if defined(_MSC_VER)
-  backing = 0;
-#else
-  backing = WithBackingStore();
-#endif
-  if (backing) 
-  {
-    /* only used whith X11 were pixmap mode can be used for backing store 
-    * we are here in a case where the pixmap is used for backing store 
-    */
-    C2F(dr)("xset","wshow",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);    
-  }
-  else 
-  {
-    if (pix == 0) 
-    {
-      if ( (GetDriver()) != 'R') 
-        C2F(SetDriver)("Rec",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0);
-      C2F(dr)("xclear","v",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);  
-      sciRedrawFigure();
-      C2F(dr)("xset","wshow",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-    }
-    else
-    {
-      C2F(dr)("xset","wshow",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);    
-    }
-  }
-  C2F(dr)("xset","window",&cur,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F(dr)("xsetdr",name, PI0, PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
+  
+  sciDrawObj(getFigureFromIndex(win_num));
+  
   scig_buzy = 0;
 }
 
@@ -296,28 +186,9 @@ void scig_expose(integer win_num)
 
 void scig_resize(integer win_num)
 {
-  integer verb=0,cur,na,pix,backing;
-  char name[4];
   if ( scig_buzy  == 1 ) return ;
   scig_buzy =1;
-  GetDriver1(name,PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0);
-  if ( (GetDriver()) !='R') 
-    C2F(SetDriver)("Rec",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0);
-  C2F(dr)("xget","window",&verb,&cur,&na,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);  
-  C2F(dr)("xset","window",&win_num,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F(dr)("xget","pixmap",&verb,&pix,&na,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);  
-  CPixmapResize1();
-  C2F(dr)("xclear","v",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);    
-#if defined(_MSC_VER)
-  backing = 0;
-#else
-  backing = WithBackingStore();
-#endif
-  sciRedrawFigure();
-  if (backing && pix!=1 ) C2F(dr)("xset","wshow",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-
-  C2F(dr)("xset","window",&cur,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F(dr)("xsetdr",name, PI0, PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
+  sciDrawObj(getFigureFromIndex(win_num));
   scig_buzy = 0;
 }
 
@@ -327,28 +198,5 @@ void scig_resize(integer win_num)
 
 void scig_raise(integer win_num)
 {
-
-  int cur,n,na,verb=0,iflag=0;
-
-  sciGetIdFigure (PI0,&n,&iflag);
-  if ( n > 0 )
-  {
-    C2F(dr)("xget","window",&verb,&cur,&na,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-    if (win_num != cur) 
-    {
-      C2F(dr)("xset","window",&win_num,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-      sciSwitchWindow(&win_num);
-      C2F(dr)("xselect","v",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-      C2F(dr)("xset","window",&cur,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-    }
-    else
-    {
-      C2F(dr)("xselect","v",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-    }
-  }
-  else
-  { 
-    C2F(dr)("xset","window",&win_num,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-    sciSwitchWindow(&win_num);
-  }
+  sciDrawObj(getFigureFromIndex(win_num));
 }
index 29adae6..030b84d 100644 (file)
 #include <string.h>
 #include <stdio.h>
 #include "math_graphics.h"
-#include "PloEch.h"
 #include "Axes.h"
 #include "DestroyObjects.h"
 #include "DrawObjects.h"
 #include "InitObjects.h"
-#include "Xcall1.h"
 #include "SetProperty.h"
-#include "handleDrawing/drawTextEntity.h"
-#include "sciprint.h"
-#include "Format.h"
-#include "Plo3d.h"
 #include "axesScale.h"
 #include "CurrentObjectsManagement.h"
 
 
 #include "GetProperty.h"
 
-static double  x_convert __PARAMS((char xy_type,double x[] ,int i));
-static double  y_convert __PARAMS((char xy_type,double x[] ,int i));
-
-
-static void axesplot(char* ,sciPointObj*);
-static int SciAxisNew(char pos,sciPointObj *psubwin, double xy,int fontsize,int fontstyle,int textcolor,int ticscolor, int seg);
-
-static void DrawXTics(char pos, sciPointObj * psubwin, double xy, char * c_format, int * fontid, int textcolor,int ticscolor,int color_kp, int *logrect, int smallersize);
-static void DrawYTics(char pos, sciPointObj * psubwin, double xy, char * c_format, int * fontid, int textcolor,int ticscolor,int color_kp, int *logrect, int smallersize);
-static int XDrawAxisLine(double xminval,double xmaxval,double xy, int ticscolor, int color_kp);
-static int YDrawAxisLine(double yminval,double ymaxval,double xy, int ticscolor, int color_kp);
-static void FindXYMinMaxAccordingTL(sciPointObj * psubwin, double *xminval,double *yminval,double *xmaxval,double *ymaxval);
-
-static int DrawXSubTics(char pos, sciPointObj * psubwin, double xy,int ticscolor,int color_kp);
-static int DrawYSubTics(char pos, sciPointObj * psubwin, double xy,int ticscolor,int color_kp);
-
-static int DrawXGrid(sciPointObj * psubwin);
-static int DrawYGrid(sciPointObj * psubwin);
-
-static void YGradPosition(sciPointObj * psubwin, int xx, int rect2);
-static void XGradPosition(sciPointObj * psubwin, int yy, int rect3);
-
-int SciDrawLines(char pos, sciPointObj * psubwin, double xy, int textcolor,int ticscolor);
-
-void axis_draw(char strflag[]) ;
-
-/*--------------------------------------------------------------
- * Draw Axis or only rectangle
- *----------------------------------------------------------------*/
-
-void axis_draw(char strflag[])
-{ 
-       static sciPointObj * psubwin;
-  /* using foreground to draw axis */
-  integer verbose=0,narg,xz[10],fg,i,ixbox[5],iybox[5],p=5,n=1,color,color_kp; 
- /*  int isoflag = -1; */
-  char c = (strlen(strflag) >= 3) ? strflag[2] : '1';
-  C2F(dr)("xget","foreground",&verbose,&fg,&narg,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F(dr)("xget","line style",&verbose,xz,&narg,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F(dr)("xset","line style",(i=1,&i),PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F(dr)("xget","color",&verbose,xz+1,&narg,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F(dr)("xset","color",&fg,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 
-
-
-  psubwin = sciGetCurrentSubWin();
-  
-  /* F.Leray test on color here*/
-  color=sciGetBackground(psubwin);
-  
-
-  ixbox[0]=ixbox[4]=Cscale.WIRect1[0];iybox[0]=iybox[4]=Cscale.WIRect1[1];
-  ixbox[1]=ixbox[0];iybox[1]=Cscale.WIRect1[1]+Cscale.WIRect1[3];
-  ixbox[2]=Cscale.WIRect1[0]+Cscale.WIRect1[2];iybox[2]=iybox[1];
-  ixbox[3]=ixbox[2];iybox[3]=iybox[0];
-  C2F(dr)("xget","pattern",&verbose,&color_kp,&narg,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F(dr)("xset","pattern",&color,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F(dr)("xarea", "v", &p, ixbox, iybox, &n, PI0, PI0, PD0, PD0, PD0, PD0, 5L,0L);
-  C2F(dr)("xset","pattern",&color_kp,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-
-  switch ( c) 
-    {
-    case '0' :
-      break ;
-    case '2' :
-      pSUBWIN_FEATURE (psubwin)->axes.rect = BT_ON;  /* NG */
-      C2F(dr)("xrect","xv",&Cscale.WIRect1[0],&Cscale.WIRect1[1],&Cscale.WIRect1[2],&Cscale.WIRect1[3]
-             ,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-      break;
-    default :
-      axesplot(strflag,psubwin);
-      break;
-    }
-
-
-
-  C2F(dr)("xset","line style",xz,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F(dr)("xset","color",xz+1,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-
-
-}
-
-/* F.Leray 16.12.04 */
-/* Same thing as axis_draw without the background area set */
-/* Only used in NG mode */
-void axis_draw2(char strflag[])
-{ 
-       static sciPointObj * psubwin;
-  /* using foreground to draw axis */
-  integer verbose=0,narg,xz[10],fg,i,color; 
-  /*  int isoflag = -1; */
-  char c = (strlen(strflag) >= 3) ? strflag[2] : '1';
-  C2F(dr)("xget","foreground",&verbose,&fg,&narg,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F(dr)("xget","line style",&verbose,xz,&narg,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F(dr)("xset","line style",(i=1,&i),PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F(dr)("xget","color",&verbose,xz+1,&narg,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F(dr)("xset","color",&fg,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 
-  
-  psubwin = sciGetCurrentSubWin();
-  
-  /* F.Leray test on color here*/
-  color=sciGetBackground(psubwin);
-  
-  switch ( c) 
-    {
-      /*case '0' :
-        break ;*/
-    case '2' :
-      pSUBWIN_FEATURE (psubwin)->axes.rect = BT_ON;
-      
-      C2F(dr)("xrect","xv",&Cscale.WIRect1[0],&Cscale.WIRect1[1],&Cscale.WIRect1[2],&Cscale.WIRect1[3]
-             ,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-      break;
-    default :
-      axesplot(strflag,psubwin);
-      break;
-    }
-
-  C2F(dr)("xset","line style",xz,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F(dr)("xset","color",xz+1,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-}
-
-/* Only paint the area of the axes */
-/* ans does not draw any graduations or ticks, lines... */
-void DrawAxesBackground( void )
-{ 
-       static sciPointObj * psubwin;
-  /* using foreground to draw axis */
-  integer verbose=0,narg,xz[10],fg,i,ixbox[5],iybox[5],p=5,n=1,color,color_kp; 
- /*  int isoflag = -1; */
-  C2F(dr)("xget","foreground",&verbose,&fg,&narg,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F(dr)("xget","line style",&verbose,xz,&narg,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F(dr)("xset","line style",(i=1,&i),PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F(dr)("xget","color",&verbose,xz+1,&narg,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F(dr)("xset","color",&fg,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 
-
-  psubwin = sciGetCurrentSubWin();
-    
-  /* F.Leray test on color here*/
-  color=sciGetBackground(psubwin);
-  
-  ixbox[0]=ixbox[4]=Cscale.WIRect1[0];iybox[0]=iybox[4]=Cscale.WIRect1[1];
-  ixbox[1]=ixbox[0];iybox[1]=Cscale.WIRect1[1]+Cscale.WIRect1[3];
-  ixbox[2]=Cscale.WIRect1[0]+Cscale.WIRect1[2];iybox[2]=iybox[1];
-  ixbox[3]=ixbox[2];iybox[3]=iybox[0]; 
-  C2F(dr)("xget","pattern",&verbose,&color_kp,&narg,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F(dr)("xset","pattern",&color,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);   
-  C2F(dr)("xarea", "v", &p, ixbox, iybox, &n, PI0, PI0, PD0, PD0, PD0, PD0, 5L,0L);
-  C2F(dr)("xset","pattern",&color_kp,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);         
-
-  C2F(dr)("xset","line style",xz,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F(dr)("xset","color",xz+1,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-
-
-}
-
-
-/*-------------------------------------------------------------
- * Sci_Axis : 
- *   Drawing axis 
- *   pos = 'r' | 'l' | 'u' | 'd' : gives the tics directions 
- *         'r' and 'l' are used for vertical axis 
- *         'u' and 'd' for horizontal axis 
- *   xy_type = 'v' (for vector) or 'r' (for range) 
- *         'v' means that tics position are given by a vector 
- *         'r' means that tics position are in a range i.e given by a vector of size 3 
- *             [min,max,number_of_intervals] 
- *         'i' means that tics positions are in a range given by four number (integers) 
- *             [k1,k2,e,number_of intervale] -> [k1*10^e,k2*10^e] 
- *   x vector of size nx 
- *   y vector of size ny 
- *         if pos = 'r' or 'l' then x must be of size 1 
- *              the size of y i.e ny must be 3 if xy_type == 'r' or 4 if xy_type == 'i'
- *              str if non null gives the string to be used at ticks marks 
- *              it must be then of size ny or of size y[3]+1 (if xy_type == 'r') 
- *              or y[4]+1 (if xy_type == 'i') 
- *         if pos = 'u' or 'd  ' then y must be of size 1 
- *              the size of x i.e nx must be 3 if xy_type == 'r' or 4 if xy_type == 'i'
- *              str if non null gives the string to be used at ticks marks 
- *              it must be then of size ny or of size y[3]+1 (if xy_type == 'r')
- *              or y[4]+1 (if xy_type == 'i') 
- *   str = char *str[] string vector, see above for size constraints 
- *              Warning str must be null terminated 
- *   subtics or subints : number of sub intervals 
- *   format : format for tick marks.
- *            format is only used if str is NULL
- *            if format is null a format is computed else format is used 
- *   fontsize and textcolor : 
- *            XXXXX : to be done 
- *   seg_flag : 0 or 1, flag which control the drawing of the segment associated to the axis 
- *            if 1 the segment is drawn 
- *-------------------------------------------------------------*/
-
-void Sci_Axis(char pos, char xy_type, double *x, int *nx, double *y, int *ny,
-              char *str[], int subtics, char *format, int fontsize, int textcolor, 
-              int fontstyle, int ticscolor, char logflag, int seg_flag, int axisbuild_flag)
-{
-  int Nx = 0 ,Ny = 0 ,j;
-  double angle=0.0,vxx,vxx1;
-  int vx[2],vy[2],xm[2],ym[2];
-  char c_format[5];
-  integer flag=0,xx=0,yy=0,posi[2],rect[4],dash[6],trois=3;/**DJ.Abdemouche 2003**/
-  integer i,barlength;
-  int ns=2,iflag=0;
-  integer fontid[2],fontsize_kp, narg,verbose=0,logrect[4],smallersize,color_kp; 
-  integer pstyle;
-  int x3, y3, xpassed = 0, ypassed = 0; /* for log. case management */
-  /*** 01/07/2002 -> 11.05.04 ***/ /* F.Leray : Re-put the Djalel modif. for a better display 
-                                   using tight_limits='on' and/or isoview='on' */
-  double xmin = 0.0 ;
-  double xmax = 0.0 ;
-  double ymin = 0.0 ;
-  double ymax = 0.0 ; 
-  sciPointObj * psubwin = NULL;
-  double pas; /* used for logarithmic grid */
-
-  fontid[0]= fontstyle;
-
-  psubwin = sciGetCurrentSubWin();
-
-  C2F(dr)("xget","font",&verbose,fontid,&narg,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  fontsize_kp = fontid[1] ;
-  if ( fontsize == -1 )
-  {
-    fontid[0]= 0; fontid[1]= 1;  fontsize_kp = fontid[1] ;
-    fontid[0]= fontstyle;
-    C2F(dr)("xset","font",fontid,fontid+1,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  }
-
-  if ( fontsize != -1 ) 
-  {
-    fontid[1] = fontsize ;
-    fontid[0]= fontstyle;
-    C2F(dr)("xset","font",fontid,fontid+1,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  }
-  if ( textcolor != -1 || ticscolor != -1 ) 
-  {
-    C2F(dr)("xget","pattern",&verbose,&color_kp,&narg,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  }
-
-  if (logflag == 'l' )
-  {
-    C2F(dr)("xstringl","10",&xx,&yy,logrect,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);        
-    smallersize=fontid[1]-2;
-    C2F(dr)("xset","font",fontid,&smallersize,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  }
-
-
-  /* Pb here, dim of x and y can be lesser than 4 (ie in example_eng.tst : nx = 6 and ny = 1) F.Leray 25.02.04
-  x and y are either double x[3] (resp. y[3]) or simply a double !  F.Leray 05.03.04
-  So a test on x[3] (resp. y[3]) is ALWAYS bad!!
-  NO!! It depends on the xy_type as follow */
-  /*
-  *   xy_type = 'v' (for vector) or 'r' (for range) 
-  *         'v' means that tics position are given by a vector 
-  *         'r' means that tics position are in a range i.e given by a vector of size 3 
-  *             [min,max,number_of_intervals] 
-  *         'i' means that tics positions are in a range given by four number (integers) 
-  *             [k1,k2,e,number_of intervals] -> [k1*10^e,k2*10^e] */
-
-  if(xy_type == 'i')
-  {     /* Adding F.Leray 05.03.04*/
-    /*F.Leray Modification on 09.03.04*/
-    switch ( pos ) {
-      case 'u' : case 'd' :  
-        if(pSUBWIN_FEATURE(psubwin)->logflags[0] == 'n')
-          while (x[3]>10)  x[3]=floor(x[3]/2); 
-        else{
-          if(x[3] > 12){ /* F.Leray arbitrary value=12 for the moment */
-            x3=(int)x[3];     /* if x[3]>12 algo is triggered to search a divisor */
-            for(j=x3-1;j>1;j--)
-            {
-              if(x3%j == 0){
-                x[3]=j; 
-                xpassed = 1;
-              }
-            }
-            if(xpassed != 1) { x[3] = 1; }
-          }
-        }
-
-        break;
-      case 'r' : case 'l' :
-        if(pSUBWIN_FEATURE(psubwin)->logflags[1] == 'n')
-          while (y[3]>10)  y[3]=floor(y[3]/2);
-        else{
-          if(y[3] > 12){
-            y3=(int)y[3];
-            for(j=y3-1;j>1;j--)
-              if(y3%j == 0){
-                y[3]=j;
-                ypassed = 1;
-              }
-              if(ypassed != 1) y[3] = 1;
-          }
-
-          break;
-        }
-    }
-
-
-  }
-
-
-  /** Real to Pixel values **/
-  switch ( xy_type ) 
-  {
-  case 'v' : Nx= *nx; Ny= *ny; break;
-  case 'r' :
-    switch ( pos ) {
-  case 'u' : case 'd' : Nx = (int) x[2]+1; break;
-  case 'r' : case 'l' : Ny = (int) y[2]+1; break;
-    }
-    break;
-  case 'i' : 
-    switch ( pos ) {
-  case 'u' : case 'd' : Nx = (int) x[3]+1; break; 
-  case 'r' : case 'l' : Ny = (int) y[3]+1; break;
-    }
-    break;
-  default: 
-    sciprint("Sci_Axis: wrong type argument xy_type\r\n");
-  }
-  switch (pos ) 
-  {
-  case 'u' : 
-  case 'd' :
-    /** Horizontal axes **/
-    barlength =  (integer) (Cscale.WIRect1[3]/50.0);
-    /** compute a format **/
-    if (str == NULL && format == NULL )  
-      switch (xy_type ) {
-  case 'v' : ChoixFormatE1(c_format,x,Nx);break;
-  case 'r' : ChoixFormatE (c_format,x[0],x[1],(x[1]-x[0])/x[2]);break;
-  case 'i' : 
-    ChoixFormatE (c_format,
-      (x[0] * exp10(x[2])),
-      (x[1] * exp10(x[2])),
-      ((x[1] * exp10(x[2])) - (x[0] * exp10(x[2])))/x[3]); break; /* Adding F.Leray 06.05.04 */
-    }
-    /** the horizontal segment **/
-
-    vx[0] =  XScale(x_convert(xy_type, x , 0)); /* C EST LA que se calcule les positions initiales et finales (en x et y) de la barre support de l'axe des abscisses */
-    vx[1] =  XScale(x_convert(xy_type, x , Nx-1));
-    vy[0]= vy[1] = ym[0] = YScale(y[0]);
-    if ( seg_flag == 1) 
-    {
-      if ( ticscolor != -1 ) C2F(dr)("xset","pattern",&ticscolor,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-      C2F(dr)("xsegs","v", vx, vy, &ns,&ticscolor,&iflag,PI0,PD0,PD0,PD0,PD0,0L,0L);
-      if ( ticscolor != -1 ) C2F(dr)("xset","pattern",&color_kp,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-    }
-    /******* 01/07/2002  -> 11.05.04 **********/
-    psubwin = sciGetCurrentSubWin();
-    if ((pSUBWIN_FEATURE (psubwin)->tight_limits == TRUE || pSUBWIN_FEATURE (psubwin)->isoview == TRUE )
-      && axisbuild_flag == 0){{ 
-        xmax=Cscale.frect[2];
-        xmin=Cscale.frect[0];
-
-        if(xy_type == 'i')
-        {
-
-
-          x[1] = floor(  Cscale.xtics[1] );
-          x[0] =  ceil(  Cscale.xtics[0] );
-          x[3]=inint(x[1]-x[0]);
-          while (x[3]>10)  x[3]=floor(x[3]/2);
-          Nx=(int)(x[3]+1);
-
-          /* re-compute a format when tight_limits or isoview == ON */
-          ChoixFormatE (c_format,
-            (x[0] * exp10(x[2])),
-            (x[1] * exp10(x[2])),
-            ((x[1] * exp10(x[2])) - (x[0] * exp10(x[2])))/x[3]); /* Adding F.Leray 15.05.04 */
-        }
-        /* THESE 2 last cases are unreachable because we use the condition : */
-        /* axisbuild_flag == 0 */
-        else if (xy_type == 'r') /* normally unreachable */
-        {
-          sciprint(" Normally, unreachable case \n");
-        }
-        else if(xy_type == 'v') /* normally unreachable */
-        {
-          sciprint(" Normally, unavailable case  AAA \n");
-        }
-    }
-
-
-    pas = ((double) Cscale.WIRect1[2]) / ((double) Cscale.Waaint1[1]);
-
-    /**********************/
-    /** loop on the ticks **/
-    if (Nx==1) break;
-    for (i=0 ; i < Nx ; i++)
-    {  
-      char foo[100];
-      vxx = x_convert(xy_type,x,i);
-      if ( str != NULL)  
-        sprintf(foo,"%s",str[i]);
-      else if ( format == NULL) 
-      {
-        /* defaults format */
-        /*F.Leray 19.05.04 */
-        /* When Sci_Axis is called by aplotv1, format is NULL : it can not be something else...*/
-        /* format can also be NULL if non specified and coming from ConstructAxes method called in Objdrawaxis (see matdes.c) */
-        sprintf(foo,c_format,vxx);
-      }
-      else {
-        sprintf(foo,format,vxx);
-      }
-
-
-      C2F(dr)("xstringl",foo,&xx,&yy,rect,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-
-      /* tick is computed in vx,vy and string is displayed at posi[0],posi[1] position */
-
-      vx[0] = vx[1] = xm[0] =  XScale(vxx);
-      posi[0] = inint( xm[0] -rect[2]/2.0);
-
-      if ( pos == 'd' ) 
-      {
-        posi[1]=inint( ym[0] + 1.2*barlength + rect[3]);
-        vy[0]= ym[0];vy[1]= ym[0] + barlength ;
-      }
-      else 
-      { 
-        posi[1]=inint( ym[0] - 1.2*barlength);
-        vy[0]= ym[0];vy[1]= ym[0] - barlength;
-      }
-      if ( textcolor != -1 ) C2F(dr)("xset","pattern",&textcolor,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-      C2F(dr)("xstring",foo,&(posi[0]),&(posi[1]),PI0,&flag,PI0,PI0,&angle, PD0,PD0,PD0,0L,0L);
-      if ( logflag == 'l' )
-      {
-        C2F(dr)("xset","font",fontid,fontid+1,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-        C2F(dr)("xstring","10",(posi[0] -= logrect[2],&posi[0]),
-          (posi[1] += logrect[3],&posi[1]),
-          PI0,&flag,PI0,PI0,&angle,PD0,PD0,PD0,0L,0L);
-        C2F(dr)("xset","font",fontid,&smallersize,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-      }
-      if ( textcolor != -1 ) C2F(dr)("xset","pattern",&color_kp,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-
-      if ( ticscolor != -1 ) C2F(dr)("xset","pattern",&ticscolor,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-      C2F(dr)("xsegs","v", vx, vy, &ns,&ticscolor,&iflag,PI0,PD0,PD0,PD0,PD0,0L,0L);
-
-      /*** MAJ Djalel.A 21/01/2003 ***/ 
-      if (pSUBWIN_FEATURE (psubwin)->grid[0] > -1) 
-      { /**DJ.Abdemouche 2003**/
-        if(pSUBWIN_FEATURE (psubwin)->logflags[0] == 'l')
-        {
-          if ((vx[0] != Cscale.WIRect1[0]) && (vx[0] != (Cscale.WIRect1[0]+ Cscale.WIRect1[2])))
-          {
-            pstyle=pSUBWIN_FEATURE (psubwin)->grid[0] ;
-            C2F(dr)("xget","line style",&verbose,dash,&narg,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-            C2F (dr) ("xset", "line style",&trois,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-            vy[0]=Cscale.WIRect1[1];
-            vy[1]=Cscale.WIRect1[1]+Cscale.WIRect1[3];  
-            C2F(dr)("xsegs","v", vx, vy, &ns,&pstyle,&iflag,PI0,PD0,PD0,PD0,PD0,0L,0L);
-          }
-
-          if(i < Nx -1 )
-          {
-            int jinit=1;
-            /* In case there is a log. scale, add. sub-grid taking account of this special scale F.Leray 07.05.04 */
-            pstyle=pSUBWIN_FEATURE (psubwin)->grid[0] ;
-            C2F(dr)("xget","line style",&verbose,dash,&narg,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-            C2F (dr) ("xset", "line style",&trois,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-            vy[0]=Cscale.WIRect1[1];
-            vy[1]=Cscale.WIRect1[1]+Cscale.WIRect1[3];
-
-            if ( i== 0 ) jinit=2; /* no grid on plot boundary */
-            for (j= jinit; j < 10 ; j++)
-            {
-              vx[0]=vx[1]= Cscale.WIRect1[0] + inint( ((double) i)*pas)+ inint(log10(((double)j))*pas);
-              C2F(dr)("xsegs","v", vx, vy, &ns,&pstyle,&iflag,PI0,PD0,PD0,PD0,PD0,0L,0L);
-            }
-            C2F(dr)("xset","line style",dash,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L) ;
-          }
-        }
-        else if(pSUBWIN_FEATURE (psubwin)->logflags[0] == 'n')
-        {
-          if ((vx[0] != Cscale.WIRect1[0]) && (vx[0] != (Cscale.WIRect1[0]+ Cscale.WIRect1[2])))
-          {
-            pstyle=pSUBWIN_FEATURE (psubwin)->grid[0] ;
-            C2F(dr)("xget","line style",&verbose,dash,&narg,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-            C2F (dr) ("xset", "line style",&trois,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-            vy[0]=Cscale.WIRect1[1];
-            vy[1]=Cscale.WIRect1[1]+Cscale.WIRect1[3];  
-            C2F(dr)("xsegs","v", vx, vy, &ns,&pstyle,&iflag,PI0,PD0,PD0,PD0,PD0,0L,0L);
-            C2F(dr)("xset","line style",dash,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-          }
-        }
-      }
-      /***/
-      /* subtics */
-      if ( i < Nx-1 ) 
-      {
-        double dx ; 
-        vxx1= x_convert(xy_type,x,i+1);
-        dx = (vxx1-vxx)/subtics;
-        for ( j = 1 ; j < subtics; j++){ 
-          vx[0] = vx[1] = XScale(vxx+dx*j);
-          if ( pos == 'd' ) 
-          { vy[0]= ym[0];vy[1]=  (integer) (ym[0] + barlength/2.0) ; }
-          else 
-          { vy[0]= ym[0];vy[1]=  (integer) (ym[0] - barlength/2.0) ; }
-          C2F(dr)("xsegs","v", vx, vy, &ns,&ticscolor,&iflag,PI0,PD0,PD0,PD0,PD0,0L,0L);
-        }
-      } 
-      /***   01/07/2002  -> 11.05.04 ****/
-      psubwin = sciGetCurrentSubWin();
-      if ( (pSUBWIN_FEATURE (psubwin)->tight_limits || pSUBWIN_FEATURE (psubwin)->isoview )
-        && axisbuild_flag == 0)
-      {  
-        if ( i == 0 ) 
-        {
-          double dx ; 
-          vxx1= x_convert(xy_type,x,i+1);
-          dx = (vxx1-vxx)/subtics;
-          for ( j = 1 ; j < subtics; j++) {  
-            if ( vxx-dx*j > xmin){
-              vx[0] = vx[1] = XScale(vxx-dx*j);
-              if ( pos == 'd' ) 
-              { vy[0]= ym[0];vy[1]=(int) (ym[0] + barlength/2.0) ; }
-              else 
-              { vy[0]= ym[0];vy[1]= (int)(ym[0] - barlength/2.0); }
-              C2F(dr)("xsegs","v", vx, vy, &ns,&ticscolor,&iflag,PI0,PD0,PD0,PD0,PD0,0L,0L);
-            }}
-        } 
-        if ( i == Nx-1 ) 
-        {
-          double dx ; 
-          vxx1= x_convert(xy_type,x,i+1);
-          dx = (vxx1-vxx)/subtics;
-          for ( j = 1 ; j < subtics; j++) {  
-            if ( vxx+dx*j < xmax){
-              vx[0] = vx[1] = XScale(vxx+dx*j);
-              if ( pos == 'd' ) 
-              { vy[0]= ym[0];vy[1]= (int)(ym[0] + barlength/2.0) ; }
-              else 
-              { vy[0]= ym[0];vy[1]= (int)(ym[0] - barlength/2.0); }
-              C2F(dr)("xsegs","v", vx, vy, &ns,&ticscolor,&iflag,PI0,PD0,PD0,PD0,PD0,0L,0L);
-            }}
-        } 
-      }
-      if ( ticscolor != -1 ) C2F(dr)("xset","pattern",&color_kp,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-    }
-    break;
-  case 'r' : 
-  case 'l' :
-
-    /** Vertical axes **/
-    barlength =  (integer) (Cscale.WIRect1[2]/75.0);
-    if (str == NULL &&  format == NULL )  
-      switch (xy_type ) {
-  case 'v' : ChoixFormatE1(c_format,y,Ny);break;
-  case 'r' : ChoixFormatE(c_format,y[0],y[1],(y[1]-y[0])/y[2]);break;
-  case 'i' : 
-    ChoixFormatE (c_format,
-      (y[0] * exp10(y[2])),
-      (y[1] * exp10(y[2])),
-      ((y[1] * exp10(y[2])) - (y[0] * exp10(y[2])))/y[3]); break; /* Adding F.Leray 06.05.04 */
-    }
-    /** the vertical segment **/
-    vy[0] =  YScale(y_convert(xy_type, y , 0));
-    vy[1] =  YScale(y_convert(xy_type, y , Ny-1));
-    vx[0]= vx[1] = xm[0]= XScale(x[0]);
-    if ( seg_flag == 1) 
-    {
-      if ( ticscolor != -1 ) C2F(dr)("xset","pattern",&ticscolor,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-      C2F(dr)("xsegs","v", vx, vy, &ns,&ticscolor,&iflag,PI0,PD0,PD0,PD0,PD0,0L,0L);
-      if ( ticscolor != -1 ) C2F(dr)("xset","pattern",&color_kp,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-    }
-
-    /***   01/07/2002 -> 11 and 12.05.04 ****/
-    psubwin = sciGetCurrentSubWin();
-    if ((pSUBWIN_FEATURE (psubwin)->tight_limits == TRUE || pSUBWIN_FEATURE (psubwin)->isoview == TRUE )
-      && axisbuild_flag == 0){  
-        ymax=Cscale.frect[3];
-        ymin=Cscale.frect[1];
-
-        if(xy_type == 'i')
-        {
-          /*   y[1] = floor(Cscale.frect[3] / (exp10( y[2]))) ;   */
-          /*       y[0] =  ceil(Cscale.frect[1]  / (exp10( y[2]))) ;  */
-
-          y[1] = floor( Cscale.ytics[1] );
-          y[0] =  ceil( Cscale.ytics[0] );
-
-          y[3]=inint(y[1]-y[0]);
-          while (y[3]>10)  y[3]=floor(y[3]/2);
-          Ny=(int)(y[3]+1);
-
-          /* re-compute a format when tight_limits or isoview == ON */
-          ChoixFormatE (c_format,
-            (y[0] * exp10(y[2])),
-            (y[1] * exp10(y[2])),
-            ((y[1] * exp10(y[2])) - (y[0] * exp10(y[2])))/y[3]);
-        }
-        /* THESE 2 last cases are unreachable because we use the condition : */
-        /* axisbuild_flag == 0 */
-        else if (xy_type == 'r') /* normally unreachable */
-        {
-          sciprint(" Normally, unreachable case \n");
-        }
-        else if(xy_type == 'v')  /* normally unreachable */
-        {
-          sciprint(" Normally, unreachable case \n");
-        }
-    }
-
-
-
-    pas = ((double) Cscale.WIRect1[3]) / ((double) Cscale.Waaint1[3]);
-    /** loop on the ticks **/
-    if (Ny==1) break; /*D.Abdemouche 16/12/2003*/
-    for (i=0 ; i < Ny ; i++)
-    { 
-      char foo[100];
-      vxx = y_convert(xy_type,y,i);
-      if ( str != NULL)  
-        sprintf(foo,"%s",str[i]);
-      else if ( format == NULL)
-      { 
-        /* defaults format */
-        /*F.Leray 19.05.04 */
-        /* When Sci_Axis is called by aplotv1, format is NULL : it can not be something else...*/
-        /* format can also be NULL if non specified and coming from ConstructAxes method called in Objdrawaxis (see matdes.c) */
-        sprintf(foo,c_format,vxx);
-      }
-      else{ 
-        sprintf(foo,format,vxx);
-      }
-
-
-      C2F(dr)("xstringl",foo,&xx,&yy,rect,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-
-      /* tick is computed in vx,vy and string is displayed at posi[0],posi[1] position */
-
-      vy[0]= vy[1] = ym[0] = YScale(vxx);
-      posi[1]=inint( ym[0] +rect[3]/2.0);
-      if ( pos == 'r' ) 
-      {
-        posi[0]=inint( xm[0] + 1.2*barlength);
-        vx[0]= xm[0];vx[1]= xm[0]+barlength;
-      }
-      else 
-      { 
-        posi[0]=inint(xm[0] - 1.2*barlength - rect[2]);
-        vx[0]= xm[0];vx[1]= xm[0] - barlength;
-      }
-      if ( textcolor != -1 ) C2F(dr)("xset","pattern",&textcolor,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-      C2F(dr)("xstring",foo,&(posi[0]),&(posi[1]),PI0,&flag,PI0,PI0,&angle, PD0,PD0,PD0,0L,0L);
-      if ( logflag == 'l' )
-      {
-        C2F(dr)("xset","font",fontid,fontid+1,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-        C2F(dr)("xstring","10",(posi[0] -= logrect[2],&posi[0]),
-          (posi[1] += logrect[3],&posi[1]),
-          PI0,&flag,PI0,PI0,&angle,PD0,PD0,PD0,0L,0L);
-        C2F(dr)("xset","font",fontid,&smallersize,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-      }
-      if ( textcolor != -1 ) C2F(dr)("xset","pattern",&color_kp,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-
-      if ( ticscolor != -1 ) C2F(dr)("xset","pattern",&ticscolor,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-      C2F(dr)("xsegs","v", vx, vy, &ns,&ticscolor,&iflag,PI0,PD0,PD0,PD0,PD0,0L,0L);
-      /*** MAJ Djalel.A 21/01/2003 ***/ 
-      if (pSUBWIN_FEATURE (psubwin)->grid[1] > -1 )
-      { /**DJ.Abdemouche 2003**/
-        if(pSUBWIN_FEATURE (psubwin)->logflags[1] == 'l')
-        {
-          if ((vy[0] != Cscale.WIRect1[1]) && (vy[0] != (Cscale.WIRect1[1]+ Cscale.WIRect1[3])))
-          {
-            pstyle=pSUBWIN_FEATURE (psubwin)->grid[1] ;
-            vx[0]=Cscale.WIRect1[0];
-            vx[1]=Cscale.WIRect1[0]+Cscale.WIRect1[2];  
-            C2F(dr)("xget","line style",&verbose,dash,&narg,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-            C2F (dr) ("xset", "line style",&trois,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-            C2F(dr)("xsegs","v", vx, vy, &ns,&pstyle,&iflag,PI0,PD0,PD0,PD0,PD0,0L,0L);
-          }
-
-          if(i < Ny -1 ){
-            int jinit=1;
-            /* In case there is a log. scale, add. sub-grid taking account of this special scale F.Leray 07.05.04 */
-            pstyle=pSUBWIN_FEATURE (psubwin)->grid[1] ;
-            C2F(dr)("xget","line style",&verbose,dash,&narg,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-            C2F (dr) ("xset", "line style",&trois,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-            vx[0]=Cscale.WIRect1[0];
-            vx[1]=Cscale.WIRect1[0]+Cscale.WIRect1[2]; 
-
-            if ( i== Cscale.Waaint1[3]-1 ) jinit=2; /* no grid on plot boundary */
-            for (j= jinit; j < 10 ; j++)
-            {
-              vy[0]=vy[1]= Cscale.WIRect1[1] + inint( ((double) i+1)*pas)- inint(log10(((double)j))*pas);
-              C2F(dr)("xsegs","v", vx, vy, &ns,&pstyle,&iflag,PI0,PD0,PD0,PD0,PD0,0L,0L);
-            }
-            C2F(dr)("xset","line style",dash,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-          }
-        }
-        else  if(pSUBWIN_FEATURE (psubwin)->logflags[1] == 'n'){
-          if ((vy[0] != Cscale.WIRect1[1]) && (vy[0] != (Cscale.WIRect1[1]+ Cscale.WIRect1[3])))
-          {
-            pstyle=pSUBWIN_FEATURE (psubwin)->grid[1] ;
-            vx[0]=Cscale.WIRect1[0];
-            vx[1]=Cscale.WIRect1[0]+Cscale.WIRect1[2];  
-            C2F(dr)("xget","line style",&verbose,dash,&narg,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-            C2F (dr) ("xset", "line style",&trois,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-            C2F(dr)("xsegs","v", vx, vy, &ns,&pstyle,&iflag,PI0,PD0,PD0,PD0,PD0,0L,0L);
-            C2F(dr)("xset","line style",dash,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-          }
-        }
-      }
-      /* subtics */
-      if ( i < Ny-1 ) 
-      {
-        double dy ; 
-        vxx1= y_convert(xy_type,y,i+1);
-        dy = (vxx1-vxx)/subtics;
-        for ( j = 1 ; j < subtics; j++) 
-        {
-          vy[0] = vy[1] = YScale(vxx+dy*j);
-          if ( pos == 'r' ) 
-          { vx[0]= xm[0];vx[1]= (integer) (xm[0] + barlength/2.0) ; }
-          else 
-          { vx[0]= xm[0];vx[1]= (integer) (xm[0] - barlength/2.0) ; }
-          C2F(dr)("xsegs","v", vx, vy, &ns,&ticscolor,&iflag,PI0,PD0,PD0,PD0,PD0,0L,0L);
-        }
-      }
-      /***   01/07/2002 -> 12.05.04 ****/
-      psubwin = sciGetCurrentSubWin();
-      if ( (pSUBWIN_FEATURE (psubwin)->tight_limits == TRUE || pSUBWIN_FEATURE (psubwin)->isoview == TRUE )
-        && axisbuild_flag == 0){
-          if ( i == 0 )  
-          {
-            double dy ; 
-            vxx1= y_convert(xy_type,y,i+1);
-            dy = (vxx1-vxx)/subtics;
-            for ( j = 1 ; j < subtics; j++) {  
-              if ( vxx-dy*j > ymin){
-                vy[0] = vy[1] = YScale(vxx-dy*j);
-                if ( pos == 'r' ) 
-                { vx[0]= xm[0];vx[1]= (int)(xm[0] + barlength/2.0) ; }
-                else 
-                { vx[0]= xm[0];vx[1]= (int) (xm[0] - barlength/2.0); }
-                C2F(dr)("xsegs","v", vx, vy, &ns,&ticscolor,&iflag,PI0,PD0,PD0,PD0,PD0,0L,0L);
-              }}
-          }
-          if ( i == Ny-1 )
-          {
-            double dy ; 
-            vxx1= y_convert(xy_type,y,i+1);
-            dy = (vxx1-vxx)/subtics;
-            for ( j = 1 ; j < subtics; j++) {  
-              if ( vxx+dy*j < ymax){
-                vy[0] = vy[1] = YScale(vxx+dy*j);
-                if ( pos == 'r' ) 
-                { vx[0]= xm[0];vx[1]= (int)(xm[0] + barlength/2.0) ; }
-                else 
-                { vx[0]= xm[0];vx[1]= (int)(xm[0] - barlength/2.0); }
-                C2F(dr)("xsegs","v", vx, vy, &ns,&ticscolor,&iflag,PI0,PD0,PD0,PD0,PD0,0L,0L);
-              }}
-          }  
-      }
-      if ( ticscolor != -1 ) C2F(dr)("xset","pattern",&color_kp,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-    }
-    break;
-    }
-    /* reset font to its current size */ 
-    if ( fontsize != -1 || logflag == 'l' )
-    {
-      fontid[1] = fontsize_kp;
-      C2F(dr)("xset","font",fontid,fontid+1,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-    }
-    /* reset to current color */
-    if ( textcolor != -1 || ticscolor != -1 ) 
-    {
-      C2F(dr)("xset","pattern",&color_kp,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-    }
-
-  }
-
-} 
-
-/* from double to pixel */ 
-
-static double  x_convert(char xy_type, double *x , int i)
-{
-  switch ( xy_type ) { 
-  case 'v' :  return x[i];
-  case 'r' :  return x[0]+i*(x[1]-x[0])/x[2];
-  case 'i' :  return exp10(x[2])*(x[0] + i*(x[1]-x[0])/x[3]);
-  }
-  return 0.0;
-}
-
-static double y_convert(char xy_type, double *y , int i)
-{
-  switch ( xy_type ) { 
-  case 'v' :  return y[i]; 
-  case 'r' :  return y[0]+i*(y[1]-y[0])/y[2];
-  case 'i' :  return exp10(y[2])*(y[0] + i*(y[1]-y[0])/y[3]); 
-  }
-  return 0.0; 
-}
-
-static void axesplot(char * strflag, sciPointObj * psubwin)
+/*--------------------------------------------------------------------------------*/
+/* clear a subwindow from all of its children */
+void clearSubWin( sciPointObj * pSubWin )
 {
-  char dir = 'l';
-  char c = (strlen(strflag) >= 3) ? strflag[2] : '1';
-  int seg=0;
-  int fontsize = -1 ,textcolor = -1 ,ticscolor = -1 ; /* default values */
-  int fontstyle= 0;
-  double  x1,y1_;
-  char xstr,ystr; 
-  char dirx = 'd';
-
-
-  int lastxindex = 0, lastyindex = 0;
-  sciSubWindow * ppsubwin = pSUBWIN_FEATURE(psubwin);
-
-  if( ppsubwin->tight_limits == TRUE || ppsubwin->isoview == TRUE)
-    {
-      switch ( c )
-       {
-       case '3' : /* right axis */
-         x1= ppsubwin->axes.xlim[1];
-         y1_= ppsubwin->axes.ylim[0];
-         dir = 'r';
-         break;
-       case '4' : /* centred axis */
-         seg=1;
-         x1= (ppsubwin->axes.xlim[0]+ppsubwin->axes.xlim[1])/2.0;
-         y1_= (ppsubwin->axes.ylim[0]+ppsubwin->axes.ylim[1])/2.0;
-         break ;
-       case '5': /* centred at (0,0) */
-         seg=1;
-         x1 = y1_ = 0.0;
-         break;
-       case '1' : /* left axis */
-       default :
-         x1=  ppsubwin->axes.xlim[0];
-         y1_=  ppsubwin->axes.ylim[1];
-         break;
-       }
-    }
-  else  /* tight_limits == FALSE */
-    {
-      lastxindex = ppsubwin->axes.nxgrads - 1;
-      lastyindex = ppsubwin->axes.nygrads - 1;
-     
-        switch ( c )
-       {
-       case '3' : /* right axis */
-         x1= ppsubwin->axes.xgrads[lastxindex];
-         y1_= ppsubwin->axes.ygrads[0];
-         dir = 'r';
-         break;
-       case '4' : /* centred axis */
-         seg=1;
-         x1= (ppsubwin->axes.xgrads[0]+ppsubwin->axes.xgrads[lastxindex])/2.0;
-         y1_= (ppsubwin->axes.ygrads[0]+ppsubwin->axes.ygrads[lastyindex])/2.0;
-         break ;
-       case '5': /* centred at (0,0) */
-         seg=1;
-         x1 = y1_ = 0.0;
-         break;
-       case '1' : /* left axis */
-       default :
-         x1= ppsubwin->axes.xgrads[0];
-         y1_= ppsubwin->axes.ygrads[0];
-       break;
-       }
-    }
-       
-
-
-  if(ppsubwin->tight_limits == TRUE || ppsubwin->isoview == TRUE)
-    {
-      if (c != '4')
-       {
-         xstr=ppsubwin->axes.xdir;
-         if(ppsubwin->axes.reverse[1] == FALSE)
-           { /* y reverse axis : NO */
-             switch (xstr)
-               {
-               case 'u':
-                 y1_= ppsubwin->axes.ylim[1];
-                 dirx='u';
-                 break;
-               case 'c':
-                 y1_= (ppsubwin->axes.ylim[0]>0.0)?ppsubwin->axes.ylim[0]:0.0;
-                 y1_= (ppsubwin->axes.ylim[1]<0.0)?ppsubwin->axes.ylim[0]:y1_;
-                 seg =1;
-                 dirx ='d';
-                 break;
-               default :
-                 y1_= ppsubwin->axes.ylim[0];
-                 dirx ='d';
-                 break;
-               }
-           }
-         else
-           { /* y reverse axis : YES */
-             switch (xstr)
-               {
-               case 'u':
-                 y1_= ppsubwin->axes.ylim[0];
-                 dirx='u';
-                 break;
-               case 'c':
-                 y1_= (ppsubwin->axes.ylim[0]>0.0)?ppsubwin->axes.ylim[0]:0.0;
-                 y1_= (ppsubwin->axes.ylim[1]<0.0)?ppsubwin->axes.ylim[0]:y1_;
-                 seg =1;
-                 dirx ='d';
-                 break;
-               default :
-                 y1_= ppsubwin->axes.ylim[1];
-                 dirx ='d';
-                 break;
-               }
-           }
-
-         ystr=ppsubwin->axes.ydir;
-         if(ppsubwin->axes.reverse[0] == FALSE)
-           { /* x reverse axis : NO */
-             switch (ystr)
-               {
-               case 'r':
-                 x1= ppsubwin->axes.xlim[1];
-                 dir='r';
-                 break;
-               case 'c':
-                 x1=(ppsubwin->axes.xlim[0]>0.0)?ppsubwin->axes.xlim[0]:0.0;
-                 x1=(ppsubwin->axes.xlim[1]<0.0)?ppsubwin->axes.xlim[0]:x1;
-                 seg =1;
-                 dir ='l';
-                 break;
-               default :
-                 x1= ppsubwin->axes.xlim[0];
-                 dir ='l';
-                 break;
-               }
-           }
-         else
-           { /* x reverse axis : YES */
-             switch (ystr)
-               {
-               case 'r':
-                 x1= ppsubwin->axes.xlim[0];
-                 dir='r';
-                 break;
-               case 'c':
-                 x1=(ppsubwin->axes.xlim[0]>0.0)?ppsubwin->axes.xlim[0]:0.0;
-                 x1=(ppsubwin->axes.xlim[1]<0.0)?ppsubwin->axes.xlim[0]:x1;
-                 seg =1;
-                 dir ='l';
-                 break;
-               default :
-                 x1= ppsubwin->axes.xlim[1];
-                 dir ='l';
-                 break;
-               }
-           }
-       }
-    }
-  else  /* tight_limits == FALSE */
-    {
-      lastxindex = ppsubwin->axes.nxgrads - 1;
-      lastyindex = ppsubwin->axes.nygrads - 1;
-      
-      if (c != '4')
-       {
-         xstr=ppsubwin->axes.xdir;
-         if(ppsubwin->axes.reverse[1] == FALSE)
-           { /* y reverse axis : NO */
-             switch (xstr)
-               {
-               case 'u':
-                 y1_=ppsubwin->axes.ygrads[lastyindex];
-                 dirx='u';
-                 break;
-               case 'c':
-                 y1_=(ppsubwin->axes.ygrads[0]>0.0)?ppsubwin->axes.ygrads[0]:0.0;
-                 y1_=(ppsubwin->axes.ygrads[lastyindex]<0.0)?ppsubwin->axes.ygrads[0]:y1_;
-                 seg =1;
-                 dirx ='d';
-             break;
-               default :
-                 y1_= ppsubwin->axes.ygrads[0];
-                 dirx ='d';
-                 break;
-               }
-           }
-         else
-           { /* y reverse axis : YES */
-             switch (xstr)
-               {
-               case 'u':
-                 y1_=ppsubwin->axes.ygrads[0];
-                 dirx='u';
-                 break;
-               case 'c':
-                 y1_=(ppsubwin->axes.ygrads[0]>0.0)?ppsubwin->axes.ygrads[0]:0.0;
-                 y1_=(ppsubwin->axes.ygrads[lastyindex]<0.0)?ppsubwin->axes.ygrads[0]:y1_;
-                 seg =1;
-                 dirx ='d';
-                 break;
-               default :
-                 y1_= ppsubwin->axes.ygrads[lastyindex];
-                 dirx ='d';
-                 break;
-               }
-           }
-         
-         ystr=ppsubwin->axes.ydir;
-         if(ppsubwin->axes.reverse[0] == FALSE)
-           { /* x reverse axis : NO */
-             switch (ystr)
-               {
-               case 'r':
-                 x1= ppsubwin->axes.xgrads[lastxindex];
-                 dir='r';
-                 break;
-               case 'c':
-                 x1=(ppsubwin->axes.xgrads[0]>0.0)?ppsubwin->axes.xgrads[0]:0.0;
-                 x1=(ppsubwin->axes.xgrads[lastxindex]<0.0)?ppsubwin->axes.xgrads[0]:x1;
-                 seg =1;
-                 dir ='l';
-                 break;
-               default :
-                 x1= ppsubwin->axes.xgrads[0];
-                 dir ='l';
-                 break;
-               }
-           }
-         else
-           { /* x reverse axis : YES */
-             switch (ystr)
-               {
-               case 'r':
-                 x1= ppsubwin->axes.xgrads[0];
-                 dir='r';
-                 break;
-               case 'c':
-                 x1=(ppsubwin->axes.xgrads[0]>0.0)?ppsubwin->axes.xgrads[0]:0.0;
-                 x1=(ppsubwin->axes.xgrads[lastxindex]<0.0)?ppsubwin->axes.xgrads[0]:x1;
-                 seg =1;
-                 dir ='l';
-                 break;
-               default :
-                 x1= ppsubwin->axes.xgrads[lastxindex];
-                 dir ='l';
-                 break;
-               }
-           }
-       }
-    }
-  
-  ticscolor=sciGetForeground(psubwin);
-  textcolor=sciGetFontForeground(psubwin);
-  fontsize=sciGetFontDeciWidth(psubwin)/100;
-  fontstyle=sciGetFontStyle(psubwin);
-  /** x-axis **/
-  SciAxisNew(dirx,psubwin,y1_,fontsize,fontstyle,textcolor,ticscolor,seg);
-  
-  /** y-axis **/
-  SciAxisNew(dir,psubwin,x1,fontsize,fontstyle,textcolor,ticscolor,seg);
-
-  /* Once the 2 axes are plotted, we can draw :
-     1. the axes lines
-     2. the box lines over if necessary (i.e. seg == 1) */
-  if ( ppsubwin->axes.axes_visible[0] )
-  {
-    SciDrawLines(dirx,psubwin,y1_,textcolor,ticscolor);
-  }
-  SciDrawLines(dir, psubwin,x1,textcolor,ticscolor);
-  
+  sciSons * curSon = sciGetSons (pSubWin);
   
-  if ( c != '4' && c != '5' )
+  while ( curSon != NULL && curSon->pointobj != NULL )
   {
-    if ( sciGetBoxType(psubwin) == BT_OFF || sciGetBoxType(psubwin) == BT_HIDDEN_AXIS )
+    if ( curSon->pointobj->entitytype != SCI_LABEL )
     {
-      seg = 1 ;
+      DestroyAllGraphicsSons (curSon->pointobj) ;
+      curSon = sciGetSons ( pSubWin ) ;
     }
     else
     {
-      /** frame rectangle **/
-      C2F(dr)("xrect","v",&Cscale.WIRect1[0],&Cscale.WIRect1[1],&Cscale.WIRect1[2],&Cscale.WIRect1[3], 
-             PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
+      curSon = curSon->pnext ;
     }
+    
   }
 }
-
-
-/****************************************************************************/
-/********************************** COMMON to X and Y ***********************/
-/****************************************************************************/
-
-
-int SciDrawLines(char pos, sciPointObj * psubwin, double xy, int textcolor,int ticscolor)
+/*--------------------------------------------------------------------------------*/
+/* reinit a subwindow (but don't change position ) */
+void reinitSubWin( sciPointObj * pSubWin )
 {
-  double xminval, yminval, xmaxval, ymaxval;
-  int verbose = 0, narg, color_kp;
-
-  if ( textcolor != -1 || ticscolor != -1 ) 
-    {
-      C2F(dr)("xget","pattern",&verbose,&color_kp,&narg,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-    }
+  sciSubWindow * ppSubWin  = pSUBWIN_FEATURE (pSubWin) ;
   
-  FindXYMinMaxAccordingTL(psubwin,&xminval,&yminval,&xmaxval,&ymaxval);
-
-  if(pos=='u' || pos=='d'){ /* X */
-    if( pSUBWIN_FEATURE (psubwin)->axes.axes_visible[0] == TRUE )
-      XDrawAxisLine(xminval,xmaxval,xy,ticscolor,color_kp);
-  } else if(pos=='l' || pos=='r'){ /* Y */
-    if(pSUBWIN_FEATURE (psubwin)->axes.axes_visible[1] == TRUE)
-      YDrawAxisLine(yminval,ymaxval,xy,ticscolor,color_kp);
-  }
+  clearSubWin(   pSubWin ) ;
+  initSubWinBounds( pSubWin ) ;
+  ppSubWin->axes.xdir = 'd' ;
+  ppSubWin->axes.ydir = 'l' ;
   
+  ppSubWin->visible = TRUE;
   
+  initSubWinAngles( pSubWin ) ;
   
+  ppSubWin->FirstPlot = TRUE;
   
-  return 0;
-}
 
-/****************************************************************************/
-/********************************** X ***************************************/
-/****************************************************************************/
+}
+/*--------------------------------------------------------------------------------*/
+/* reinit the viewing angles of a subwindow */
+void initSubWinAngles( sciPointObj * pSubWin )
+{
+  sciSubWindow * ppSubWin  = pSUBWIN_FEATURE (pSubWin ) ;
+  sciSubWindow * ppAxesMdl = pSUBWIN_FEATURE (getAxesModel()) ;
+  ppSubWin->is3d     = ppAxesMdl->is3d     ;
+  ppSubWin->alpha_kp = ppAxesMdl->alpha_kp ;
+  ppSubWin->theta_kp = ppAxesMdl->theta_kp ;
+  ppSubWin->alpha    = ppAxesMdl->alpha    ;
+  ppSubWin->theta    = ppAxesMdl->theta    ;
+}
 
+/*--------------------------------------------------------------------------------*/
+/* set the size and position of the subwindow to the default */
+void initSubWinSize( sciPointObj * pSubWin )
+{
+  sciSubWindow * ppSubWin  = pSUBWIN_FEATURE (pSubWin ) ;
+  sciSubWindow * ppAxesMdl = pSUBWIN_FEATURE (getAxesModel()) ;
+  ppSubWin->WRect[0] = ppAxesMdl->WRect[0] ;
+  ppSubWin->WRect[1] = ppAxesMdl->WRect[1] ;
+  ppSubWin->WRect[2] = ppAxesMdl->WRect[2] ;
+  ppSubWin->WRect[3] = ppAxesMdl->WRect[3] ;
 
-static int DrawXSubTics(char pos, sciPointObj * psubwin, double xy,int ticscolor,int color_kp)
+}
+/*--------------------------------------------------------------------------------*/
+/* set the data_bounds of the axes to the default value */
+void initSubWinBounds( sciPointObj * pSubWin )
 {
-  sciSubWindow * ppsubwin = pSUBWIN_FEATURE(psubwin);
-  double xminval,yminval,xmaxval,ymaxval;
-   
-  int vx[2],vy[2],ym[2];
-  int barlength = 0;
-  int ns=2,iflag=0;
-  
-  int nbtics = 0,i,j;
-  int nbsubtics = ppsubwin->axes.nbsubtics[0];
-  char logflag = ppsubwin->logflags[0];
-  
-  double *grads = (double *) NULL;
+  sciSubWindow * ppSubWin  = pSUBWIN_FEATURE (pSubWin ) ;
+  sciSubWindow * ppAxesMdl = pSUBWIN_FEATURE (getAxesModel()) ;
+  ppSubWin->FRect[0] = ppAxesMdl->FRect[0] ;
+  ppSubWin->FRect[1] = ppAxesMdl->FRect[1] ;
+  ppSubWin->FRect[2] = ppAxesMdl->FRect[2] ;
+  ppSubWin->FRect[3] = ppAxesMdl->FRect[3] ;
+  ppSubWin->FRect[4] = ppAxesMdl->FRect[4] ;
+  ppSubWin->FRect[5] = ppAxesMdl->FRect[5] ;
 
-  ym[0] = YScale(xy);
-   
-  barlength =  (integer) (Cscale.WIRect1[3]/50.0);
+  ppSubWin->SRect[0] = ppAxesMdl->SRect[0] ;
+  ppSubWin->SRect[1] = ppAxesMdl->SRect[1] ;
+  ppSubWin->SRect[2] = ppAxesMdl->SRect[2] ;
+  ppSubWin->SRect[3] = ppAxesMdl->SRect[3] ;
+  ppSubWin->SRect[4] = ppAxesMdl->SRect[4] ;
+  ppSubWin->SRect[5] = ppAxesMdl->SRect[5] ;
+}
+/*--------------------------------------------------------------------------------*/
+/* reinit the selected subwindow if the auto_clear property is set to on */
+/* return TRUE if the window has been redrawn */
+BOOL checkRedrawing( void )
+{
   
-  FindXYMinMaxAccordingTL(psubwin,&xminval,&yminval,&xmaxval,&ymaxval); /* here i only need x data (ymin ymax are computed but not used after) */
-
-  if(ppsubwin->axes.auto_ticks[0] == FALSE){
-    grads =  ppsubwin->axes.u_xgrads;
-    nbtics = ppsubwin->axes.u_nxgrads;
-  }
-  else{
-    grads =  ppsubwin->axes.xgrads;
-    nbtics = ppsubwin->axes.nxgrads;
+  sciPointObj * pSubWin = sciGetCurrentSubWin() ;
+  if ( !sciGetAddPlot( pSubWin ) )
+  {
+      /* redraw the axis */
+      reinitSubWin( pSubWin ) ;
+      return TRUE ;
   }
-  
-  
-  if(logflag =='l')
-    {
-      double tmp[2];
-      double pas=0;
-      double * tmp_log_grads = (double *) NULL;
-      
-      for(i=0;i<nbtics-1;i++)
-       {
-         int k;
-         tmp[0] = exp10(grads[i]);
-         tmp[1] = exp10(grads[i+1]);
-         pas = (exp10(grads[i+1]) - exp10(grads[i])) / (nbsubtics );
-         
-         if((tmp_log_grads = (double *)MALLOC(nbsubtics*sizeof(double)))==NULL){
-           sciprint("Error allocating tmp_log_grads\n");
-           return -1;
-         }
-         
-         for(k=0;k<nbsubtics;k++) tmp_log_grads[k] = log10(tmp[0]+(k)*pas);
-         
-         for(j=0;j<nbsubtics;j++)
-           {
-             double val = tmp_log_grads[j];
-              /* the length of the ticks in pixels */
-              /* minimum 2 pixels */
-              /* use of integer division for speed */
-              int ticksLength =  Max( ( 3 * barlength ) / 4,  2 ) ;
-             vx[0] = vx[1] = XScale(val);
-             
-             if(val<xminval || val>xmaxval) continue;     
-             
-             if ( pos == 'd' ) 
-              { 
-                vy[0] = ym[0] ;
-                vy[1] = ym[0] + ticksLength ; 
-              }
-             else 
-              { 
-                vy[0] = ym[0] ; 
-                vy[1] = ym[0] - ticksLength ;
-              }
-              if ( ppsubwin->axes.axes_visible[0] )
-              {
-                C2F(dr)("xsegs","v", vx, vy, &ns,&ticscolor,&iflag,PI0,PD0,PD0,PD0,PD0,0L,0L);
-              }
-           }
-         
-         FREE(tmp_log_grads); tmp_log_grads = NULL;
-       }
-    }
-  else
-    {
-      for(i=0;i<nbtics-1;i++)
-       {
-         double xtmp = grads[i];
-         double dx = (grads[i+1]-grads[i]) / nbsubtics;
-         for( j = 0 ; j < nbsubtics ; j++ )
-           {
-             double val = xtmp+dx*j;
-              /* the length of the ticks in pixels */
-              /* minimum 2 pixels */
-              /* use of integer division for speed */
-              int ticksLength =  Max( ( 3 * barlength ) / 4,  2 ) ;
-             vx[0] = vx[1] = XScale(val);
-             
-             if(val<xminval || val>xmaxval) continue;     
-             
-             if ( pos == 'd' ) 
-             {
-                
-                vy[0]= ym[0];
-                vy[1]= ym[0] + ticksLength ; 
-              }
-             else 
-              { 
-                vy[0]= ym[0];
-                vy[1]= ym[0] - ticksLength ; 
-              }
-              if ( ppsubwin->axes.axes_visible[0] )
-              {
-                C2F(dr)("xsegs","v", vx, vy, &ns,&ticscolor,&iflag,PI0,PD0,PD0,PD0,PD0,0L,0L);
-              }
-           }
-       }
-    }
-  
-  return 0;
-}
-
-
-static int DrawXGrid(sciPointObj * psubwin)
-{
-  sciSubWindow * ppsubwin = pSUBWIN_FEATURE(psubwin);
-  double xminval,yminval,xmaxval,ymaxval;
-  int verbose=0,narg;
-
-  int vx[2],vy[2],ym[2];
-  int dash[6],lineMode=2;
-  int ns=2,style=0,iflag=0;
-  
-  double * grads = (double *) NULL;
-  int nbtics = 0,i,j;
-  int nbsubtics = ppsubwin->axes.nbsubtics[0];
-  char logflag = ppsubwin->logflags[0];
-   
-  FindXYMinMaxAccordingTL(psubwin,&xminval,&yminval,&xmaxval,&ymaxval);
-  
-  
-  ym[0] = YScale(yminval);
-  ym[1] = YScale(ymaxval);
-
-  if(ppsubwin->axes.auto_ticks[0] == FALSE){
-    grads =  ppsubwin->axes.u_xgrads;
-    nbtics = ppsubwin->axes.u_nxgrads;
-  }
-  else{
-    grads =  ppsubwin->axes.xgrads;
-    nbtics = ppsubwin->axes.nxgrads;
-  }
-  
-  /* Grid style */
-  C2F(dr)("xget","line style",&verbose,dash,&narg,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F (dr) ("xset", "line style",&lineMode,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  style = ppsubwin->grid[0];
-  
-  /* Grid based on tics */
-  for(i=0;i<nbtics;i++)
-    {
-      double xtmp = grads[i];
-      vx[0] = vx[1] = XScale(xtmp);
-      
-      if(xtmp<xminval || xtmp>xmaxval) continue;          
-      
-      vy[0]= ym[0];vy[1]=  ym[1];
-      if ( ppsubwin->axes.axes_visible[0] )
-      {
-        C2F(dr)("xsegs","v", vx, vy, &ns,&style,&iflag,PI0,PD0,PD0,PD0,PD0,0L,0L);
-      }
-    }
-  
-  /* Grid based on subtics : ONLY for log. case */
-  if(logflag =='l')
-    {
-      double tmp[2];
-      double pas=0;
-      double * tmp_log_grads = (double *) NULL;
-      
-      for(i=0;i<nbtics-1;i++)
-       {
-         int k;
-         tmp[0] = exp10(grads[i]);
-         tmp[1] = exp10(grads[i+1]);
-         pas = (exp10(grads[i+1]) - exp10(grads[i])) / (nbsubtics );
-         
-         if((tmp_log_grads = (double *)MALLOC(nbsubtics*sizeof(double)))==NULL){
-           sciprint("Error allocating tmp_log_grads\n");
-           return -1;
-         }
-         
-         for(k=0;k<nbsubtics;k++) tmp_log_grads[k] = log10(tmp[0]+(k)*pas);
-         
-         for(j=0;j<nbsubtics;j++)
-           {
-             double val = tmp_log_grads[j];
-             vx[0] = vx[1] = XScale(val);
-             
-             if(val<xminval || val>xmaxval) continue;    
-             
-             vy[0]= ym[0];vy[1]=  ym[1];
-             if ( ppsubwin->axes.axes_visible[0] )
-              {
-                C2F(dr)("xsegs","v", vx, vy, &ns,&style,&iflag,PI0,PD0,PD0,PD0,PD0,0L,0L);
-              }
-           }
-         
-         FREE(tmp_log_grads); tmp_log_grads = NULL;
-       }
-    }
-  /* return to solid mode (in default mode) */
-  C2F(dr)("xset","line style",dash,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  
-
-  return 0;
-}
-
-
-
-static void DrawXTics(char pos, sciPointObj * psubwin, double xy, char * c_format, int * fontid, int textcolor,int ticscolor,int color_kp, int *logrect, int smallersize)
-{
-  sciSubWindow * ppsubwin = pSUBWIN_FEATURE(psubwin);
-  double xminval,yminval,xmaxval,ymaxval;
-  int  flag=0,xx=0,yy=0,rect[4];
-  
-  int vx[2],vy[2],xm[2],ym[2];
-  int barlength = 0;
-  int posi[2];
-  double angle=0.0;
-  int ns=2,iflag=0;
-  
-  int nbtics = 0,i;
-  char logflag = ppsubwin->logflags[0];
-
-  ym[0] = YScale(xy);
-  barlength =  Max( (integer) (Cscale.WIRect1[3]/50.0), 2 ) ;
-  
-  /*ppsubwin->firsttime_x = TRUE;*/
-  
-  if(ppsubwin->axes.auto_ticks[0] == FALSE)
-    {
-      /* we display the x tics specified by the user*/
-      FindXYMinMaxAccordingTL(psubwin,&xminval,&yminval,&xmaxval,&ymaxval); /* here i only need x data (ymin ymax are computed but not used after) */
-      nbtics = ppsubwin->axes.u_nxgrads;
-      
-      for(i=0;i<nbtics;i++)
-       {
-         double xtmp = ppsubwin->axes.u_xgrads[i];
-         char *foo = ppsubwin->axes.u_xlabels[i];
-         
-         if(xtmp<xminval || xtmp>xmaxval) continue; /* cas ou TL est ON et on a des graduations qui ne seront pas affichées de tte facon */
-                                                    /* donc autant ne pas aller plus loin dans l'algo... */
-         
-
-         /***************************************************************/
-         /************************* COMMON PART *************************/
-         /***************************************************************/
-         
-         C2F(dr)("xstringl",foo,&xx,&yy,rect,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-         /* tick is computed in vx,vy and string is displayed at posi[0],posi[1] position */
-         
-         vx[0] = vx[1] = xm[0] =  XScale(xtmp);
-         posi[0] = inint( xm[0] -rect[2]/2.0);
-         
-         if ( pos == 'd')
-           {
-             posi[1]=inint( ym[0] + 1.2*barlength + rect[3]);
-             vy[0]= ym[0];vy[1]= ym[0] + barlength ;
-           }
-         else 
-           {
-             posi[1]=inint( ym[0] - 1.2*barlength);
-             vy[0]= ym[0];vy[1]= ym[0] - barlength;
-           }
-          
-         if ( ppsubwin->axes.axes_visible[0] )
-          {
-            if ( textcolor != -1 ) C2F(dr)("xset","pattern",&textcolor,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-         
-            C2F(dr)("xset","font",fontid,fontid+1,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-            
-            C2F(dr)("xstring",foo,&(posi[0]),&(posi[1]),PI0,&flag,PI0,PI0,&angle, PD0,PD0,PD0,0L,0L);
-          }
-         XGradPosition(psubwin,posi[1],rect[3]);
-
-          if ( ppsubwin->axes.axes_visible[0] )
-          {
-            if ( textcolor != -1 ) C2F(dr)("xset","pattern",&color_kp,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-            if ( ticscolor != -1 ) C2F(dr)("xset","pattern",&ticscolor,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-            
-            /* le tic proprement dit ("petit baton") */
-            C2F(dr)("xsegs","v", vx, vy, &ns,&ticscolor,&iflag,PI0,PD0,PD0,PD0,PD0,0L,0L);
-          }
-         if ( ticscolor != -1 ) C2F(dr)("xset","pattern",&color_kp,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-         
-         /***************************************************************/
-         /************************* END COMMON PART *********************/
-         /***************************************************************/
-         
-       }
-      
-    }
-  else
-    {
-      
-      FindXYMinMaxAccordingTL(psubwin,&xminval,&yminval,&xmaxval,&ymaxval); /* here i only need x data (ymin ymax are computed but not used after) */
-      nbtics = ppsubwin->axes.nxgrads;
-      
-
-      for(i=0;i<nbtics;i++)
-       {
-         char foo[256]; 
-         double xtmp = ppsubwin->axes.xgrads[i];
-          
-          /* chack that xtmp < xminval || xtmp > xmalval */
-          /* but if xtmp is very close to xminval or xmaxval we display it */
-          if ( !SAFE_LT( xminval, xtmp, EPSILON ) || !SAFE_LT( xtmp, xmaxval, EPSILON ) )
-          {
-            continue ;
-          }
-
-         sprintf(foo,c_format,xtmp);
-         
-         /***************************************************************/
-         /************************* COMMON PART *************************/
-         /***************************************************************/
-
-         C2F(dr)("xstringl",foo,&xx,&yy,rect,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-         /* tick is computed in vx,vy and string is displayed at posi[0],posi[1] position */
-         
-         vx[0] = vx[1] = xm[0] =  XScale(xtmp);
-         posi[0] = inint( xm[0] -rect[2]/2.0);
-         
-         if ( pos == 'd')
-           {
-             posi[1]=inint( ym[0] + 1.2*barlength + rect[3]);
-             vy[0]= ym[0];vy[1]= ym[0] + barlength ;
-           }
-         else 
-           {
-             posi[1]=inint( ym[0] - 1.2*barlength);
-             vy[0]= ym[0];vy[1]= ym[0] - barlength;
-           }
-         
-         if ( ppsubwin->axes.axes_visible[0] )
-          {
-            if ( textcolor != -1 ) C2F(dr)("xset","pattern",&textcolor,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-
-            
-            C2F(dr)("xstring",foo,&(posi[0]),&(posi[1]),PI0,&flag,PI0,PI0,&angle, PD0,PD0,PD0,0L,0L);
-          }
-         XGradPosition(psubwin,posi[1],rect[3]);
-         if ( logflag == 'l' )
-           {
-              if ( ppsubwin->axes.axes_visible[0] )
-              {
-                C2F(dr)("xset","font",fontid,fontid+1,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-                
-                C2F(dr)("xstring","10",(posi[0] -= logrect[2],&posi[0]),
-                        (posi[1] += logrect[3],&posi[1]),
-                        PI0,&flag,PI0,PI0,&angle,PD0,PD0,PD0,0L,0L);
-              }
-             XGradPosition(psubwin,posi[1],rect[3]);
-              if ( ppsubwin->axes.axes_visible[0] )
-              {
-                C2F(dr)("xset","font",fontid,&smallersize,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-              }
-           }
-          if ( ppsubwin->axes.axes_visible[0] )
-          {
-            if ( textcolor != -1 ) C2F(dr)("xset","pattern",&color_kp,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-            if ( ticscolor != -1 )
-            {
-              C2F(dr)("xset","pattern",&ticscolor,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-            }
-            
-            /* le tic proprement dit ("petit baton") */
-           C2F(dr)("xsegs","v", vx, vy, &ns,&ticscolor,&iflag,PI0,PD0,PD0,PD0,PD0,0L,0L); 
-            
-            if ( ticscolor != -1 ) C2F(dr)("xset","pattern",&color_kp,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-          }
-         /***************************************************************/
-         /************************* END COMMON PART *********************/
-         /***************************************************************/
-
-
-       }
-      
-
-    }
-
-}
-
-
-/****************************************************************************/
-/********************************** Y ***************************************/
-/****************************************************************************/
-
-
-
-static int DrawYSubTics(char pos, sciPointObj * psubwin, double xy,int ticscolor,int color_kp)
-{
-  sciSubWindow * ppsubwin = pSUBWIN_FEATURE(psubwin);
-  double xminval,yminval,xmaxval,ymaxval;
-
-  int vx[2],vy[2],xm[2];
-  int barlength = 0;
- int ns=2,iflag=0;
-  
-  int nbtics = 0,i,j;
-  int nbsubtics = ppsubwin->axes.nbsubtics[1];
-  char logflag = ppsubwin->logflags[1];
-  
-  double *grads = (double *) NULL;
-
-  xm[0] = XScale(xy);
-   
-  barlength =  (integer) (Cscale.WIRect1[2]/75.0);
-  
-  FindXYMinMaxAccordingTL(psubwin,&xminval,&yminval,&xmaxval,&ymaxval); /* here i only need x data (ymin ymax are computed but not used after) */
-
-  if(ppsubwin->axes.auto_ticks[1] == FALSE){
-    grads =  ppsubwin->axes.u_ygrads;
-    nbtics = ppsubwin->axes.u_nygrads;
-  }
-  else{
-    grads =  ppsubwin->axes.ygrads;
-    nbtics = ppsubwin->axes.nygrads;
-  }
-  
-  
-  if(logflag =='l')
-    {
-      double tmp[2];
-      double pas=0;
-      double * tmp_log_grads = (double *) NULL;
-      
-      for(i=0;i<nbtics-1;i++)
-       {
-         int k;
-         tmp[0] = exp10(grads[i]);
-         tmp[1] = exp10(grads[i+1]);
-         pas = (exp10(grads[i+1]) - exp10(grads[i])) / (nbsubtics );
-         
-         if((tmp_log_grads = (double *)MALLOC(nbsubtics*sizeof(double)))==NULL){
-           sciprint("Error allocating tmp_log_grads\n");
-           return -1;
-         }
-         
-         for(k=0;k<nbsubtics;k++) tmp_log_grads[k] = log10(tmp[0]+(k)*pas);
-         
-         for(j=0;j<nbsubtics;j++)
-           {
-             double val = tmp_log_grads[j];
-              /* the length of the ticks in pixels */
-              /* minimum 2 pixels */
-              /* use of integer division for speed */
-              int ticksLength =  Max( ( 3 * barlength ) / 4,  1 ) ;
-             vy[0] = vy[1] = YScale(val);
-             
-             if(val<yminval || val>ymaxval) continue;     
-             
-             if ( pos == 'r' ) 
-              { 
-                vx[0] = xm[0] ;
-                vx[1] = xm[0] + ticksLength ; 
-              }
-             else 
-              { 
-                vx[0] = xm[0] ;
-                vx[1] = xm[0] - ticksLength ; 
-              }
-              if ( ppsubwin->axes.axes_visible[1] )
-              {
-                C2F(dr)("xsegs","v", vx, vy, &ns,&ticscolor,&iflag,PI0,PD0,PD0,PD0,PD0,0L,0L);
-              }
-           }
-         
-         FREE(tmp_log_grads); tmp_log_grads = NULL;
-       }
-    }
-  else
-    {
-      for(i=0;i<nbtics-1;i++)
-       {
-         double xtmp = grads[i];
-         double dx = (grads[i+1]-grads[i]) / nbsubtics;
-         for(j=0;j<nbsubtics;j++)
-           {
-             double val = xtmp+dx*j;
-              /* the length of the ticks in pixels */
-              /* minimum 2 pixels */
-              /* use of integer division for speed */
-              int ticksLength =  Max( ( 3 * barlength ) / 4, 1 ) ;
-             vy[0] = vy[1] = YScale(val);
-             
-             if(val<yminval || val>ymaxval) continue;     
-             
-             if ( pos == 'r' ) 
-              { 
-                vx[0] = xm[0] ;
-                vx[1]=  xm[0] + ticksLength ; 
-              }
-             else 
-              { 
-                vx[0] = xm[0] ;
-                vx[1] = xm[0] - ticksLength ; 
-              }
-              if ( ppsubwin->axes.axes_visible[1] )
-              {
-                C2F(dr)("xsegs","v", vx, vy, &ns,&ticscolor,&iflag,PI0,PD0,PD0,PD0,PD0,0L,0L);
-              }
-           }
-       }
-    }
-  
-  return 0;
-}
-
-
-static int DrawYGrid(sciPointObj * psubwin)
-{
-  sciSubWindow * ppsubwin = pSUBWIN_FEATURE(psubwin);
-  double xminval,yminval,xmaxval,ymaxval;
-  int verbose=0,narg;
-
-  int vx[2],vy[2],xm[2];
-  int dash[6],lineMode=2;
-  int ns=2,style=0,iflag=0;
-  
-  double * grads = (double *) NULL;
-  int nbtics = 0,i,j;
-  int nbsubtics = ppsubwin->axes.nbsubtics[1];
-  char logflag = ppsubwin->logflags[1];
-   
-  FindXYMinMaxAccordingTL(psubwin,&xminval,&yminval,&xmaxval,&ymaxval);
-  
-  
-  xm[0] = XScale(xminval);
-  xm[1] = XScale(xmaxval);
-
-  if(ppsubwin->axes.auto_ticks[1] == FALSE){
-    grads =  ppsubwin->axes.u_ygrads;
-    nbtics = ppsubwin->axes.u_nygrads;
-  }
-  else{
-    grads =  ppsubwin->axes.ygrads;
-    nbtics = ppsubwin->axes.nygrads;
-  }
-  
-  /* Grid style */
-  C2F(dr)("xget","line style",&verbose,dash,&narg,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F (dr) ("xset", "line style",&lineMode,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  style = ppsubwin->grid[1];
-  
-  /* Grid based on tics */
-  for(i=0;i<nbtics;i++)
-    {
-      double xtmp = grads[i];
-      vy[0] = vy[1] = YScale(xtmp);
-      
-      if(xtmp<yminval || xtmp>ymaxval) continue;          
-      
-      vx[0]= xm[0];vx[1]=  xm[1];
-      if ( ppsubwin->axes.axes_visible[1] )
-      {
-        C2F(dr)("xsegs","v", vx, vy, &ns,&style,&iflag,PI0,PD0,PD0,PD0,PD0,0L,0L);
-      }
-    }
-  
-  /* Grid based on subtics : ONLY for log. case */
-  if(logflag =='l')
-    {
-      double tmp[2];
-      double pas=0;
-      double * tmp_log_grads = (double *) NULL;
-      
-      for(i=0;i<nbtics-1;i++)
-       {
-         int k;
-         tmp[0] = exp10(grads[i]);
-         tmp[1] = exp10(grads[i+1]);
-         pas = (exp10(grads[i+1]) - exp10(grads[i])) / (nbsubtics );
-         
-         if((tmp_log_grads = (double *)MALLOC(nbsubtics*sizeof(double)))==NULL){
-           sciprint("Error allocating tmp_log_grads\n");
-           return -1;
-         }
-         
-         for(k=0;k<nbsubtics;k++) tmp_log_grads[k] = log10(tmp[0]+(k)*pas);
-         
-         for(j=0;j<nbsubtics;j++)
-           {
-             double val = tmp_log_grads[j];
-             vy[0] = vy[1] = YScale(val);
-             
-             if(val<yminval || val>ymaxval) continue;    
-             
-             vx[0]= xm[0];vx[1]=  xm[1];
-             if ( ppsubwin->axes.axes_visible[1] )
-              {
-                C2F(dr)("xsegs","v", vx, vy, &ns,&style,&iflag,PI0,PD0,PD0,PD0,PD0,0L,0L);
-              }
-           }
-         
-         FREE(tmp_log_grads); tmp_log_grads = NULL;
-       }
-    }
-
-  /* return to solid mode (in default mode) */
-  C2F(dr)("xset","line style",dash,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-
-  return 0;
-}
-
-
-
-
-
-static void DrawYTics(char pos, sciPointObj * psubwin, double xy, char * c_format, int * fontid, int textcolor,int ticscolor,int color_kp, int *logrect, int smallersize)
-{
-  sciSubWindow * ppsubwin = pSUBWIN_FEATURE(psubwin);
-  double xminval,yminval,xmaxval,ymaxval;
-  int  flag=0,xx=0,yy=0,rect[4];
-  
-  int vx[2],vy[2],xm[2],ym[2];
-  int barlength = 0;
-  int posi[2];
-  double angle=0.0;
-  int ns=2,iflag=0;
-  
-  int nbtics = 0,i;
-  char logflag = ppsubwin->logflags[1];
-  
-  xm[0] = XScale(xy); /* F.Leray modified le 28.09.04 */
-  
-  /* at least 1 pixels */
-  barlength =  Max( (integer) (Cscale.WIRect1[2]/75.0), 2 ) ;
-  
-
-  if(ppsubwin->axes.auto_ticks[1] == FALSE)
-    {
-      /* we display the x tics specified by the user*/
-      FindXYMinMaxAccordingTL(psubwin,&xminval,&yminval,&xmaxval,&ymaxval); /* here i only need y data (xmin xmax are computed but not used after) */
-      nbtics = ppsubwin->axes.u_nygrads;
-      
-      for(i=0;i<nbtics;i++)
-       {
-         double ytmp = ppsubwin->axes.u_ygrads[i];
-         char *foo = ppsubwin->axes.u_ylabels[i];
-         
-         if(ytmp<yminval || ytmp>ymaxval) continue; /* cas ou TL est ON et on a des graduations qui ne seront pas affichées de tte facon */
-                                                    /* donc autant ne pas aller plus loin dans l'algo... */
-
-
-         /***************************************************************/
-         /************************* COMMON PART *************************/
-         /***************************************************************/
-         
-         C2F(dr)("xstringl",foo,&xx,&yy,rect,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-         /* tick is computed in vx,vy and string is displayed at posi[0],posi[1] position */
-         
-         vy[0]= vy[1] = ym[0] = YScale(ytmp);
-         posi[1]=inint( ym[0] +rect[3]/2.0);
-         if ( pos == 'r' ) 
-           {
-             posi[0]=inint( xm[0] + 1.2*barlength);
-             vx[0]= xm[0];vx[1]= xm[0]+barlength;
-           }
-         else 
-           { 
-             posi[0]=inint(xm[0] - 1.2*barlength - rect[2]);
-             vx[0]= xm[0];vx[1]= xm[0] - barlength;
-           }
-
-
-
-
-          if ( ppsubwin->axes.axes_visible[1] )
-          {
-            if ( textcolor != -1 ) C2F(dr)("xset","pattern",&textcolor,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-            
-            C2F(dr)("xset","font",fontid,fontid+1,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-            
-            C2F(dr)("xstring",foo,&(posi[0]),&(posi[1]),PI0,&flag,PI0,PI0,&angle, PD0,PD0,PD0,0L,0L);
-          }
-         YGradPosition(psubwin,posi[0],rect[2]);
-
-          if ( ppsubwin->axes.axes_visible[1] )
-          {
-            if ( textcolor != -1 ) C2F(dr)("xset","pattern",&color_kp,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-            
-            if ( ticscolor != -1 ) C2F(dr)("xset","pattern",&ticscolor,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-            
-            C2F(dr)("xsegs","v", vx, vy, &ns,&ticscolor,&iflag,PI0,PD0,PD0,PD0,PD0,0L,0L);
-            
-            if ( ticscolor != -1 ) C2F(dr)("xset","pattern",&color_kp,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-         }
-         
-         /***************************************************************/
-         /************************* END COMMON PART *********************/
-         /***************************************************************/
-         
-       }
-    }
-  else
-    {
-
-      FindXYMinMaxAccordingTL(psubwin,&xminval,&yminval,&xmaxval,&ymaxval); /* here i only need y data (xmin xmax are computed but not used after) */
-      nbtics = ppsubwin->axes.nygrads;
-      
-      for(i=0;i<nbtics;i++)
-       {
-         char foo[256];
-         double ytmp = ppsubwin->axes.ygrads[i];
-         
-          
-          /* chack that xtmp < xminval || xtmp > xmalval */
-          /* but if xtmp is very close to xminval or xmaxval we display it */
-          if ( !SAFE_LT( yminval, ytmp, EPSILON ) || !SAFE_LT( ytmp, ymaxval, EPSILON ) )
-          {
-            continue ;
-          }
-
-         sprintf(foo,c_format,ytmp);
-         
-         
-         /***************************************************************/
-         /************************* COMMON PART *************************/
-         /***************************************************************/
-         
-         C2F(dr)("xstringl",foo,&xx,&yy,rect,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-         /* tick is computed in vx,vy and string is displayed at posi[0],posi[1] position */
-
-         vy[0]= vy[1] = ym[0] = YScale(ytmp);
-         posi[1]=inint( ym[0] +rect[3]/2.0);
-
-         if ( pos == 'r' ) 
-           {
-             posi[0]=inint( xm[0] + 1.2*barlength);
-             vx[0]= xm[0];vx[1]= xm[0]+barlength;
-           }
-         else 
-           { 
-             posi[0]=inint(xm[0] - 1.2*barlength - rect[2]);
-             vx[0]= xm[0];vx[1]= xm[0] - barlength;
-           }
-          
-          
-          if ( ppsubwin->axes.axes_visible[1] )
-          {
-            if ( textcolor != -1 ) C2F(dr)("xset","pattern",&textcolor,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-            
-            C2F(dr)("xstring",foo,&(posi[0]),&(posi[1]),PI0,&flag,PI0,PI0,&angle, PD0,PD0,PD0,0L,0L);
-          }
-         YGradPosition(psubwin,posi[0],rect[2]);
-         
-         if ( logflag == 'l' )
-           {
-              if ( ppsubwin->axes.axes_visible[1] )
-              {
-                C2F(dr)("xset","font",fontid,fontid+1,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-                
-                C2F(dr)("xstring","10",(posi[0] -= logrect[2],&posi[0]),
-                        (posi[1] += logrect[3],&posi[1]),
-                        PI0,&flag,PI0,PI0,&angle,PD0,PD0,PD0,0L,0L);
-              }
-             YGradPosition(psubwin,posi[0],rect[2]); /* adding F.Leray 04.08.05 */
-             if ( ppsubwin->axes.axes_visible[1] )
-              {
-                C2F(dr)("xset","font",fontid,&smallersize,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-              }
-           }
-          if ( ppsubwin->axes.axes_visible[1] )
-          {
-            if ( textcolor != -1 ) C2F(dr)("xset","pattern",&color_kp,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-            
-            if ( ticscolor != -1 ) C2F(dr)("xset","pattern",&ticscolor,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-            
-            C2F(dr)("xsegs","v", vx, vy, &ns,&ticscolor,&iflag,PI0,PD0,PD0,PD0,PD0,0L,0L);
-          
-            if ( ticscolor != -1 ) C2F(dr)("xset","pattern",&color_kp,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-         }
-         /***************************************************************/
-         /************************* END COMMON PART *********************/
-         /***************************************************************/
-         
-       }
-    }
-}
-
-static int XDrawAxisLine(double xminval,double xmaxval,double xy, int ticscolor, int color_kp)
-{
-  int vx[2], vy[2];
-  int ns=2, iflag=0;
-  
-  vx[0] =  XScale(xminval); /* C EST LA que se calcule les positions initiales et finales (en x et y) de la barre support de l'axe des abscisses */
-  vx[1] =  XScale(xmaxval);
-  vy[0]= vy[1] = YScale(xy);
-  
-  if ( ticscolor != -1 ) C2F(dr)("xset","pattern",&ticscolor,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F(dr)("xsegs","v", vx, vy, &ns,&ticscolor,&iflag,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  if ( ticscolor != -1 ) C2F(dr)("xset","pattern",&color_kp,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-
-
-  return 0;
-}
-
-static int YDrawAxisLine(double yminval,double ymaxval,double xy, int ticscolor, int color_kp)
-{
-  int vx[2], vy[2];
-  int ns=2, iflag=0;
-
-  vy[0] =  YScale(yminval); /* C EST LA que se calcule les positions initiales et finales (en x et y) de la barre support de l'axe des abscisses */
-  vy[1] =  YScale(ymaxval);
-  vx[0]= vx[1] = XScale(xy);
-  
-  if ( ticscolor != -1 ) C2F(dr)("xset","pattern",&ticscolor,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  C2F(dr)("xsegs","v", vx, vy, &ns,&ticscolor,&iflag,PI0,PD0,PD0,PD0,PD0,0L,0L);
-  if ( ticscolor != -1 ) C2F(dr)("xset","pattern",&color_kp,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L);
-
-
-  return 0;
-}
-
-
-void FindXYMinMaxAccordingTL(sciPointObj * psubwin, double *xminval,double *yminval,double *xmaxval,double *ymaxval)
-{
-  sciSubWindow * ppsubwin = pSUBWIN_FEATURE(psubwin);
-  
- &n