periFig.c File Reference

#include <stdio.h>
#include <math.h>
#include <string.h>
#include "machine.h"
#include "math_graphics.h"
#include "periFig.h"
#include "color.h"
#include "bcg.h"
#include "clipping.h"
#include "sciprint.h"
#include "periScreen.h"
#include "MALLOC.h"

Include dependency graph for periFig.c:

Go to the source code of this file.

Data Structures

struct  SciFontInfo
struct  alinfo
struct  bgc

Defines

#define WHITE   7
#define BLACK   0
#define Char2Int(x)   ( x & 0x000000ff )
#define FONTNUMBER   11
#define FONTMAXSIZE   6
#define SYMBOLNUMBER   10
#define FPRINTF(x)   fprintf x
#define MAXDASH   6
#define NUMSETFONC   32
#define AREAF(x)   Max(0,Min(20,(int) (20.0*((double) x) /((double) GREYNUMBER -1 ))))
#define PERLINE   15
#define FORMATNUM   "%d "

Functions

void C2F() Write2VectXfig (integer *vx, integer *vy, integer n, integer flag)
void C2F() WriteGenericXfig (char *string, integer nobj, integer sizeobj, integer *vx, integer *vy, integer sizev, integer flag, integer *fvect)
void C2F() InitScilabGCXfig (integer *v1, integer *v2, integer *v3, integer *v4)
void C2F() setforegroundXfig (integer *num, integer *v2, integer *v3, integer *v4)
void C2F() ScilabGCGetorSetXfig (char *str, integer flag, integer *verbose, integer *x1, integer *x2, integer *x3, integer *x4, integer *x5, integer *x6, double *dx1)
void C2F() setbackgroundXfig (integer *num, integer *v2, integer *v3, integer *v4)
void C2F() set_cXfig (integer i)
void C2F() idfromnameXfig (char *name1, integer *num)
void C2F() getdashXfig (integer *verbose, integer *value, integer *narg, double *dummy)
void C2F() setscilabFigureXfig (integer *v1, integer *v2, integer *v3, integer *v4, integer *v5, integer *v6, double *figure)
void C2F() getscilabFigureXfig (integer *verbose, integer *x, integer *narg, double *figure)
void C2F() setscilabVersionXfig (integer *vers, integer *v2, integer *v3, integer *v4)
void C2F() getscilabVersionXfig (integer *verbose, integer *vers, integer *narg, double *dummy)
void C2F() setscilabxgcXfig (integer *v1, integer *v2, integer *v3, integer *v4)
void C2F() getscilabxgcXfig (integer *verbose, integer *x, integer *narg, double *dummy)
void getcolordef (integer *screenc)
void setcolordef (integer screenc)
static void C2F() analyze_pointsXfig (integer n, integer *vx, integer *vy, integer onemore)
static void C2F() displaysymbolsXfig (char *str, integer *n, integer *vx, integer *vy)
static int C2F() FigQueryFont (char *name)
static void set_dash_or_color (int dash, int *l_style, int *style_val, int *color)
static void C2F (FileInitXfig)
void C2F() xendgraphicXfig (void)
void C2F() xendXfig (char *v1, integer *v2, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dx1, double *dx2, double *dx3, double *dx4)
void C2F() clearwindowXfig (char *v1, integer *v2, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dx1, double *dx2, double *dx3, double *dx4)
void C2F() viderbuffXfig (void)
void C2F() getwindowdimXfig (integer *verbose, integer *x, integer *narg, double *dummy)
void C2F() setwindowdimXfig (integer *x, integer *y, integer *v3, integer *v4)
void C2F() getwindowposXfig (integer *verbose, integer *x, integer *narg, double *dummy)
void C2F() setwindowposXfig (integer *x, integer *y, integer *v3, integer *v4)
void C2F() xclickXfig (char *str, integer *ibutton, integer *xx1, integer *yy1, integer *v5, integer *v6, integer *v7, double *dx1, double *dx2, double *dx3, double *dx4)
void C2F() xclick_anyXfig (char *str, integer *ibutton, integer *xx1, integer *yy1, integer *v5, integer *v6, integer *v7, double *dx1, double *dx2, double *dx3, double *dx4)
void C2F() xgetmouseXfig (char *str, integer *ibutton, integer *xx1, integer *yy1, integer *v5, integer *v6, integer *v7, double *dx1, double *dx2, double *dx3, double *dx4)
void C2F() clearareaXfig (char *str, integer *x, integer *y, integer *w, integer *h, integer *v6, integer *v7, double *dx1, double *dx2, double *dx3, double *dx4)
void C2F() setcurwinXfig (integer *intnum, integer *v2, integer *v3, integer *v4)
void C2F() getcurwinXfig (integer *verbose, integer *intnum, integer *narg, double *dummy)
void C2F() setclipXfig (integer *x, integer *y, integer *w, integer *h)
void C2F() unsetclipXfig (integer *v1, integer *v2, integer *v3, integer *v4)
void C2F() getclipXfig (integer *verbose, integer *x, integer *narg, double *dummy)
void C2F() absourelXfig (integer *num, integer *v2, integer *v3, integer *v4)
void C2F() getabsourelXfig (integer *verbose, integer *num, integer *narg, double *dummy)
void C2F() setalufunctionXfig (char *string)
void C2F() setalufunction1Xfig (integer *num, integer *v2, integer *v3, integer *v4)
void C2F() getalufunctionXfig (integer *verbose, integer *value, integer *narg, double *dummy)
void C2F() setthicknessXfig (integer *value, integer *v2, integer *v3, integer *v4)
void C2F() getthicknessXfig (integer *verbose, integer *value, integer *narg, double *dummy)
void C2F() setpatternXfig (integer *num, integer *v2, integer *v3, integer *v4)
void C2F() getpatternXfig (integer *verbose, integer *num, integer *narg, double *dummy)
void C2F() getlastXfig (integer *verbose, integer *num, integer *narg, double *dummy)
void C2F() set_dash_or_color_Xfig (integer *value, integer *v2, integer *v3, integer *v4)
void C2F() setdashXfig (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() 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() usecolorXfig (integer *num, integer *v2, integer *v3, integer *v4)
void C2F() getusecolorXfig (integer *verbose, integer *num, integer *narg, double *dummy)
void setcolormapgXfig (struct BCG *Xgc, integer *v1, integer *v2, double *a, integer *v3)
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() setcolormapXfig (integer *v1, integer *v2, integer *v3, integer *v4, integer *v5, integer *v6, double *a)
void C2F() getbackgroundXfig (integer *verbose, integer *num, integer *narg, double *dummy)
void C2F() getforegroundXfig (integer *verbose, integer *num, integer *narg, double *dummy)
void C2F() sethidden3dXfig (integer *num, integer *v2, integer *v3, integer *v4)
void C2F() gethidden3dXfig (integer *verbose, integer *num, integer *narg, double *dummy)
void C2F() xsetfontXfig (integer *fontid, integer *fontsize, integer *v3, integer *v4)
void C2F() xgetfontXfig (integer *verbose, integer *font, integer *nargs, double *dummy)
void C2F() setcursymbolXfig (integer *number, integer *size, integer *v3, integer *v4)
void C2F() getcursymbolXfig (integer *verbose, integer *symb, integer *narg, double *dummy)
void C2F() semptyXfig (integer *verbose, integer *v2, integer *v3, integer *v4)
void C2F() gemptyXfig (integer *verbose, integer *v2, integer *v3, double *dummy)
void C2F() scilabgcgetXfig (char *str, integer *verbose, integer *x1, integer *x2, integer *x3, integer *x4, integer *x5, double *dx1, double *dx2, double *dx3, double *dx4)
void C2F() scilabgcsetXfig (char *str, integer *x2, integer *x3, integer *x4, integer *x5, integer *x6, integer *x7, double *dx1, double *dx2, double *dx3, double *dx4)
void C2F() displaystringXfig (char *string, integer *x, integer *y, integer *v1, integer *flag, integer *v6, integer *v7, double *angle, double *dv2, double *dv3, double *dv4)
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() 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() drawlineXfig (integer *x1, integer *yy1, integer *x2, integer *y2)
void C2F() drawsegmentsXfig (char *str, integer *vx, integer *vy, integer *n, integer *style, integer *iflag, integer *v7, double *dx1, double *dx2, double *dx3, double *dx4)
void C2F() drawarrowsXfig (char *str, integer *vx, integer *vy, integer *n, integer *as, integer *style, integer *iflag, double *dx1, double *dx2, double *dx3, double *dx4)
void C2F() drawrectangleXfig (char *str, integer *x, integer *y, integer *width, integer *height, integer *v6, integer *v7, double *dx1, double *dx2, double *dx3, double *dx4)
void C2F() fillrectangleXfig (char *str, integer *x, integer *y, integer *width, integer *height, integer *v6, integer *v7, double *dx1, double *dx2, double *dx3, double *dx4)
void C2F() drawrectanglesXfig (char *str, integer *vects, integer *fillvect, integer *n, 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() fillarcsXfig (char *str, integer *vects, integer *fillvect, integer *n, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4)
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() drawarcsXfig (char *str, integer *vects, integer *style, integer *n, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4)
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() drawarcXfig (char *str, integer *x, integer *y, integer *width, integer *height, integer *angle1, integer *angle2, double *dv1, double *dv2, double *dv3, double *dv4)
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() fillarcXfig (char *str, integer *x, integer *y, integer *width, integer *height, integer *angle1, integer *angle2, double *dv1, double *dv2, double *dv3, double *dv4)
void C2F() drawpolymarkXfig (char *str, integer *n, integer *vx, integer *vy, integer *v5, integer *v6, integer *v7, double *dx1, double *dx2, double *dx3, double *dx4)
void C2F() drawpolylinesXfig (char *str, integer *vectsx, integer *vectsy, integer *drawvect, integer *n, integer *p, integer *v7, double *dx1, double *dx2, double *dx3, double *dx4)
static BOOL checkPolygon (integer *polyX, integer *polyY, integer length)
static BOOL checkPolygons (integer *polyX, integer *polyY, integer polyLength, integer nbPoly)
void C2F() fillpolylinesXfig (char *str, integer *vectsx, integer *vectsy, integer *fillvect, integer *n, integer *p, integer *v7, double *dx1, double *dx2, double *dx3, double *dx4)
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() drawpolylineXfig (char *str, integer *n, integer *vx, integer *vy, integer *closeflag, integer *v6, integer *v7, double *dx1, double *dx2, double *dx3, double *dx4)
void C2F() fillpolylineXfig (char *str, integer *n, integer *vx, integer *vy, integer *closeareaflag, integer *v6, integer *v7, double *dx1, double *dx2, double *dx3, double *dx4)
void C2F() initgraphicXfig (char *string, integer *v2, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dx1, double *dx2, double *dx3, double *dx4)
static void C2F() FileInitXfig (void)
void C2F() loadfamilyXfig (char *name, integer *j, integer *v3, integer *v4, integer *v5, 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() drawaxisXfig (char *str, integer *alpha, integer *nsteps, integer *v2, integer *initpoint, integer *v6, integer *v7, double *size, double *dx2, double *dx3, double *dx4)
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() displaynumbersXfig (char *str, integer *x, integer *y, integer *v1, integer *v2, integer *n, integer *flag, double *z, double *alpha, double *dx3, double *dx4)
void set_pattern_or_color (int pat, int *areafill, int *color)
static void set_color (int c, int *color)
static void set_dash (int dash, int *l_style, int *style_val)
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)
static void C2F() FileInitFromScreenXfig (void)

Variables

BCG ScilabGCXfig
static BOOL ScilabGCXfig_is_initialized = FALSE
static double * vdouble = 0
integer FontsListXfig_ [FONTNUMBER][FONTMAXSIZE]
SciFontInfo FontInfoTabXfig_ [FONTNUMBER]
static integer xfig_font [] = { 12,32,0,1,2,3,16,17,18,19,0}
static char * sizeXfig_ [] = { "08" ,"10","12","14","18","24"}
static integer isizeXfig_ [] = { 8,10,12,14,18,24}
static FILE * file = stdout
static int prec_fact = 16
alinfo AluStrucXfig_ []
static integer DashTab [MAXDASH] = {0,1,1,2,2,2}
static integer DashTabStyle [MAXDASH] = {0,2,4,2,4,8}
bgc ScilabGCTabXfig_ []
integer bsizeXfig_ [6][4]
int symb_xw [FONTMAXSIZE][SYMBOLNUMBER]
int symb_yh [FONTMAXSIZE][SYMBOLNUMBER]
char symb_listXfig_ []


Define Documentation

#define AREAF ( x   )     Max(0,Min(20,(int) (20.0*((double) x) /((double) GREYNUMBER -1 ))))

Definition at line 2363 of file periFig.c.

Referenced by set_pattern_or_color().

#define BLACK   0

Definition at line 60 of file periFig.c.

Referenced by set_dash_or_color().

#define Char2Int ( x   )     ( x & 0x000000ff )

Definition at line 92 of file periFig.c.

#define FONTMAXSIZE   6

Definition at line 97 of file periFig.c.

Referenced by CleanFonts(), fontidscale(), getFontMaxSize(), getFontMaxSizeGif(), getFontMaxSizePos(), getFontMaxSizeXfig(), loadfamily(), loadfamily_n(), loadfamilyGif(), loadfamilyPos(), loadfamilyXfig(), LoadSymbFonts(), setcursymbolXfig(), xset_font(), xset_mark(), xsetfont(), xsetfontXfig(), xsetmark(), and xstringb_1().

#define FONTNUMBER   11

Global variables to deal with fonts

Definition at line 96 of file periFig.c.

Referenced by CleanFonts(), queryfamily(), queryfamilyGif(), queryfamilyPos(), queryfamilyXfig(), xset_font(), xsetfont(), and xsetfontXfig().

#define FORMATNUM   "%d "

ne pas oublier le blanc aprse d

Definition at line 2474 of file periFig.c.

#define FPRINTF ( x   )     fprintf x

Definition at line 112 of file periFig.c.

Referenced by clearareaPos(), clearareaXfig(), displaystringPos(), displaystringXfig(), drawarrowsXfig(), drawaxisPos(), drawaxisXfig(), drawClippedPolylineXfig(), drawlinePos(), drawlineXfig(), drawpolylinePos(), drawpolylineXfig(), drawsegmentsXfig(), FileInit(), FileInitFromScreenPos(), FileInitFromScreenXfig(), FileInitXfig(), fillpolylinesPos(), fillpolylinesXfig(), setalufunctionPos(), setalufunctionXfig(), setclipPos(), setclipXfig(), setgccolormapPos(), setgccolormapXfig(), setpatternPos(), setpatternXfig(), setthicknessPos(), setthicknessXfig(), setwwhowPos(), unsetclipPos(), unsetclipXfig(), usecolorPos(), WriteColorRGB(), WriteColorRGBDef(), xendgraphicPos(), and xsetfontXfig().

#define MAXDASH   6

to a strictly positive integer

Definition at line 526 of file periFig.c.

Referenced by set_dash(), set_dash_or_color_Pos(), set_dash_or_color_Xfig(), setdash(), setdashPos(), setdashXfig(), and xset_dash().

#define NUMSETFONC   32

Definition at line 1133 of file periFig.c.

#define PERLINE   15

Definition at line 2472 of file periFig.c.

#define SYMBOLNUMBER   10

Definition at line 98 of file periFig.c.

Referenced by LoadSymbFonts(), setcursymbolXfig(), xset_mark(), and xsetmark().

#define WHITE   7

Definition at line 59 of file periFig.c.

Referenced by drawarrowsXfig(), drawsegmentsXfig(), and set_pattern_or_color().


Function Documentation

void C2F() absourelXfig ( integer num,
integer v2,
integer v3,
integer v4 
)

Definition at line 328 of file periFig.c.

References CoordModeOrigin, CoordModePrevious, BCG::CurVectorStyle, and ScilabGCXfig.

00329 {
00330   if (*num == 0 )
00331     ScilabGCXfig.CurVectorStyle =  CoordModeOrigin;
00332   else 
00333     ScilabGCXfig.CurVectorStyle =  CoordModePrevious ;
00334 }

static void C2F() analyze_pointsXfig ( integer  n,
integer vx,
integer vy,
integer  onemore 
) [static]

Referenced by drawClippedPolylineXfig().

Here is the caller graph for this function:

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 
)

To get the bounding rectangle of a string

Definition at line 1314 of file periFig.c.

References C2F, int, prec_fact, vdouble, and xgetfontXfig().

01315 {integer verbose,nargs,font[2];
01316  verbose=0;
01317 
01318  C2F(xgetfontXfig)(&verbose,font,&nargs,vdouble);
01319  rect[0]= (int)(*x+bsizeXfig_[font[1]][0]*((double) prec_fact));
01320  rect[1]= (int)(*y+bsizeXfig_[font[1]][1]*((double) prec_fact));
01321  rect[2]= (int)(((double)prec_fact)*(bsizeXfig_[font[1]][2]/100.0)*((double)strlen(string)));
01322  rect[3]= (int)(bsizeXfig_[font[1]][3]*((double) prec_fact));
01323 }

Here is the call graph for this function:

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 
)

To get the bounding rectangle of a symbol in fact just rect[3] is really used

Definition at line 1355 of file periFig.c.

References C2F, BCG::CurHardSymb, BCG::CurHardSymbSize, int, prec_fact, ScilabGCXfig, vdouble, and xgetfontXfig().

01356 {
01357   integer verbose,nargs,font[2];
01358   verbose=0;
01359   C2F(xgetfontXfig)(&verbose,font,&nargs,vdouble);
01360   rect[0]= (int)(*x+bsizeXfig_[font[1]][0]*((double) prec_fact));
01361   rect[1]= (int)(*y+bsizeXfig_[font[1]][1]*((double) prec_fact));
01362   rect[2]= (int)(symb_xw[ScilabGCXfig.CurHardSymbSize][ScilabGCXfig.CurHardSymb]);
01363   rect[3]= (int)(symb_yh[ScilabGCXfig.CurHardSymbSize][ScilabGCXfig.CurHardSymb]);
01364 }

Here is the call graph for this function:

static void C2F ( FileInitXfig   )  [static]

Definition at line 115 of file periFig.c.

00124         {General routines}
00125 -----------------------------------------------------*/
00126 
00129 void C2F(xselgraphicXfig)(char *v1, integer *v2, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dx1, double *dx2, double *dx3, double *dx4)
00130 {}

static BOOL checkPolygon ( integer polyX,
integer polyY,
integer  length 
) [static]

Definition at line 1827 of file periFig.c.

References FALSE, i, j, and TRUE.

Referenced by checkPolygons().

01828 {
01829   
01830   
01831   if ( length <= 2 )
01832   {
01833     return TRUE ;
01834   }
01835   else
01836   {
01837     int i, j   ;
01838     int nbDiff = 0 ;
01839     /* real polygon */
01840     for ( i = 0 ; i < length ; i++ )
01841     {
01842       for ( j = i + 1 ; j < length ; j++ )
01843       {
01844         if ( polyX[j] != polyX[i] || polyY[j] != polyY[i] )
01845         {
01846           nbDiff++ ;
01847           if ( nbDiff >= 3 )
01848           {
01849             /* 3 distincts points have been found */
01850             return TRUE ;
01851           }
01852         }
01853       }
01854     }
01855   }
01856   return FALSE ;
01857 }

Here is the caller graph for this function:

static BOOL checkPolygons ( integer polyX,
integer polyY,
integer  polyLength,
integer  nbPoly 
) [static]

Definition at line 1863 of file periFig.c.

References checkPolygon(), FALSE, i, and TRUE.

Referenced by fillpolylinesXfig().

01864 {
01865   int   i                ;
01866   int * curPolyX = polyX ;
01867   int * curPolyY = polyY ;
01868   for ( i = 0 ; i < nbPoly ; i++ )
01869   {
01870     /* check every pairs of points in the polygon */
01871     if ( !checkPolygon( curPolyX, curPolyY, polyLength ) )
01872     {
01873       return FALSE ;
01874     }
01875     /* get the pointer on the next polygon */
01876     curPolyX += polyLength ;
01877     curPolyY += polyLength ;
01878   }
01879   return TRUE ;
01880 }

Here is the call graph for this function:

Here is the caller graph for this function:

void C2F() clearareaXfig ( char *  str,
integer x,
integer y,
integer w,
integer h,
integer v6,
integer v7,
double *  dx1,
double *  dx2,
double *  dx3,
double *  dx4 
)

Clear a rectangle

Definition at line 232 of file periFig.c.

References file, and FPRINTF.

00233 {
00234   FPRINTF((file,"# %d %d %d %d clearzone\n",(int)*x,(int)*y,(int)*w,(int)*h));
00235 }

void C2F() clearwindowXfig ( char *  v1,
integer v2,
integer v3,
integer v4,
integer v5,
integer v6,
integer v7,
double *  dx1,
double *  dx2,
double *  dx3,
double *  dx4 
)

In Fig : nothing

Definition at line 152 of file periFig.c.

References C2F, drawrectanglesXfig(), FALSE, getwindowdimXfig(), i, BCG::NumBackground, PD0, PI0, ScilabGCXfig, ScilabGCXfig_is_initialized, and sciprint().

00153 {
00154   /* F.Leray : I add a rectangle with  background color*/
00155   integer i = 1;
00156   int zero = 0, col;
00157   integer vects[4], narg;
00158   double dv;
00159   
00160   if ( ScilabGCXfig_is_initialized == FALSE ) {
00161     sciprint("xinit must be called before any action \r\n");
00162     return;
00163   }
00164   
00165   vects[0]= zero;
00166   vects[1]= zero;
00167   C2F(getwindowdimXfig)(&zero,&vects[2],&narg,&dv);
00168 
00169   col = ScilabGCXfig.NumBackground+1;
00170   
00171   C2F(drawrectanglesXfig)("",vects,&col,&i,PI0,PI0,PI0,PD0,PD0,PD0,PD0);    
00172   
00173 }

Here is the call graph for this function:

void C2F() displaynumbersXfig ( char *  str,
integer x,
integer y,
integer v1,
integer v2,
integer n,
integer flag,
double *  z,
double *  alpha,
double *  dx3,
double *  dx4 
)

Definition at line 2323 of file periFig.c.

References buf, C2F, BCG::CurNumberDispFormat, displaystringXfig(), FALSE, PD0, ScilabGCXfig, ScilabGCXfig_is_initialized, and sciprint().

02324 { integer i ;
02325   char buf[20];
02326 
02327   if ( ScilabGCXfig_is_initialized == FALSE ) {
02328     sciprint("xinit must be called before any action \r\n");
02329     return;
02330   }
02331 
02332   for (i=0 ; i< *n ; i++)
02333     { 
02334       sprintf(buf,ScilabGCXfig.CurNumberDispFormat,z[i]);
02335       C2F(displaystringXfig)(buf,&(x[i]),&(y[i]),PI0,flag,PI0,PI0,&(alpha[i]),PD0,PD0,PD0);
02336     }
02337 }

Here is the call graph for this function:

void C2F() displaystringXfig ( char *  string,
integer x,
integer y,
integer v1,
integer flag,
integer v6,
integer v7,
double *  angle,
double *  dv2,
double *  dv3,
double *  dv4 
)

Definition at line 1260 of file periFig.c.

References boundingboxXfig(), C2F, drawrectangleXfig(), FALSE, file, BCG::FontId, BCG::FontSize, FPRINTF, getpatternXfig(), isizeXfig_, M_PI, PD0, PI0, ScilabGCXfig, ScilabGCXfig_is_initialized, sciprint(), set_color(), vdouble, and xfig_font.

01261 {    
01262   integer rect[4], font=-1,font_flag=2;
01263   integer verbose=0,Dnarg,Dvalue1[10];
01264   int pen_color;
01265 
01266   if ( ScilabGCXfig_is_initialized == FALSE ) {
01267     sciprint("xinit must be called before any action \r\n");
01268     return;
01269   }
01270 
01271   C2F(boundingboxXfig)(string,x,y,rect,PI0,PI0,PI0,PD0,PD0,PD0,PD0);
01272   if (string[0]== '$') 
01273     {
01274       font=-1;
01275       font_flag=2;
01276     }
01277   else 
01278     {
01279       font =  xfig_font[ScilabGCXfig.FontId];
01280       font_flag= 4; 
01281     };
01282   C2F(getpatternXfig)(&verbose,Dvalue1,&Dnarg,vdouble);
01283   
01284 
01285   C2F(getpatternXfig)(&verbose,Dvalue1,&Dnarg,vdouble);
01286   set_color(Dvalue1[0],&pen_color);
01287   FPRINTF((file,"4 0 %d 0 0 %d %d %5.2f %d %5.2f %5.2f %d %d %s\\001\n",
01288           pen_color,
01289           (int)font,
01290           (int)isizeXfig_[ScilabGCXfig.FontSize],
01291           -(M_PI/180.0)*(*angle),
01292           (int)font_flag,
01293           (double) rect[3],
01294           (double) rect[2],
01295           (int)*x,
01296           (int)*y,
01297           string));
01298   if ( *flag == 1) 
01299     {
01300       rect[0]=rect[0]-4;rect[2]=rect[2]+6;
01301       C2F(drawrectangleXfig)(string,rect,rect+1,rect+2,rect+3,PI0,PI0,PD0,PD0,PD0,PD0);
01302     }
01303 }

Here is the call graph for this function:

static void C2F() displaysymbolsXfig ( char *  str,
integer n,
integer vx,
integer vy 
) [static]

Referenced by drawpolymarkXfig().

Here is the caller graph for this function:

void C2F() drawarcsXfig ( char *  str,
integer vects,
integer style,
integer n,
integer v5,
integer v6,
integer v7,
double *  dv1,
double *  dv2,
double *  dv3,
double *  dv4 
)

Definition at line 1607 of file periFig.c.

References C2F, drawarcXfig(), FALSE, get_dash_and_color_Xfig(), i, PI0, ScilabGCXfig_is_initialized, sciprint(), set_dash_and_color_Xfig(), set_line_style_Xfig(), and vdouble.

01608 {
01609   integer verbose=0,Dnarg,Dvalue[10],NDvalue;
01610   int i,i6;
01611 
01612   if ( ScilabGCXfig_is_initialized == FALSE ) {
01613     sciprint("xinit must be called before any action \r\n");
01614     return;
01615   }
01616 
01617   /* store the current values */
01618   C2F(get_dash_and_color_Xfig)(&verbose,Dvalue,&Dnarg,vdouble);
01619   for ( i=0 ; i < *n ; i++) 
01620     {
01622       NDvalue = style[i];
01623       C2F(set_line_style_Xfig)(&NDvalue,PI0,PI0,PI0);
01624       i6=6*i;
01625       C2F(drawarcXfig)(str,vects+i6,vects+(i6+1),vects+(i6+2),vects+(i6+3),
01626                       vects+(i6+4),vects+(i6+5) , dv1, dv2, dv3, dv4);
01627     }
01628   C2F(set_dash_and_color_Xfig)( Dvalue,PI0,PI0,PI0);
01629 }

Here is the call graph for this function:

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 
)

caution : angle=degreangle*64

Definition at line 1592 of file periFig.c.

References C2F, FALSE, getdashXfig(), L, PI0, ScilabGCXfig_is_initialized, sciprint(), setdashXfig(), vdouble, and WriteGenericXfig().

01593 {
01594   integer verbose=0,Dnarg,Dvalue[10];
01595   /* store the current values */
01596 
01597   if ( ScilabGCXfig_is_initialized == FALSE ) {
01598     sciprint("xinit must be called before any action \r\n");
01599     return;
01600   }
01601 
01602   C2F(getdashXfig)(&verbose,Dvalue,&Dnarg,vdouble);
01603   C2F(WriteGenericXfig)("Rdrawarc",*n,(integer)6L,vects,vects,6*(*n),(integer)0L,style);
01604   C2F(setdashXfig)( Dvalue,PI0,PI0,PI0);
01605 }

Here is the call graph for this function:

void C2F() drawarcXfig ( char *  str,
integer x,
integer y,
integer width,
integer height,
integer angle1,
integer angle2,
double *  dv1,
double *  dv2,
double *  dv3,
double *  dv4 
)

Definition at line 1654 of file periFig.c.

References alpha, C2F, close(), drawClippedPolylineXfig(), fact(), FALSE, Min, PI0, ScilabGCXfig_is_initialized, and sciprint().

01655 { 
01656   integer vx[365],vy[365],k,n;
01657   float alpha,fact= (float) 0.01745329251994330,w,h;
01658   integer close = 0;  
01659 
01660   if ( ScilabGCXfig_is_initialized == FALSE ) {
01661     sciprint("xinit must be called before any action \r\n");
01662     return;
01663   }
01664 
01665   w = (float) ((*width)/2.0);
01666   h = (float) ((*height)/2.0);
01667   n=Min((*angle2/64),360);
01668   for (k = 0; k < n; ++k) {
01669     alpha=((*angle1/64)+k)*fact;
01670     vx[k] = (integer) (*x + w*(cos(alpha)+1.0));
01671     vy[k] = (integer) (*y + h*(-sin(alpha)+1.0));}
01672     
01673   /* Fix bug 1737 : if n==360 we want a closed circle */
01674   if(n == 360) close = 1;
01675 
01676   C2F(drawClippedPolylineXfig)(str, &n, vx, vy, &close, PI0, PI0, dv1, dv2, dv3, dv4);
01677 }

Here is the call graph for this function:

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 
)

caution angle=degreAngle*64

Definition at line 1637 of file periFig.c.

References C2F, FALSE, fillarcsXfig(), i, BCG::IDLastPattern, PD0, PI0, ScilabGCXfig, ScilabGCXfig_is_initialized, and sciprint().

01638 { 
01639   integer i =1;
01640   integer fvect[1] ;
01641   integer vects[6];
01642 
01643   if ( ScilabGCXfig_is_initialized == FALSE ) {
01644     sciprint("xinit must be called before any action \r\n");
01645     return;
01646   }
01647 
01648   vects[0]= *x;vects[1]= *y;vects[2]= *width;
01649   vects[3]= *height;vects[4]= *angle1;vects[5]= *angle2;
01650   fvect[0] = ScilabGCXfig.IDLastPattern  +2;
01651   C2F(fillarcsXfig)(str,vects,fvect,&i,PI0,PI0,PI0,PD0,PD0,PD0,PD0);
01652 }

Here is the call graph for this function:

void C2F() drawarrowsXfig ( char *  str,
integer vx,
integer vy,
integer n,
integer as,
integer style,
integer iflag,
double *  dx1,
double *  dx2,
double *  dx3,
double *  dx4 
)

Draw a set of arrows if iflag == 1 style[i] gives the style for each arrow if iflag == 0 *style gives the style for all the arrows

Only draws

Definition at line 1437 of file periFig.c.

References C2F, BCG::CurLineWidth, BCG::CurPattern, FALSE, file, FPRINTF, getdashXfig(), i, prec_fact, ScilabGCXfig, ScilabGCXfig_is_initialized, sciprint(), set_color(), set_dash(), vdouble, and WHITE.

01438 {
01439   int i;
01440   int l_style,style_val,pen_color,fill_color,areafill;
01441   integer verbose=0,Dnarg,Dvalue[10],Dvalue1[10],NDvalue;
01442 
01443   if ( ScilabGCXfig_is_initialized == FALSE ) {
01444     sciprint("xinit must be called before any action \r\n");
01445     return;
01446   }
01447 
01448   /* store the current values */
01449   C2F(getdashXfig)(&verbose,Dvalue,&Dnarg,vdouble);
01450   for ( i = 0 ; i < *n/2 ; i++)
01451     {
01452       if ( (int) *iflag == 0) 
01453         NDvalue=(*style < 0) ? Dvalue[0] : *style;
01454       else
01455         NDvalue=(int) style[i];
01456 
01457 
01458       set_color(NDvalue,&pen_color);
01459       C2F(getdashXfig)(&verbose,Dvalue1,&Dnarg,vdouble);
01460            set_dash(Dvalue1[0],&l_style,&style_val);
01462       areafill = -1;
01463       fill_color = WHITE;
01464       FPRINTF((file,"# Object : %d %s -<%d>-\n", (int)i,"arrows", ScilabGCXfig.CurPattern));
01465       FPRINTF((file,"2 1 %d %d %d %d 0 0 -1 %d.000 0 0 0 1 0 2\n",
01466               l_style,
01467               ScilabGCXfig.CurLineWidth*prec_fact/16,
01468               pen_color,fill_color,
01469               style_val
01470               ));
01471       FPRINTF((file,"    0 0 %d %d %d\n",
01472               (int)(1*prec_fact/16), (int)(3*prec_fact), (int) (6*prec_fact)));
01473       FPRINTF((file," %d %d %d %d \n",
01474               (int)vx[2*i], (int)vy[2*i], (int)vx[2*i+1], (int)vy[2*i+1]));
01475     }
01476 }

Here is the call graph for this function:

void C2F() drawaxisXfig ( char *  str,
integer alpha,
integer nsteps,
integer v2,
integer initpoint,
integer v6,
integer v7,
double *  size,
double *  dx2,
double *  dx3,
double *  dx4 
)

Definition at line 2245 of file periFig.c.

References C2F, BCG::CurLineWidth, FALSE, file, FPRINTF, getdashXfig(), M_PI, prec_fact, ScilabGCXfig, ScilabGCXfig_is_initialized, sciprint(), set_dash_or_color(), vdouble, xi, and yi.

02246 { integer i;
02247   int l_style,style_val,pen_color;
02248   double xi,yi,xf,yf;
02249   double cosal,sinal;
02250   integer verbose=0,Dnarg,Dvalue1[10];
02251 
02252   if ( ScilabGCXfig_is_initialized == FALSE ) {
02253     sciprint("xinit must be called before any action \r\n");
02254     return;
02255   }
02256 
02257   C2F(getdashXfig)(&verbose,Dvalue1,&Dnarg,vdouble);
02258   set_dash_or_color(Dvalue1[0],&l_style,&style_val,&pen_color);
02259   FPRINTF((file,"# Begin Axis \n"));
02260   if ( *alpha == 90 )
02261     {cosal = 0.0 ; sinal =1.0 ;}
02262   else 
02263    {
02264      if ( *alpha == -90 )
02265        {cosal = 0.0 ; sinal = -1.0 ;}
02266      else 
02267        {
02268          cosal= cos( M_PI * (*alpha)/180.0);
02269          sinal= sin( M_PI * (*alpha)/180.0);
02270        }
02271    }
02272   for (i=0; i <= nsteps[0]*nsteps[1]; i++)
02273     { xi = initpoint[0]+i*size[0]*cosal;
02274       yi = initpoint[1]+i*size[0]*sinal;
02275       xf = xi - ( size[1]*sinal);
02276       yf = yi + ( size[1]*cosal);
02277       FPRINTF((file,"2 1 0 %d %d %d 0 0 -1 0.000 0 0 0 0 0 2\n",
02278               ScilabGCXfig.CurLineWidth*prec_fact/16,
02279               pen_color,
02280               pen_color
02281               ));
02282       FPRINTF((file," %d %d %d %d \n",(int)xi, (int)yi,  (int)  xf, (int)yf));
02283     }
02284   for (i=0; i <= nsteps[1]; i++)
02285     { xi = initpoint[0]+i*nsteps[0]*size[0]*cosal;
02286       yi = initpoint[1]+i*nsteps[0]*size[0]*sinal;
02287       xf = xi - ( size[1]*size[2]*sinal);
02288       yf = yi + ( size[1]*size[2]*cosal);
02289       FPRINTF((file,"2 1 0 %d %d %d 0 0 -1 0.000 0 0 0 0 0 2\n",
02290               ScilabGCXfig.CurLineWidth*prec_fact/16,
02291               pen_color,
02292               pen_color
02293               ));
02294       FPRINTF((file," %d %d %d %d \n", (int)xi, (int) yi, (int)xf, (int)yf));
02295     }
02296   xi = initpoint[0]; yi= initpoint[1];
02297   xf = initpoint[0]+ nsteps[0]*nsteps[1]*size[0]*cosal;
02298   yf = initpoint[1]+ nsteps[0]*nsteps[1]*size[0]*sinal;
02299   FPRINTF((file,"2 1 0 %d %d %d 0 0 -1 0.000 0 0 0 0 0 2\n",
02300           ScilabGCXfig.CurLineWidth*prec_fact/16,
02301           pen_color,
02302           pen_color));
02303   FPRINTF((file," %d %d %d %d \n",  (int)xi,  (int)yi, (int) xf, (int)yf));
02304   FPRINTF((file,"# End Of Axis \n"));
02305 }

Here is the call graph for this function:

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 
)

Definition at line 1927 of file periFig.c.

References analyze_pointsXfig(), C2F, BCG::ClipRegionSet, FALSE, file, fillpolylinesXfig(), FPRINTF, FREE, i, j, MALLOC, nb, NULL, PD0, PI0, ScilabGCXfig, ScilabGCXfig_is_initialized, and sciprint().

01928 { 
01929   integer i=1,fvect=0;
01930   integer *vxtmp = NULL;
01931   integer *vytmp = NULL;
01932   int j;
01933 
01934   if ( ScilabGCXfig_is_initialized == FALSE ) {
01935     sciprint("xinit must be called before any action \r\n");
01936     return;
01937   }
01938 
01939   if((vxtmp=MALLOC(((*n)+1)*sizeof(integer)))==0){
01940     sciprint("Can not allocate vxtmp while exporting to Fig\n");
01941     return;
01942   }
01943   
01944   if((vytmp=MALLOC(((*n)+1)*sizeof(integer)))==0){
01945     sciprint("Can not allocate vxtmp while exporting to Fig\n");
01946     return;
01947   }
01948 
01949   
01950   for( j = 0 ; j < (*n ) ; j++ )
01951   {
01952     vxtmp[j] = vx[j];
01953     vytmp[j] = vy[j];
01954   }
01955   
01956   vxtmp[(*n)] = vx[0];
01957   vytmp[(*n)] = vy[0];
01958 
01959   if (*closeflag == 1 ){
01960     int nb = (*n)+1;
01961     FPRINTF((file,"#/closeflag true def\n"));
01962     if (ScilabGCXfig.ClipRegionSet ==1 )
01963       {
01964         C2F(analyze_pointsXfig)(nb, vxtmp, vytmp, *closeflag);
01965       }
01966     else     
01967     C2F(fillpolylinesXfig)(str,vxtmp,vytmp,&fvect,&i,&nb,PI0,PD0,PD0,PD0,PD0);
01968   }
01969   else {
01970     FPRINTF((file,"#/closeflag false def\n"));
01971     if (ScilabGCXfig.ClipRegionSet ==1 )
01972       {
01973         C2F(analyze_pointsXfig)(*n, vx, vy, *closeflag);
01974       }
01975     else 
01976     C2F(fillpolylinesXfig)(str,vx,vy,&fvect,&i,n,PI0,PD0,PD0,PD0,PD0);
01977   }
01978 
01979   FREE(vxtmp); vxtmp = NULL;
01980   FREE(vytmp); vytmp = NULL;
01981 
01982   /*   if (*closeflag == 1 ) */
01983   /*     FPRINTF((file,"#/closeflag true def\n")); */
01984   /*   else  */
01985   /*     FPRINTF((file,"#/closeflag false def\n")); */
01986   /*   if (ScilabGCXfig.ClipRegionSet ==1 ) */
01987   /*     { */
01988   /*       C2F(analyze_pointsXfig)(*n, vx, vy, *closeflag); */
01989   /*     } */
01990   /*   else  */
01991   /*     C2F(fillpolylinesXfig)(str,vx,vy,&fvect,&i,n,PI0,PD0,PD0,PD0,PD0); */
01992 }

Here is the call graph for this function:

void C2F() drawlineXfig ( integer x1,
integer yy1,
integer x2,
integer y2 
)

Unused in fact

Definition at line 1371 of file periFig.c.

References FALSE, file, FPRINTF, ScilabGCXfig_is_initialized, and sciprint().

01372 {  
01373   if ( ScilabGCXfig_is_initialized == FALSE ) {
01374     sciprint("xinit must be called before any action \r\n");
01375     return;
01376   }
01377   
01378   FPRINTF((file,"# %d %d %d %d L\n",(int)*x1,(int)*yy1,(int)*x2,(int)*y2));
01379 }

Here is the call graph for this function:

void C2F() drawpolylinesXfig ( char *  str,
integer vectsx,
integer vectsy,
integer drawvect,
integer n,
integer p,
integer v7,
double *  dx1,
double *  dx2,
double *  dx3,
double *  dx4 
)

drawvect[i] < 0 use a line style for polyline i

on utilise la marque de numero associ\'ee

on utilise un style pointill\'e

back to default values

Definition at line 1791 of file periFig.c.

References C2F, close(), drawClippedPolylineXfig(), drawpolymarkXfig(), FALSE, get_dash_and_color_Xfig(), getcursymbolXfig(), i, PD0, PI0, ScilabGCXfig_is_initialized, sciprint(), set_dash_and_color_Xfig(), set_line_style_Xfig(), setcursymbolXfig(), setdashXfig(), and vdouble.

01792 { integer verbose ,symb[2],Mnarg,Dnarg,Dvalue[10],NDvalue,i,close;
01793   verbose =0 ;
01794 
01795   if ( ScilabGCXfig_is_initialized == FALSE ) {
01796     sciprint("xinit must be called before any action \r\n");
01797     return;
01798   }
01799 
01800   /* store the current values */
01801   C2F(getcursymbolXfig)(&verbose,symb,&Mnarg,vdouble);
01802   C2F(get_dash_and_color_Xfig)(&verbose,Dvalue,&Dnarg,vdouble);
01803   for (i=0 ; i< *n ; i++)
01804     {
01805       if (drawvect[i] <= 0)
01806         { 
01807           NDvalue = - drawvect[i] ;
01808           C2F(setcursymbolXfig)(&NDvalue,symb+1,PI0,PI0);
01809           C2F(setdashXfig)(Dvalue,PI0,PI0,PI0);
01810          
01811           C2F(drawpolymarkXfig)(str,p,vectsx+(*p)*i,vectsy+(*p)*i,PI0,PI0,PI0,PD0,PD0,PD0,PD0);
01812         }
01813       else 
01814         {
01815           C2F(set_line_style_Xfig)(drawvect+i,PI0,PI0,PI0);
01816           close = 0;
01817           C2F(drawClippedPolylineXfig)(str,p,vectsx+(*p)*i,vectsy+(*p)*i,&close,PI0,PI0,PD0,PD0,PD0,PD0);
01818         }
01819     }
01821   C2F(set_dash_and_color_Xfig)(Dvalue,PI0,PI0,PI0);
01822   C2F(setcursymbolXfig)(symb,symb+1,PI0,PI0);
01823 }

Here is the call graph for this function:

void C2F() drawpolylineXfig ( char *  str,
integer n,
integer vx,
integer vy,
integer closeflag,
integer v6,
integer v7,
double *  dx1,
double *  dx2,
double *  dx3,
double *  dx4 
)

XXXXXX To be done Closeflag is not used

Definition at line 2001 of file periFig.c.

References C2F, FALSE, file, fillpolylinesXfig(), FPRINTF, FREE, i, j, MALLOC, nb, NULL, PD0, PI0, ScilabGCXfig_is_initialized, and sciprint().

02002 { 
02003   integer i=1,fvect=0;
02004   integer *vxtmp = NULL;
02005   integer *vytmp = NULL;
02006   int j;
02007 
02008   if ( ScilabGCXfig_is_initialized == FALSE ) {
02009     sciprint("xinit must be called before any action \r\n");
02010     return;
02011   }
02012 
02013   if((vxtmp=MALLOC(((*n)+1)*sizeof(integer)))==0){
02014     sciprint("Can not allocate vxtmp while exporting to Fig\n");
02015     return;
02016   }
02017   
02018   if((vytmp=MALLOC(((*n)+1)*sizeof(integer)))==0){
02019     sciprint("Can not allocate vxtmp while exporting to Fig\n");
02020     return;
02021   }
02022 
02023   
02024   for( j = 0 ; j < (*n ) ; j++ )
02025   {
02026     vxtmp[j] = vx[j];
02027     vytmp[j] = vy[j];
02028   }
02029   
02030   vxtmp[(*n)] = vx[0];
02031   vytmp[(*n)] = vy[0];
02032 
02033   if (*closeflag == 1 ){
02034     int nb = (*n)+1;
02035     FPRINTF((file,"#/closeflag true def\n"));
02036     C2F(fillpolylinesXfig)(str,vxtmp,vytmp,&fvect,&i,&nb,PI0,PD0,PD0,PD0,PD0);
02037   }
02038   else {
02039     FPRINTF((file,"#/closeflag false def\n"));
02040     C2F(fillpolylinesXfig)(str,vx,vy,&fvect,&i,n,PI0,PD0,PD0,PD0,PD0);
02041   }
02042 
02043   FREE(vxtmp); vxtmp = NULL;
02044   FREE(vytmp); vytmp = NULL;
02045 
02046   /*   if (*closeflag == 1 ) */
02047   /*     FPRINTF((file,"#/closeflag true def\n")); */
02048   /*   else  */
02049   /*     FPRINTF((file,"#/closeflag false def\n")); */
02050   /*   if (ScilabGCXfig.ClipRegionSet ==1 ) */
02051   /*     { */
02052   /*       C2F(analyze_pointsXfig)(*n, vx, vy, *closeflag); */
02053   /*     } */
02054   /*   else  */
02055   /*     C2F(fillpolylinesXfig)(str,vx,vy,&fvect,&i,n,PI0,PD0,PD0,PD0,PD0); */
02056 }

Here is the call graph for this function:

void C2F() drawpolymarkXfig ( char *  str,
integer n,
integer vx,
integer vy,
integer v5,
integer v6,
integer v7,
double *  dx1,
double *  dx2,
double *  dx3,
double *  dx4 
)

by vx and vy (vx[i],vy[i])

Definition at line 1744 of file periFig.c.

References C2F, BCG::CurHardSymbSize, displaysymbolsXfig(), FALSE, BCG::FontId, BCG::FontSize, i, PI0, ScilabGCXfig, ScilabGCXfig_is_initialized, sciprint(), sz, and xsetfontXfig().

01745 { 
01746   integer keepid,keepsize,  i=1, sz;
01747   
01748   if ( ScilabGCXfig_is_initialized == FALSE ) {
01749     sciprint("xinit must be called before any action \r\n");
01750     return;
01751   }
01752   
01753   sz=ScilabGCXfig.CurHardSymbSize;
01754   keepid =  ScilabGCXfig.FontId;
01755   keepsize= ScilabGCXfig.FontSize;
01756   C2F(xsetfontXfig)(&i,&sz,PI0,PI0);
01757   C2F(displaysymbolsXfig)(str,n,vx,vy);
01758   C2F(xsetfontXfig)(&keepid,&keepsize,PI0,PI0);
01759 }

Here is the call graph for this function:

void C2F() drawrectanglesXfig ( char *  str,
integer vects,
integer fillvect,
integer n,
integer v5,
integer v6,
integer v7,
double *  dx1,
double *  dx2,
double *  dx3,
double *  dx4 
)

( see periX11.c )

Definition at line 1522 of file periFig.c.

References C2F, FALSE, getpatternXfig(), L, PI0, ScilabGCXfig_is_initialized, sciprint(), setpatternXfig(), vdouble, and WriteGenericXfig().

01523 {
01524   integer cpat,verb,num;
01525   verb=0;
01526 
01527   if ( ScilabGCXfig_is_initialized == FALSE ) {
01528     sciprint("xinit must be called before any action \r\n");
01529     return;
01530   }
01531 
01532   C2F(getpatternXfig)(&verb,&cpat,&num,vdouble);
01533   C2F(WriteGenericXfig)("drawbox",*n,(integer)4L,vects,vects,4*(*n),(integer)0L,fillvect);
01534   C2F(setpatternXfig)(&(cpat),PI0,PI0,PI0);
01535 }

Here is the call graph for this function:

void C2F() drawrectangleXfig ( char *  str,
integer x,
integer y,
integer width,
integer height,
integer v6,
integer v7,
double *  dx1,
double *  dx2,
double *  dx3,
double *  dx4 
)

Draw one rectangle

Definition at line 1480 of file periFig.c.

References C2F, drawrectanglesXfig(), FALSE, i, PD0, PI0, ScilabGCXfig_is_initialized, and sciprint().

01481 { 
01482   integer i = 1;
01483   integer fvect[1] ;
01484   integer vects[4];
01485   vects[0]= *x;vects[1]= *y;vects[2]= *width;
01486   vects[3]= *height;
01487   fvect[0] = 0;
01488   
01489   if ( ScilabGCXfig_is_initialized == FALSE ) {
01490     sciprint("xinit must be called before any action \r\n");
01491     return;
01492   }
01493   
01494   C2F(drawrectanglesXfig)(str,vects,fvect,&i,PI0,PI0,PI0,PD0,PD0,PD0,PD0);
01495 }

Here is the call graph for this function:

void C2F() drawsegmentsXfig ( char *  str,
integer vx,
integer vy,
integer n,
integer style,
integer iflag,
integer v7,
double *  dx1,
double *  dx2,
double *  dx3,
double *  dx4 
)

if iflag == 1 style[i] gives the style for each segment if iflag == 0 (if *style >0 ) it gives the style for all the segment (if *style <0 ) The default style is used for all the segment

in case of min(max(,))

Definition at line 1389 of file periFig.c.

References C2F, BCG::CurLineWidth, BCG::CurPattern, FALSE, file, FPRINTF, getdashXfig(), i, prec_fact, ScilabGCXfig, ScilabGCXfig_is_initialized, sciprint(), set_color(), set_dash(), vdouble, and WHITE.

01390 {
01391   integer NDvalue,i;
01392   int l_style,style_val,pen_color,fill_color,areafill;
01393   integer verbose=0,Dnarg,Dvalue[10],Dvalue1[10];
01394 
01395   if ( ScilabGCXfig_is_initialized == FALSE ) {
01396     sciprint("xinit must be called before any action \r\n");
01397     return;
01398   }
01399 
01400   /* store the current values */
01401 
01402   /* F.Leray 08.03.04 Init. here for Dvalue[0]: Pb here what is the correct value for Dvalue[0] ?? */
01403   Dvalue[0] = 1;
01404 
01405   for ( i =0 ; i < *n/2 ; i++)
01406     {
01407       if ( (int) *iflag == 0) 
01408         NDvalue=(*style < 0) ? Dvalue[0] : *style;
01409       else
01410         NDvalue=(int) style[i];
01411 
01412 
01414       set_color(NDvalue,&pen_color);
01415       C2F(getdashXfig)(&verbose,Dvalue1,&Dnarg,vdouble);
01416       set_dash(Dvalue1[0],&l_style,&style_val);
01417 
01418       areafill = -1;
01419       fill_color = WHITE;
01420       FPRINTF((file,"# Object : %d %s -<%d>- \n", (int)i,"segments", ScilabGCXfig.CurPattern));
01421       FPRINTF((file,"2 1 %d %d %d %d 0 0 -1 %d.000 0 0 0 0 0 2\n",
01422               l_style,
01423               ScilabGCXfig.CurLineWidth*prec_fact/16,
01424               pen_color,fill_color,
01425               style_val
01426               ));
01427       FPRINTF((file," %d %d %d %d \n",
01428               (int)vx[2*i], (int)vy[2*i], (int)vx[2*i+1], (int)vy[2*i+1]));
01429     }
01430 }

Here is the call graph for this function:

static int C2F() FigQueryFont ( char *  name  )  [static]

Referenced by loadfamilyXfig().

Here is the caller graph for this function:

static void C2F() FileInitFromScreenXfig ( void   )  [static]

Definition at line 2809 of file periFig.c.

References b, C2F, CheckColormap(), BCG::CurColorStatus, DEFAULTNUMCOLORS, FPRINTF, g, get_b(), get_g(), get_r(), getwindowdimXfig(), BCG::IDLastPattern, InitScilabGCXfig(), BCG::NumBackground, BCG::Numcolors, BCG::NumForeground, ScilabGCXfig, ScilabGCXfig_is_initialized, TRUE, and vdouble.

Referenced by initgraphicfromscreenXfig().

02810 {
02811   int m;
02812   integer x[2],verbose,narg;
02813   verbose = 0; 
02814   C2F(getwindowdimXfig)(&verbose,x,&narg,vdouble);
02815   FPRINTF((file,"#FIG 3.1\nPortrait\nCenter\nInches\n1200 2\n"));
02816   ScilabGCXfig_is_initialized = TRUE; /* add the flag ScilabGCXfig_is_initialized to test if xinit has been called */
02817   C2F(InitScilabGCXfig)(PI0,PI0,PI0,PI0);
02818   if (  CheckColormap(&m) == 1) 
02819     { 
02820       int i;
02821       float r,g,b;
02822       ScilabGCXfig.Numcolors = m;
02823       ScilabGCXfig.NumForeground = m;
02824       ScilabGCXfig.NumBackground = m + 1;
02825 
02826       if (ScilabGCXfig.CurColorStatus == 1) 
02827         {
02828           ScilabGCXfig.IDLastPattern = ScilabGCXfig.Numcolors - 1;
02829         }
02830       for ( i=0; i < m ; i++)
02831         {
02832           unsigned short ur,ug,ub;
02833           get_r(i,&r);
02834           get_g(i,&g);
02835           get_b(i,&b);
02836           ur = (unsigned short) (65535.0*r);
02837           ug = (unsigned short) (65535.0*g);
02838           ub = (unsigned short) (65535.0*b); 
02839           ur = ur >> 8 ;
02840           ug = ug >> 8 ;        
02841           ub = ub >> 8 ; 
02842           FPRINTF((file,"0 %d #%02x%02x%02x\n",32+i,ur,ug,ub));
02843         }
02844       FPRINTF((file,"0 %d #%02x%02x%02x \n",32+m,0,0,0));
02845       FPRINTF((file,"0 %d #%02x%02x%02x \n",32+m+1,255,255,255));
02846     }
02847   else 
02848     {
02850       m = DEFAULTNUMCOLORS;
02851       ScilabGCXfig.Numcolors = m;
02852       ScilabGCXfig.IDLastPattern = m - 1;
02853       ScilabGCXfig.NumForeground = m;
02854       ScilabGCXfig.NumBackground = m + 1;
02855       FPRINTF((file,"0 %d #%02x%02x%02x \n",32+m,0,0,0));
02856       FPRINTF((file,"0 %d #%02x%02x%02x \n",32+m+1,255,255,255));
02857     }
02858 
02859   FPRINTF((file,"2 2 0 0 -1 -1 0 0 -1 0.000 0 0 0 0 0 5\n"));
02860   FPRINTF((file," %d %d %d %d %d %d %d %d %d %d \n",
02861           0,0,(int)x[0],0,(int)x[0],(int)x[1],0,(int)x[1],0,0));
02862 }

Here is the call graph for this function:

Here is the caller graph for this function:

static void C2F() FileInitXfig ( void   )  [static]

Definition at line 2116 of file periFig.c.

References C2F, DEFAULTNUMCOLORS, file, FPRINTF, getwindowdimXfig(), BCG::IDLastPattern, InitScilabGCXfig(), BCG::NumBackground, BCG::Numcolors, BCG::NumForeground, PI0, ScilabGCXfig, ScilabGCXfig_is_initialized, TRUE, and vdouble.

Referenced by initgraphicXfig().

02117 {
02118   int m;
02119   integer x[2],verbose,narg;
02120   verbose = 0; 
02121   C2F(getwindowdimXfig)(&verbose,x,&narg,vdouble);
02122   FPRINTF((file,"#FIG 3.1\nPortrait\nCenter\nInches\n1200 2\n"));
02123   ScilabGCXfig_is_initialized = TRUE; /* add the flag ScilabGCXfig_is_initialized to test if xinit has been called */
02124   C2F(InitScilabGCXfig)(PI0,PI0,PI0,PI0);
02125 
02127   m = DEFAULTNUMCOLORS;
02128   ScilabGCXfig.Numcolors = m;
02129   ScilabGCXfig.IDLastPattern = m - 1;
02130   ScilabGCXfig.NumForeground = m;
02131   ScilabGCXfig.NumBackground = m + 1;
02132   FPRINTF((file,"0 %d #%02x%02x%02x \n",32+m,0,0,0));
02133   FPRINTF((file,"0 %d #%02x%02x%02x \n",32+m+1,255,255,255));
02134   
02135 /*     } */
02136 
02137   FPRINTF((file,"2 2 0 0 -1 -1 0 0 -1 0.000 0 0 0 0 0 5\n"));
02138   FPRINTF((file," %d %d %d %d %d %d %d %d %d %d \n",
02139            0,0,(int)x[0],0,(int)x[0],(int)x[1],0,(int)x[1],0,0));
02140 }

Here is the call graph for this function:

Here is the caller graph for this function:

void C2F() fillarcsXfig ( char *  str,
integer vects,
integer fillvect,
integer n,
integer v5,
integer v6,
integer v7,
double *  dv1,
double *  dv2,
double *  dv3,
double *  dv4 
)

Definition at line 1559 of file periFig.c.

References C2F, FALSE, fillarcXfig(), getpatternXfig(), i, PI0, ScilabGCXfig_is_initialized, sciprint(), setpatternXfig(), and vdouble.

01560 {
01561   integer verbose=0,Dnarg,pat;
01562   int i,i6;
01563 
01564   if ( ScilabGCXfig_is_initialized == FALSE ) {
01565     sciprint("xinit must be called before any action \r\n");
01566     return;
01567   }
01568 
01569   /* store the current values */
01570   C2F(getpatternXfig)(&verbose,&pat,&Dnarg,vdouble);
01571   for ( i=0 ; i < *n ; i++) 
01572     {
01574       C2F(setpatternXfig)(&fillvect[i],PI0,PI0,PI0);
01575       i6=6*i;
01576       C2F(fillarcXfig)(str,&(vects[i6]),&(vects[i6+1]),&(vects[i6+2]),
01577                       &(vects[i6+3]),&(vects[i6+4]),&(vects[i6+5]) ,dv1, dv2, dv3, dv4);
01578 
01579     }
01580   C2F(setpatternXfig)(&pat,PI0,PI0,PI0);
01581 }

Here is the call graph for this function:

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 
)

caution angle=degreangle*64

Definition at line 1543 of file periFig.c.

References C2F, FALSE, getpatternXfig(), L, PI0, ScilabGCXfig_is_initialized, sciprint(), setpatternXfig(), vdouble, and WriteGenericXfig().

01544 {
01545   integer cpat,verb,num;
01546   verb=0;
01547 
01548   if ( ScilabGCXfig_is_initialized == FALSE ) {
01549     sciprint("xinit must be called before any action \r\n");
01550     return;
01551   }
01552 
01553 
01554   C2F(getpatternXfig)(&verb,&cpat,&num,vdouble);
01555   C2F(WriteGenericXfig)("drawarc",*n,(integer)6L,vects,vects,6*(*n),(integer)0L,fillvect);
01556   C2F(setpatternXfig)(&(cpat),PI0,PI0,PI0);
01557 }

Here is the call graph for this function:

void C2F() fillarcXfig ( char *  str,
integer x,
integer y,
integer width,
integer height,
integer angle1,
integer angle2,
double *  dv1,
double *  dv2,
double *  dv3,
double *  dv4 
)

Definition at line 1701 of file periFig.c.

References alpha, C2F, close(), fact(), FALSE, fillpolylineXfig(), Min, PI0, ScilabGCXfig_is_initialized, and sciprint().

01702 { 
01703   integer vx[365],vy[365],k,k0,kmax,n;
01704   float alpha,fact= (float) 0.01745329251994330,w,h;
01705   integer close = 1;
01706 
01707   if ( ScilabGCXfig_is_initialized == FALSE ) {
01708     sciprint("xinit must be called before any action \r\n");
01709     return;
01710   }
01711 
01712   n=Min((*angle2/64),360);
01713 
01714   w = (float) ((*width)/2.0);
01715   h = (float) ((*height)/2.0);
01716   k0 = 0;
01717   kmax = n-1;
01718 
01719   if (n != 360) {
01720   vx[0] = (integer) (*x + w);
01721   vy[0] = (integer) (*y + h);
01722   k0 = 1;
01723   kmax = n;}
01724 
01725   for (k = k0; k <= kmax; ++k) {
01726     alpha=((*angle1/64)+k)*fact;
01727     vx[k] = (integer) (*x + w*(cos(alpha)+1.0));
01728     vy[k] = (integer) (*y + h*(-sin(alpha)+1.0));}
01729   if (n != 360) {
01730   n++;
01731   vx[n] = (integer) (*x + ((*width)/2.0));
01732   vy[n] = (integer) (*y + ((*height)/2.0)); 
01733   n++;
01734   }
01735   C2F(fillpolylineXfig)(str, &n, vx, vy, &close, PI0, PI0, dv1, dv2, dv3, dv4);
01736  }

Here is the call graph for this function:

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 
)

with current pattern

Definition at line 1684 of file periFig.c.

References C2F, FALSE, fillarcsXfig(), getpatternXfig(), i, PD0, PI0, ScilabGCXfig_is_initialized, sciprint(), and vdouble.

01685 { 
01686   integer i =1;
01687   integer verb=0,cpat,num ;
01688   integer vects[6];
01689 
01690   if ( ScilabGCXfig_is_initialized == FALSE ) {
01691     sciprint("xinit must be called before any action \r\n");
01692     return;
01693   }
01694 
01695   vects[0]= *x;vects[1]= *y;vects[2]= *width;
01696   vects[3]= *height;vects[4]= *angle1;vects[5]= *angle2;
01697   C2F(getpatternXfig)(&verb,&cpat,&num,vdouble);
01698   C2F(fillarcsXfig)(str,vects,&cpat,&i,PI0,PI0,PI0,PD0,PD0,PD0,PD0);
01699  }

Here is the call graph for this function:

void C2F() fillpolylinesXfig ( char *  str,
integer vectsx,
integer vectsy,
integer fillvect,
integer n,
integer p,
integer v7,
double *  dx1,
double *  dx2,
double *  dx3,
double *  dx4 
)

the polygon is closed by the routine

Definition at line 1896 of file periFig.c.

References C2F, checkPolygons(), CoordModeOrigin, BCG::CurVectorStyle, FALSE, file, FPRINTF, getpatternXfig(), L, PI0, ScilabGCXfig, ScilabGCXfig_is_initialized, sciprint(), setpatternXfig(), vdouble, and WriteGenericXfig().

01897 {
01898   integer cpat,verb,num;
01899   verb=0;
01900 
01901   if ( ScilabGCXfig_is_initialized == FALSE ) {
01902     sciprint("xinit must be called before any action \r\n");
01903     return;
01904   }
01905 
01906   /* check if every polygon is not flat */
01907   if ( !checkPolygons( vectsx, vectsy, *p, *n ) )
01908   {
01909     return ;
01910   }
01911 
01912   if ( ScilabGCXfig.CurVectorStyle !=  CoordModeOrigin )
01913   {
01914     FPRINTF( (file,"#/absolu false def\n") ) ;
01915   }
01916   C2F(getpatternXfig)(&verb,&cpat,&num,vdouble);
01917   C2F(WriteGenericXfig)("drawpoly",*n,(*p)*2,vectsx,vectsy,(*p)*(*n),(integer)1L,
01918                         fillvect);
01919   C2F(setpatternXfig)(&(cpat),PI0,PI0,PI0);
01920   FPRINTF((file,"#/absolu true def\n"));
01921 }

Here is the call graph for this function:

void C2F() fillpolylineXfig ( char *  str,
integer n,
integer vx,
integer vy,
integer closeareaflag,
integer v6,
integer v7,
double *  dx1,
double *  dx2,
double *  dx3,
double *  dx4 
)

Fill the polygon

just fill ==> cpat < 0

Definition at line 2060 of file periFig.c.

References C2F, FALSE, fillpolylinesXfig(), getpatternXfig(), i, PD0, PI0, ScilabGCXfig_is_initialized, sciprint(), and vdouble.

02061 {
02062   integer i = 1;
02063   integer cpat,verb=0,num;
02064 
02065   if ( ScilabGCXfig_is_initialized == FALSE ) {
02066     sciprint("xinit must be called before any action \r\n");
02067     return;
02068   }
02069 
02070   C2F(getpatternXfig)(&verb,&cpat,&num,vdouble);
02072   cpat = -cpat;
02073 /*   C2F(analyze_pointsXfigForFilling)(*n, vx, vy, 1, cpat); */
02074   C2F(fillpolylinesXfig)(str,vx,vy,&cpat,&i,n,PI0,PD0,PD0,PD0,PD0);
02075 }

Here is the call graph for this function:

void C2F() fillrectangleXfig ( char *  str,
integer x,
integer y,
integer width,
integer height,
integer v6,
integer v7,
double *  dx1,
double *  dx2,
double *  dx3,
double *  dx4 
)

Draw a filled rectangle

Definition at line 1499 of file periFig.c.

References C2F, drawrectanglesXfig(), FALSE, getpatternXfig(), i, PD0, PI0, ScilabGCXfig_is_initialized, sciprint(), and vdouble.

01500 { 
01501   integer i = 1;
01502   integer vects[4],verb=0,cpat,num;
01503 
01504   if ( ScilabGCXfig_is_initialized == FALSE ) {
01505     sciprint("xinit must be called before any action \r\n");
01506     return;
01507   }
01508 
01509   vects[0]= *x;vects[1]= *y;vects[2]= *width;
01510   vects[3]= *height ; 
01511   C2F(getpatternXfig)(&verb,&cpat,&num,vdouble);
01512   C2F(drawrectanglesXfig)(str,vects,&cpat,&i,PI0,PI0,PI0,PD0,PD0,PD0,PD0);    
01513 }

Here is the call graph for this function:

void C2F() gemptyXfig ( integer verbose,
integer v2,
integer v3,
double *  dummy 
)

Definition at line 1126 of file periFig.c.

References sciprint().

01127 {
01128   if ( *verbose ==1 ) sciprint("\n No operation ");
01129 }

Here is the call graph for this function:

void C2F() get_dash_and_color_Xfig ( integer verbose,
integer value,
integer narg,
double *  dummy 
)

Definition at line 653 of file periFig.c.

References C2F, dummy, FALSE, getdashXfig(), getpatternXfig(), ScilabGCXfig_is_initialized, and sciprint().

Referenced by drawarcsXfig(), and drawpolylinesXfig().

00654 {
00655   /*may be improved replacing 6 by narg */
00656   
00657   if ( ScilabGCXfig_is_initialized == FALSE ) {
00658     sciprint("xinit must be called before any action \r\n");
00659     return;
00660   }
00661   
00662   C2F(getdashXfig)(verbose, value, narg,dummy);
00663   C2F(getpatternXfig)(verbose, value+6, narg,dummy);
00664   *narg = 6;
00665 }

Here is the call graph for this function:

Here is the caller graph for this function:

void C2F() get_dash_or_color_Xfig ( integer verbose,
integer value,
integer narg,
double *  dummy 
)

to get the current dash-style

Definition at line 609 of file periFig.c.

References C2F, BCG::CurColor, BCG::CurColorStatus, dummy, FALSE, getdashXfig(), ScilabGCXfig, ScilabGCXfig_is_initialized, and sciprint().

00610 {
00611   *narg =1 ;
00612 
00613   if ( ScilabGCXfig_is_initialized == FALSE ) {
00614     sciprint("xinit must be called before any action \r\n");
00615     return;
00616   }
00617   
00618   if ( ScilabGCXfig.CurColorStatus ==1) 
00619     {
00620       *value=ScilabGCXfig.CurColor + 1;
00621       if (*verbose == 1) sciprint("Color %d",(int)*value);
00622       return;
00623     }
00624 
00625   C2F(getdashXfig)(verbose, value+1, narg,dummy);
00626   *narg=*narg+1;
00627     
00628 }

Here is the call graph for this function:

void C2F() getabsourelXfig ( integer verbose,
integer num,
integer narg,
double *  dummy 
)

to get information on absolute or relative mode

Definition at line 338 of file periFig.c.

References CoordModeOrigin, BCG::CurVectorStyle, ScilabGCXfig, and sciprint().

00339 {
00340   *narg = 1;
00341   *num = ScilabGCXfig.CurVectorStyle  ;
00342   if (*verbose == 1) 
00343     {
00344       if (ScilabGCXfig.CurVectorStyle == CoordModeOrigin)
00345         sciprint("\nTrace Absolu");
00346       else 
00347         sciprint("\nTrace Relatif");
00348     }
00349 }

Here is the call graph for this function:

void C2F() getalufunctionXfig ( integer verbose,
integer value,
integer narg,
double *  dummy 
)

To get the value of the alufunction

Definition at line 433 of file periFig.c.

References AluStrucXfig_, BCG::CurDrawFunction, info, ScilabGCXfig, and sciprint().

00434 { 
00435   *narg =1 ;
00436   *value = ScilabGCXfig.CurDrawFunction ;
00437    if (*verbose ==1 ) 
00438      { 
00439        sciprint("\nThe Alufunction is %s",AluStrucXfig_[*value].name);
00440        sciprint("-> <%s>\r\n", AluStrucXfig_[*value].info);
00441      }
00442 }

Here is the call graph for this function:

void C2F() getbackgroundXfig ( integer verbose,
integer num,
integer narg,
double *  dummy 
)

Definition at line 915 of file periFig.c.

References BCG::CurColorStatus, FALSE, BCG::NumBackground, ScilabGCXfig, ScilabGCXfig_is_initialized, and sciprint().

00916 { 
00917   *narg=1;
00918   
00919   if ( ScilabGCXfig_is_initialized == FALSE ) {
00920     sciprint("xinit must be called before any action \r\n");
00921     return;
00922   }
00923   
00924   if ( ScilabGCXfig.CurColorStatus == 1 ) 
00925     {
00926       *num = ScilabGCXfig.NumBackground + 1;
00927     }
00928   else 
00929     {
00930       *num = 1;
00931     }
00932   if (*verbose == 1) 
00933     sciprint("\n Background : %d\r\n",*num);
00934 }

Here is the call graph for this function:

void C2F() getclipXfig ( integer verbose,
integer x,
integer narg,
double *  dummy 
)

Get the boundaries of the current clip zone

Definition at line 296 of file periFig.c.

References BCG::ClipRegionSet, BCG::CurClipRegion, ScilabGCXfig, and sciprint().

00297 {
00298   x[0] = ScilabGCXfig.ClipRegionSet;
00299   if ( x[0] == 1)
00300     {
00301       *narg = 5;
00302       x[1] =ScilabGCXfig.CurClipRegion[0];
00303       x[2] =ScilabGCXfig.CurClipRegion[1];
00304       x[3] =ScilabGCXfig.CurClipRegion[2];
00305       x[4] =ScilabGCXfig.CurClipRegion[3];
00306     }
00307   else *narg = 1;
00308   if (*verbose == 1)
00309     {
00310       if (ScilabGCXfig.ClipRegionSet == 1)
00311         sciprint("\nThere's a Clip Region :x:%d,y:%d,w:%d,h:%d\r\n",
00312                  ScilabGCXfig.CurClipRegion[0],
00313                  ScilabGCXfig.CurClipRegion[1],
00314                  ScilabGCXfig.CurClipRegion[2],
00315                  ScilabGCXfig.CurClipRegion[3]);
00316       else 
00317         sciprint("\nNo Clip Region");
00318     }
00319 }

Here is the call graph for this function:

void getcolordef ( integer screenc  ) 

Definition at line 4090 of file periWin.c.

04091 {
04092   *screenc= screencolor;
04093 }

void C2F() getcolormapsizeXfig ( integer v1,
integer v2,
integer v3,
double *  val 
)

Definition at line 815 of file periFig.c.

References FALSE, BCG::Numcolors, ScilabGCXfig, ScilabGCXfig_is_initialized, and sciprint().

00816 {
00817   if ( ScilabGCXfig_is_initialized == FALSE ) {
00818     sciprint("xinit must be called before any action \r\n");
00819     *v3 = 1;
00820     return;
00821   }
00822 
00823   *v2 = ScilabGCXfig.Numcolors;
00824 }

Here is the call graph for this function:

void C2F() getcolormapXfig ( integer v1,
integer v2,
integer v3,
double *  val 
)

Definition at line 828 of file periFig.c.

References BCG::Blue, FALSE, BCG::Green, i, BCG::Numcolors, BCG::Red, ScilabGCXfig, ScilabGCXfig_is_initialized, sciprint(), and val.

00829 {
00830   int m;
00831   int i;
00832   *v3 = 0;
00833   
00834   if ( ScilabGCXfig_is_initialized == FALSE ) {
00835     sciprint("xinit must be called before any action \r\n");
00836     *v3 = 1;
00837     return;
00838   }
00839   
00840   
00841   m = ScilabGCXfig.Numcolors;
00842 
00843   for (i = 0; i < m; i++) {
00844     val[i] = (double)ScilabGCXfig.Red[i];
00845     val[i+m] = (double)ScilabGCXfig.Green[i];
00846     val[i+2*m] = (double)ScilabGCXfig.Blue[i];
00847   }
00848 }

Here is the call graph for this function:

void C2F() getcursymbolXfig ( integer verbose,
integer symb,
integer narg,
double *  dummy 
)

To get the current mark id

Definition at line 1096 of file periFig.c.

References BCG::CurHardSymb, BCG::CurHardSymbSize, FALSE, ScilabGCXfig, ScilabGCXfig_is_initialized, sciprint(), and sizeXfig_.

Referenced by drawpolylinesXfig().

01097 {
01098   *narg =2 ;
01099 
01100   if ( ScilabGCXfig_is_initialized == FALSE ) {
01101     sciprint("xinit must be called before any action \r\n");
01102     return;
01103   }
01104 
01105   symb[0] = ScilabGCXfig.CurHardSymb ;
01106   symb[1] = ScilabGCXfig.CurHardSymbSize ;
01107   if (*verbose == 1) 
01108   {
01109     sciprint("\nMark : %d",ScilabGCXfig.CurHardSymb);
01110     sciprint("at size %s pts\r\n",
01111           sizeXfig_[ScilabGCXfig.CurHardSymbSize]);
01112   }
01113 }

Here is the call graph for this function:

Here is the caller graph for this function:

void C2F() getcurwinXfig ( integer verbose,
integer intnum,
integer narg,
double *  dummy 
)

Get the id number of the Current Graphic Window

Definition at line 250 of file periFig.c.

References BCG::CurWindow, ScilabGCXfig, and sciprint().

00251 {
00252   *narg =1 ;
00253   *intnum = ScilabGCXfig.CurWindow ;
00254   if (*verbose == 1) 
00255     sciprint("\nJust one graphic page at a time ");
00256 }

Here is the call graph for this function:

void C2F() getdashXfig ( integer verbose,
integer value,
integer narg,
double *  dummy 
)

Referenced by drawarcsXfig_old(), drawarrowsXfig(), drawaxisXfig(), drawsegmentsXfig(), get_dash_and_color_Xfig(), and get_dash_or_color_Xfig().

Here is the caller graph for this function:

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 
)

get the minimal and maximal font size

Definition at line 2311 of file periFig.c.

References FONTMAXSIZE.

02312 {
02313   *sizeMin = 0 ;
02314   *sizeMax = FONTMAXSIZE ;
02315 }

void C2F() getforegroundXfig ( integer verbose,
integer num,
integer narg,
double *  dummy 
)

Definition at line 953 of file periFig.c.

References BCG::CurColorStatus, FALSE, BCG::IDLastPattern, BCG::NumForeground, ScilabGCXfig, ScilabGCXfig_is_initialized, and sciprint().

00954 { 
00955   *narg=1;
00956 
00957   if ( ScilabGCXfig_is_initialized == FALSE ) {
00958     sciprint("xinit must be called before any action \r\n");
00959     return;
00960   }
00961 
00962   if ( ScilabGCXfig.CurColorStatus == 1 ) 
00963     {
00964       *num = ScilabGCXfig.NumForeground + 1;
00965     }
00966   else 
00967     {
00968       *num = ScilabGCXfig.IDLastPattern + 1;
00969     }
00970   if (*verbose == 1) 
00971     sciprint("\n Foreground : %d\r\n",*num);
00972 }

Here is the call graph for this function:

void C2F() gethidden3dXfig ( integer verbose,
integer num,
integer narg,
double *  dummy 
)

Definition at line 991 of file periFig.c.

References BCG::CurColorStatus, FALSE, BCG::NumHidden3d, ScilabGCXfig, ScilabGCXfig_is_initialized, and sciprint().

00992 { 
00993   *narg=1;
00994 
00995  if ( ScilabGCXfig_is_initialized == FALSE ) {
00996     sciprint("xinit must be called before any action \r\n");
00997     return;
00998   }
00999 
01000   if ( ScilabGCXfig.CurColorStatus == 1 ) 
01001     {
01002       *num = ScilabGCXfig.NumHidden3d + 1;
01003     }
01004   else 
01005     {
01006       *num = 1; 
01007     }
01008   if (*verbose == 1) 
01009     sciprint("\n Hidden3d : %d\r\n",*num);
01010 }

Here is the call graph for this function:

void C2F() getlastXfig ( integer verbose,
integer num,
integer narg,
double *  dummy 
)

To get the id of the last pattern

Definition at line 512 of file periFig.c.

References BCG::IDLastPattern, ScilabGCXfig, and sciprint().

00513 {
00514   *num = ScilabGCXfig.IDLastPattern +1 ;
00515   if (*verbose==1)
00516     sciprint("\n Id of White Pattern %d\r\n",(int)*num);
00517   *narg=1;
00518 }

Here is the call graph for this function:

void C2F() getpatternXfig ( integer verbose,
integer num,
integer narg,
double *  dummy 
)

To get the id of the current pattern

Definition at line 491 of file periFig.c.

References BCG::CurColor, BCG::CurColorStatus, BCG::CurPattern, ScilabGCXfig, and sciprint().

Referenced by displaystringXfig(), drawrectanglesXfig(), fillarcsXfig(), fillarcsXfig_old(), fillarcXfig_old(), fillpolylinesXfig(), fillpolylineXfig(), fillrectangleXfig(), and get_dash_and_color_Xfig().

00492 { 
00493   *narg=1;
00494   if ( ScilabGCXfig.CurColorStatus ==1) 
00495     {
00496       *num = ScilabGCXfig.CurColor+1 ;
00497       if (*verbose == 1) 
00498         sciprint("\n Color : %d\r\n",
00499                  ScilabGCXfig.CurPattern);
00500     }
00501   else 
00502     {
00503       *num = ScilabGCXfig.CurPattern +1;
00504       if (*verbose == 1) 
00505         sciprint("\n Pattern : %d\r\n",
00506                  ScilabGCXfig.CurPattern);
00507     }
00508 }

Here is the call graph for this function:

Here is the caller graph for this function:

void C2F() getscilabFigureXfig ( integer verbose,
integer x,
integer narg,
double *  figure 
)

void C2F() getscilabVersionXfig ( integer verbose,
integer vers,
integer narg,
double *  dummy 
)

void C2F() getscilabxgcXfig ( integer verbose,
integer x,
integer narg,
double *  dummy 
)

void C2F() getthicknessXfig ( integer verbose,
integer value,
integer narg,
double *  dummy 
)

to get the thicknes value

Definition at line 455 of file periFig.c.

References BCG::CurLineWidth, ScilabGCXfig, and sciprint().

00456 {
00457   *narg =1 ;
00458   *value = ScilabGCXfig.CurLineWidth ;
00459   if (*verbose ==1 ) 
00460     sciprint("\nLine Width:%d\r\n", ScilabGCXfig.CurLineWidth ) ;
00461 }

Here is the call graph for this function:

void C2F() getusecolorXfig ( integer verbose,
integer num,
integer narg,
double *  dummy 
)

Definition at line 712 of file periFig.c.

References BCG::CurColorStatus, FALSE, ScilabGCXfig, ScilabGCXfig_is_initialized, and sciprint().

00713 {
00714 
00715   if ( ScilabGCXfig_is_initialized == FALSE ) {
00716     sciprint("xinit must be called before any action \r\n");
00717     return;
00718   }
00719  
00720   *num = ScilabGCXfig.CurColorStatus;
00721 
00722   if (*verbose == 1) 
00723     sciprint("\n Use color %d\r\n",(int)*num);
00724   *narg=1;
00725 }

Here is the call graph for this function:

void C2F() getwindowdimXfig ( integer verbose,
integer x,
integer narg,
double *  dummy 
)

Definition at line 185 of file periFig.c.

References prec_fact, sciprint(), and x.

Referenced by clearwindowXfig(), FileInitFromScreenXfig(), and FileInitXfig().

00186 {     
00187   *narg = 2;
00188   x[0]= 600*prec_fact;
00189   x[1]= 424*prec_fact;
00190   if (*verbose == 1) 
00191     sciprint("\n CWindow dim :%d,%d\r\n",(int)x[0],(int)x[1]);
00192 } 

Here is the call graph for this function:

Here is the caller graph for this function:

void C2F() getwindowposXfig ( integer verbose,
integer x,
integer narg,
double *  dummy 
)

to get the window upper-left pointeger coordinates return 0,0

Definition at line 202 of file periFig.c.

References sciprint().

00203 {
00204   *narg = 2;
00205   x[0]= x[1]=0;
00206   if (*verbose == 1) 
00207     sciprint("\n CWindow position :%d,%d\r\n",(int)x[0],(int)x[1]);
00208  }

Here is the call graph for this function:

void C2F() idfromnameXfig ( char *  name1,
integer num 
)

Referenced by setalufunctionXfig().

Here is the caller graph for this function:

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 
)

Definition at line 2777 of file periFig.c.

References C2F, BCG::CurWindow, FileInitFromScreenXfig(), loadfamilyXfig(), ScilabGCXfig, and xendgraphicXfig().

02778 { 
02779   static integer EntryCounter = 0;
02780   integer fnum;
02781   *v3 = 0;
02782   if (EntryCounter >= 1) C2F(xendgraphicXfig)();
02783   file=fopen(string,"w");
02784   if (file == 0) 
02785     {
02786       /*sciprint("Can't open file %s, I'll use stdout\r\n",string1);*/
02787       file = stdout;
02788       *v3 = 1;
02789       return;
02790     }
02791   if (EntryCounter == 0)
02792     { 
02793       fnum=0;      C2F(loadfamilyXfig)("Courier",&fnum,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0); 
02794       fnum=1;      C2F(loadfamilyXfig)("Symbol",&fnum,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0); 
02795       fnum=2;      C2F(loadfamilyXfig)("Times-Roman",&fnum,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0);
02796       fnum=3;      C2F(loadfamilyXfig)("Times-Italic",&fnum,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0); 
02797       fnum=4;      C2F(loadfamilyXfig)("Times-Bold",&fnum,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0);
02798       fnum=5;      C2F(loadfamilyXfig)("Times-BoldItalic",&fnum,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0); 
02799       fnum=6;      C2F(loadfamilyXfig)("Helvetica",&fnum,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0); 
02800       fnum=7;      C2F(loadfamilyXfig)("Helvetica-Oblique",&fnum,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0); 
02801       fnum=8;      C2F(loadfamilyXfig)("Helvetica-Bold",&fnum,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0); 
02802       fnum=9;      C2F(loadfamilyXfig)("Helvetica-BoldOblique",&fnum,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0); 
02803     }
02804   C2F(FileInitFromScreenXfig)();
02805   ScilabGCXfig.CurWindow =EntryCounter;
02806   EntryCounter =EntryCounter +1;
02807 }

Here is the call graph for this function:

void C2F() initgraphicXfig ( char *  string,
integer v2,
integer v3,
integer v4,
integer v5,
integer v6,
integer v7,
double *  dx1,
double *  dx2,
double *  dx3,
double *  dx4 
)

Definition at line 2082 of file periFig.c.

References C2F, BCG::CurWindow, file, FileInitXfig(), loadfamilyXfig(), PD0, PI0, ScilabGCXfig, and xendgraphicXfig().

02083 { 
02084   char string1[50];
02085   static integer EntryCounter = 0;
02086   integer fnum;
02087   *v3 = 0;
02088   if (EntryCounter >= 1) C2F(xendgraphicXfig)();
02089   strcpy(string1,string);
02090   file=fopen(string1,"w");
02091   if (file == 0) 
02092     {
02093       /*sciprint("Can't open file %s, I'll use stdout\r\n",string1);*/
02094       file = stdout;
02095       *v3 = 1;
02096       return;
02097     }
02098   if (EntryCounter == 0)
02099     { 
02100       fnum=0;      C2F(loadfamilyXfig)("Courier",&fnum,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0); 
02101       fnum=1;      C2F(loadfamilyXfig)("Symbol",&fnum,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0); 
02102       fnum=2;      C2F(loadfamilyXfig)("Times-Roman",&fnum,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0);
02103       fnum=3;      C2F(loadfamilyXfig)("Times-Italic",&fnum,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0); 
02104       fnum=4;      C2F(loadfamilyXfig)("Times-Bold",&fnum,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0);
02105       fnum=5;      C2F(loadfamilyXfig)("Times-BoldItalic",&fnum,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0); 
02106       fnum=6;      C2F(loadfamilyXfig)("Helvetica",&fnum,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0); 
02107       fnum=7;      C2F(loadfamilyXfig)("Helvetica-Oblique",&fnum,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0); 
02108       fnum=8;      C2F(loadfamilyXfig)("Helvetica-Bold",&fnum,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0); 
02109       fnum=9;      C2F(loadfamilyXfig)("Helvetica-BoldOblique",&fnum,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0); 
02110     }
02111   C2F(FileInitXfig)();
02112   ScilabGCXfig.CurWindow =EntryCounter;
02113   EntryCounter =EntryCounter +1;
02114 }

Here is the call graph for this function:

void C2F() InitScilabGCXfig ( integer v1,
integer v2,
integer v3,
integer v4 
)

Referenced by FileInitFromScreenXfig(), and FileInitXfig().

Here is the caller graph for this function:

void C2F() loadfamilyXfig ( char *  name,
integer j,
integer v3,
integer v4,
integer v5,
integer v6,
integer v7,
double *  dx1,
double *  dx2,
double *  dx3,
double *  dx4 
)

Definition at line 2192 of file periFig.c.

References C2F, FigQueryFont(), fname, FontInfoTabXfig_, FONTMAXSIZE, FontsListXfig_, SciFontInfo::ok, and sciprint().

02193 { 
02194   integer i ;
02195   for ( i = 0; i < FONTMAXSIZE ; i++)
02196     {
02197       FontsListXfig_[*j][i] = C2F(FigQueryFont)(name);
02198     }
02199   if  (FontsListXfig_[*j][0] == 0 )
02200           sciprint("\n unknown font family : %s\r\n",name);
02201   else 
02202     {FontInfoTabXfig_[*j].ok = 1;
02203      strcpy(FontInfoTabXfig_[*j].fname,name) ;}
02204 }

Here is the call graph for this function:

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 
)

Definition at line 2206 of file periFig.c.

References fname, FontInfoTabXfig_, and FONTNUMBER.

02207 { 
02208   integer i ;
02209   name[0]='\0';
02210   for (i=0;i<FONTNUMBER;i++) {
02211     strcat(name,FontInfoTabXfig_[i].fname);
02212     v3[i]=strlen(FontInfoTabXfig_[i].fname);
02213   }
02214   *j=FONTNUMBER;
02215 }

void C2F() ScilabGCGetorSetXfig ( char *  str,
integer  flag,
integer verbose,
integer x1,
integer x2,
integer x3,
integer x4,
integer x5,
integer x6,
double *  dx1 
)

Referenced by scilabgcgetXfig(), and scilabgcsetXfig().

Here is the caller graph for this function:

void C2F() scilabgcgetXfig ( char *  str,
integer verbose,
integer x1,
integer x2,
integer x3,
integer x4,
integer x5,
double *  dx1,
double *  dx2,
double *  dx3,
double *  dx4 
)

Definition at line 1207 of file periFig.c.

References C2F, L, and ScilabGCGetorSetXfig().

01208 {
01209   int x6=0;
01210   C2F(ScilabGCGetorSetXfig)(str,(integer)1L,verbose,x1,x2,x3,x4,x5,&x6,dx1);
01211 }

Here is the call graph for this function:

void C2F() scilabgcsetXfig ( char *  str,
integer x2,
integer x3,
integer x4,
integer x5,
integer x6,
integer x7,
double *  dx1,
double *  dx2,
double *  dx3,
double *  dx4 
)

Definition at line 1213 of file periFig.c.

References C2F, L, and ScilabGCGetorSetXfig().

01214 {
01215  integer verbose ;
01216  verbose = 0 ;
01217  C2F(ScilabGCGetorSetXfig)(str,(integer)0L,&verbose,x2,x3,x4,x5,x6,x7,dx1);
01218 }

Here is the call graph for this function:

void C2F() semptyXfig ( integer verbose,
integer v2,
integer v3,
integer v4 
)

Definition at line 1121 of file periFig.c.

References sciprint().

01122 {
01123   if ( *verbose ==1 ) sciprint("\n No operation ");
01124 }

Here is the call graph for this function:

static void set_color ( int  c,
int color 
) [static]

Definition at line 2405 of file periFig.c.

References CheckColormap(), BCG::CurColorStatus, DEFAULTBLACK, DEFAULTWHITE, FALSE, ScilabGCXfig, ScilabGCXfig_is_initialized, and sciprint().

Referenced by displaystringXfig(), drawarrowsXfig(), drawsegmentsXfig(), and set_dash_or_color().

02406 {
02407   int m;
02408 
02409   if ( ScilabGCXfig_is_initialized == FALSE ) {
02410     sciprint("xinit must be called before any action \r\n");
02411     return;
02412   }
02413 
02414   if (  ScilabGCXfig.CurColorStatus == 0) {
02415     *color=0;
02416     return;
02417   }
02418   *color = c-1 ; 
02419   if (  CheckColormap(&m) == 1) 
02420     {
02423       *color += 32;
02424     }
02425   else 
02426     {
02427       /* special case for B&white in the default colormap */
02428       if ( *color == 32 ) 
02429         {
02430           *color = DEFAULTBLACK;
02431         }
02432       else if ( *color == 33 ) 
02433         {
02434           *color = DEFAULTWHITE;
02435         }
02436     }
02437 }

Here is the call graph for this function:

Here is the caller graph for this function:

void C2F() set_cXfig ( integer  i  ) 

Referenced by set_dash_or_color_Xfig(), and setpatternXfig().

Here is the caller graph for this function:

static void set_dash ( int  dash,
int l_style,
int style_val 
) [static]

Definition at line 2439 of file periFig.c.

References Max, MAXDASH, and Min.

Referenced by drawarrowsXfig(), drawsegmentsXfig(), and set_dash_or_color().

02440 {
02441   int i;
02442   i = Max(Min(MAXDASH -1,dash-1),0);
02443   *l_style = DashTab[i];
02444   *style_val = DashTabStyle[i];
02445 }

Here is the caller graph for this function:

void C2F() set_dash_and_color_Xfig ( integer value,
integer v2,
integer v3,
integer v4 
)

Definition at line 573 of file periFig.c.

References C2F, FALSE, ScilabGCXfig_is_initialized, sciprint(), setdashXfig(), and setpatternXfig().

Referenced by drawarcsXfig(), and drawpolylinesXfig().

00574 {
00575   if ( ScilabGCXfig_is_initialized == FALSE ) {
00576     sciprint("xinit must be called before any action \r\n");
00577     return;
00578   }
00579 
00580   C2F(setdashXfig)(value, v2, v3, v4); 
00581   C2F(setpatternXfig)(value+6, v2, v3, v4);
00582 }

Here is the call graph for this function:

Here is the caller graph for this function:

static void set_dash_or_color ( int  dash,
int l_style,
int style_val,
int color 
) [static]

Definition at line 2447 of file periFig.c.

References BLACK, BCG::CurColorStatus, BCG::CurDashStyle, FALSE, ScilabGCXfig, ScilabGCXfig_is_initialized, sciprint(), set_color(), and set_dash().

Referenced by drawaxisXfig().

02448 {
02449   int j;  
02450 
02451   if ( ScilabGCXfig_is_initialized == FALSE ) {
02452     sciprint("xinit must be called before any action \r\n");
02453     return;
02454   }
02455 
02456   if (  ScilabGCXfig.CurColorStatus == 1) 
02457     {
02458       j= ScilabGCXfig.CurDashStyle + 1;
02459       set_dash(j,l_style,style_val);
02460       set_color(dash,color);
02461       *l_style = 0 ;
02462       *style_val=0;
02463     }
02464   else 
02465     {
02466       set_dash(dash,l_style,style_val);
02467       *color = BLACK;
02468     }
02469 }

Here is the call graph for this function:

Here is the caller graph for this function:

void C2F() set_dash_or_color_Xfig ( integer value,
integer v2,
integer v3,
integer v4 
)

Definition at line 535 of file periFig.c.

References C2F, BCG::CurColor, BCG::CurColorStatus, BCG::CurDashStyle, FALSE, i, Max, MAXDASH, Min, BCG::Numcolors, ScilabGCXfig, ScilabGCXfig_is_initialized, sciprint(), and set_cXfig().

00536 {
00537   integer maxdash = MAXDASH ;
00538   integer l3 ;
00539 
00540   if ( ScilabGCXfig_is_initialized == FALSE ) {
00541     sciprint("xinit must be called before any action \r\n");
00542     return;
00543   }
00544   
00545   if ( ScilabGCXfig.CurColorStatus ==1) 
00546     {
00547       int i;
00548       i= Max(0,Min(*value-1,ScilabGCXfig.Numcolors+1));
00549       ScilabGCXfig.CurColor =i;
00550       C2F(set_cXfig)(i);
00551     }
00552   else
00553     {
00554       l3 = Max(0,Min(maxdash-1,(*value)-1));
00555       ScilabGCXfig.CurDashStyle = l3;
00556     }
00557 }

Here is the call graph for this function:

void C2F() set_line_style_Xfig ( integer value,
integer v2,
integer v3,
integer v4 
)

Definition at line 585 of file periFig.c.

References C2F, BCG::CurColorStatus, BCG::CurDashStyle, FALSE, j, PI0, ScilabGCXfig, ScilabGCXfig_is_initialized, sciprint(), setdashXfig(), and setpatternXfig().

Referenced by drawarcsXfig(), and drawpolylinesXfig().

00586 {
00587   integer j; 
00588 
00589   if ( ScilabGCXfig_is_initialized == FALSE ) {
00590     sciprint("xinit must be called before any action \r\n");
00591     return;
00592   }
00593   
00594   if (ScilabGCXfig.CurColorStatus == 0) {
00595     C2F(setdashXfig)(value,PI0,PI0,PI0);
00596     C2F(setpatternXfig)((j=1,&j),PI0,PI0,PI0);
00597   }
00598   else {
00599     j= ScilabGCXfig.CurDashStyle + 1;
00600     C2F(setdashXfig)(&j,PI0,PI0,PI0);
00601     C2F(setpatternXfig)(value,PI0,PI0,PI0);
00602   }
00603 }

Here is the call graph for this function:

Here is the caller graph for this function:

void set_pattern_or_color ( int  pat,
int areafill,
int color 
)

Definition at line 2365 of file periFig.c.

References AREAF, CheckColormap(), BCG::CurColorStatus, DEFAULTBLACK, DEFAULTWHITE, FALSE, ScilabGCXfig, ScilabGCXfig_is_initialized, sciprint(), and WHITE.

02366 {
02367   if ( ScilabGCXfig_is_initialized == FALSE ) {
02368     sciprint("xinit must be called before any action \r\n");
02369     return;
02370   }
02371 
02372   if (  ScilabGCXfig.CurColorStatus == 1) 
02373     {
02374       int m;
02375       *color = pat-1 ; 
02376       if (  CheckColormap(&m) == 1) 
02377         {
02380           *color += 32;
02381         }
02382       else 
02383         {
02384           /* special case for B&white in the default colormap */
02385           if ( *color == 32 ) 
02386             {
02387               *color = DEFAULTBLACK;
02388             }
02389           else if ( *color == 33 ) 
02390             {
02391               *color = DEFAULTWHITE;
02392             }
02393         }
02394       *areafill = 20 ; 
02395     }
02396   else 
02397     {
02398       *color = WHITE ; 
02399       *areafill = AREAF(pat-1); 
02400     }
02401 }

Here is the call graph for this function:

void C2F() setalufunction1Xfig ( integer num,
integer v2,
integer v3,
integer v4 
)

Definition at line 414 of file periFig.c.

References AluStrucXfig_, BCG::CurDrawFunction, FALSE, alinfo::id, Max, Min, ScilabGCXfig, ScilabGCXfig_is_initialized, sciprint(), and value.

Referenced by setgccolormapXfig().

00415 {     
00416   integer value;
00417 
00418   if ( ScilabGCXfig_is_initialized == FALSE ) {
00419     sciprint("xinit must be called before any action \r\n");
00420     return;
00421   }
00422 
00423   value=AluStrucXfig_[Min(16,Max(0,*num))].id;
00424   if ( value != -1)
00425     {
00426       ScilabGCXfig.CurDrawFunction = value;
00427       /* to be done */
00428     }
00429 }

Here is the call graph for this function:

Here is the caller graph for this function:

void C2F() setalufunctionXfig ( char *  string  ) 

Not in Postscript

Definition at line 355 of file periFig.c.

References C2F, BCG::CurDrawFunction, FALSE, file, FPRINTF, idfromnameXfig(), ScilabGCXfig, ScilabGCXfig_is_initialized, sciprint(), string, and value.

00356 {     
00357   integer value;
00358   
00359   if ( ScilabGCXfig_is_initialized == FALSE ) {
00360     sciprint("xinit must be called before any action \r\n");
00361     return;
00362   }
00363 
00364   C2F(idfromnameXfig)(string,&value);
00365   if ( value != -1)
00366     {ScilabGCXfig.CurDrawFunction = value;
00367      FPRINTF((file,"# %d setalufunction\n",(int)value));
00368       }
00369 }

Here is the call graph for this function:

void C2F() setbackgroundXfig ( integer num,
integer v2,
integer v3,
integer v4 
)

set and get the number of the background or foreground

Referenced by setgccolormapXfig().

Here is the caller graph for this function:

void C2F() setclipXfig ( integer x,
integer y,
integer w,
integer h 
)

Set a clip zone (rectangle )

Definition at line 260 of file periFig.c.

References BCG::ClipRegionSet, BCG::CurClipRegion, FALSE, file, FPRINTF, ScilabGCXfig, ScilabGCXfig_is_initialized, and sciprint().

00261 {
00262   if ( ScilabGCXfig_is_initialized == FALSE ) {
00263     sciprint("xinit must be called before any action \r\n");
00264     return;
00265   }
00266 
00267   ScilabGCXfig.ClipRegionSet = 1;
00268   ScilabGCXfig.CurClipRegion[0]= *x;
00269   ScilabGCXfig.CurClipRegion[1]= *y;
00270   ScilabGCXfig.CurClipRegion[2]= *w;
00271   ScilabGCXfig.CurClipRegion[3]= *h;
00272   FPRINTF((file,"# %d %d %d %d setclipzone\n",(int)*x,(int)*y,(int)*w,(int)*h));
00273 }

Here is the call graph for this function:

void setcolordef ( integer  screenc  ) 

Definition at line 4095 of file periWin.c.

04096 {
04097   screencolor = screenc;
04098 }

void setcolormapgXfig ( struct BCG Xgc,
integer v1,
integer v2,
double *  a,
integer v3 
)

Definition at line 879 of file periFig.c.

References C2F, and setgccolormapXfig().

00880 {
00881 
00882   C2F(setgccolormapXfig)(Xgc,*m, a, v3);
00883 }

Here is the call graph for this function:

void C2F() setcolormapXfig ( integer v1,
integer v2,
integer v3,
integer v4,
integer v5,
integer v6,
double *  a 
)

Definition at line 851 of file periFig.c.

References C2F, FALSE, ScilabGCXfig, ScilabGCXfig_is_initialized, sciprint(), and setgccolormapXfig().

00852 {
00853  
00854   int m;
00855 
00856   *v3 = 0;
00857 
00858   if ( ScilabGCXfig_is_initialized == FALSE ) {
00859     sciprint("xinit must be called before any action \r\n");
00860     *v3 = 1;
00861     return;
00862   }
00863  
00864   sciprint("Warning : you will have to move the colors definition\n");
00865   sciprint(" at the top of the xfig file \n");
00866   if (*v2 != 3 ||  *v1 < 0) {
00867     sciprint("Colormap must be a m x 3 array \n");
00868     *v3 = 1;
00869     return;
00870   }
00871   m = *v1;
00872   C2F(setgccolormapXfig)(&ScilabGCXfig, m, a, v3);
00873 }

Here is the call graph for this function:

void C2F() setcursymbolXfig ( integer number,
integer size,
integer v3,
integer v4 
)

To set the current mark : using the symbol font of adobe

Definition at line 1081 of file periFig.c.

References BCG::CurHardSymb, BCG::CurHardSymbSize, FALSE, FONTMAXSIZE, Max, Min, ScilabGCXfig, ScilabGCXfig_is_initialized, sciprint(), and SYMBOLNUMBER.

Referenced by drawpolylinesXfig().

01082 { 
01083   if ( ScilabGCXfig_is_initialized == FALSE ) {
01084     sciprint("xinit must be called before any action \r\n");
01085     return;
01086   }
01087 
01088   ScilabGCXfig.CurHardSymb =
01089     Max(Min(SYMBOLNUMBER-1,*number),0);
01090   ScilabGCXfig.CurHardSymbSize = 
01091     Max(Min(FONTMAXSIZE-1,*size),0);
01092 ;}

Here is the call graph for this function:

Here is the caller graph for this function:

void C2F() setcurwinXfig ( integer intnum,
integer v2,
integer v3,
integer v4 
)

Select a graphic Window : Empty for Postscript

Definition at line 243 of file periFig.c.

References BCG::CurWindow, and ScilabGCXfig.

00244 {
00245   ScilabGCXfig.CurWindow = *intnum;
00246 }

void C2F() setdashXfig ( integer value,
integer v2,
integer v3,
integer v4 
)

Definition at line 559 of file periFig.c.

References BCG::CurDashStyle, FALSE, Max, MAXDASH, Min, ScilabGCXfig, ScilabGCXfig_is_initialized, and sciprint().

Referenced by drawarcsXfig_old(), drawpolylinesXfig(), set_dash_and_color_Xfig(), set_line_style_Xfig(), and usecolorXfig().

00560 {
00561   integer maxdash = MAXDASH ;
00562   integer l3 ;
00563 
00564   if ( ScilabGCXfig_is_initialized == FALSE ) {
00565     sciprint("xinit must be called before any action \r\n");
00566     return;
00567   }
00568 
00569   l3 = Max(0,Min(maxdash-1,(*value)-1));
00570   ScilabGCXfig.CurDashStyle = l3;
00571 }

Here is the call graph for this function:

Here is the caller graph for this function:

void C2F() setforegroundXfig ( integer num,
integer v2,
integer v3,
integer v4 
)

set and get the number of the background or foreground

Referenced by setgccolormapXfig().

Here is the caller graph for this function:

void C2F() setgccolormapXfig ( struct BCG Xgc,
integer  m,
double *  a,
integer v3 
)

Definition at line 739 of file periFig.c.

References BCG::Blue, C2F, FALSE, file, FPRINTF, FREE, BCG::Green, i, BCG::IDLastPattern, MALLOC, BCG::NumBackground, BCG::Numcolors, BCG::NumForeground, PI0, BCG::Red, ScilabGCXfig_is_initialized, sciprint(), setalufunction1Xfig(), setbackgroundXfig(), setforegroundXfig(), setpatternXfig(), and usecolorXfig().

Referenced by setcolormapgXfig(), and setcolormapXfig().

00740 {
00741   int i,mm;
00742 
00743   if ( ScilabGCXfig_is_initialized == FALSE ) {
00744     sciprint("xinit must be called before any action \r\n");
00745     return;
00746   }
00747  
00748   sciprint("Warning : you will have to move the colors definition\n");
00749   sciprint(" at the top of the xfig file \n");
00750 
00751   /* Checking RGB values */
00752   for (i = 0; i < m; i++) {
00753     if (a[i] < 0 || a[i] > 1 || a[i+m] < 0 || a[i+m] > 1 ||
00754         a[i+2*m] < 0 || a[i+2*m]> 1) {
00755       sciprint("RGB values must be between 0 and 1\n");
00756       *v3 = 1;
00757       return;
00758     }
00759   }
00760   Xgc->Numcolors = m;
00761   Xgc->IDLastPattern = m - 1;
00762   Xgc->NumForeground = m;
00763   Xgc->NumBackground = m + 1;
00764   for ( i=0; i < m ; i++)
00765     {
00766       unsigned short ur,ug,ub;
00767       ur = (unsigned short) (255.0*a[i]);
00768       ug = (unsigned short) (255.0*a[i+m]);
00769       ub = (unsigned short) (255.0*a[i+2*m]);
00770       FPRINTF((file,"0 %d #%02x%02x%02x \n",32+i,ur,ug,ub));
00771     }
00772   FPRINTF((file,"0 %d #%02x%02x%02x \n",32+m,0,0,0));
00773   FPRINTF((file,"0 %d #%02x%02x%02x \n",32+m+1,255,255,255));
00774   C2F(usecolorXfig)((i=1,&i) ,PI0,PI0,PI0);
00775   C2F(setalufunction1Xfig)((i=3,&i),PI0,PI0,PI0);
00776   C2F(setpatternXfig)((i=Xgc->NumForeground+1,&i),PI0,PI0,PI0);  
00777   C2F(setforegroundXfig)((i=Xgc->NumForeground+1,&i),PI0,PI0,PI0);
00778   C2F(setbackgroundXfig)((i=Xgc->NumForeground+2,&i),PI0,PI0,PI0);
00779 
00780 
00781   /* -------------------------------------------------------- */
00782   /* store the colormap for the get command too */
00783   /* F.Leray 04.10.05 */
00784   FREE(Xgc->Red);
00785   FREE(Xgc->Green);
00786   FREE(Xgc->Blue);
00787   
00788   /* don't forget black and white */
00789   mm = m;
00790   if (!(Xgc->Red = (float *) MALLOC(mm*sizeof(float)))) {
00791     sciprint("XgcAllocColors: unable to alloc\n");
00792     return;
00793   }
00794   if (!(Xgc->Green = (float *) MALLOC(mm*sizeof(float)))) {
00795     sciprint("XgcAllocColors: unable to alloc\n");
00796     FREE(Xgc->Red);
00797     return;
00798   }
00799   if (!(Xgc->Blue = (float *) MALLOC(mm*sizeof(float)))) {
00800     sciprint("XgcAllocColors: unable to alloc\n");
00801     FREE(Xgc->Red);
00802     FREE(Xgc->Green);
00803     return;
00804   }
00805   
00806   for(i=0;i<m;i++){
00807     Xgc->Red[i] = (float)a[i];
00808     Xgc->Green[i] = (float)a[i+m];
00809     Xgc->Blue[i] = (float)a[i+2*m]; 
00810   }
00811   /* -------------------------------------------------------- */
00812     
00813 }

Here is the call graph for this function:

Here is the caller graph for this function:

void C2F() sethidden3dXfig ( integer num,
integer v2,
integer v3,
integer v4 
)

set and get the number of the hidden3d color

Definition at line 976 of file periFig.c.

References BCG::CurColorStatus, FALSE, Max, Min, BCG::Numcolors, BCG::NumHidden3d, ScilabGCXfig, ScilabGCXfig_is_initialized, and sciprint().

00977 { 
00978   if ( ScilabGCXfig_is_initialized == FALSE ) {
00979     sciprint("xinit must be called before any action \r\n");
00980     return;
00981   }
00982 
00983   if (ScilabGCXfig.CurColorStatus == 1) 
00984     {
00985       /* es: Max(0,... -> Max(-1,... */
00986       /* S Mottelet: Max(-1,... -> Max(-2,...  to take into account the value -1 */
00987       ScilabGCXfig.NumHidden3d = Max(-2,Min(*num - 1,ScilabGCXfig.Numcolors + 1));
00988     }
00989 }

Here is the call graph for this function:

void C2F() setpatternXfig ( integer num,
integer v2,
integer v3,
integer v4 
)

Definition at line 470 of file periFig.c.

References C2F, BCG::CurColor, BCG::CurColorStatus, BCG::CurPattern, file, FPRINTF, GREYNUMBER, i, Max, Min, BCG::Numcolors, ScilabGCXfig, and set_cXfig().

Referenced by drawrectanglesXfig(), fillarcsXfig(), fillarcsXfig_old(), fillpolylinesXfig(), set_dash_and_color_Xfig(), set_line_style_Xfig(), setgccolormapXfig(), and usecolorXfig().

00471 { integer i ; 
00472   if (  ScilabGCXfig.CurColorStatus ==1) 
00473     {
00474       i= Max(0,Min(*num-1,ScilabGCXfig.Numcolors+1));
00475       ScilabGCXfig.CurColor = i ;
00476       C2F(set_cXfig)(i);
00477     }
00478   else 
00479     {
00480       i= Max(0,Min(*num-1,GREYNUMBER-1));
00481       ScilabGCXfig.CurPattern = i;
00482       if (i ==0)
00483         FPRINTF((file,"# fillsolid\n"));
00484       else 
00485         FPRINTF((file,"# %d Setgray\n",(int)i));
00486     }
00487 }

Here is the call graph for this function:

Here is the caller graph for this function:

void C2F() setscilabFigureXfig ( integer v1,
integer v2,
integer v3,
integer v4,
integer v5,
integer v6,
double *  figure 
)

void C2F() setscilabVersionXfig ( integer vers,
integer v2,
integer v3,
integer v4 
)

void C2F() setscilabxgcXfig ( integer v1,
integer v2,
integer v3,
integer v4 
)

void C2F() setthicknessXfig ( integer value,
integer v2,
integer v3,
integer v4 
)

give the thinest line

Definition at line 447 of file periFig.c.

References BCG::CurLineWidth, file, FPRINTF, L, Max, and ScilabGCXfig.

00448 { 
00449   ScilabGCXfig.CurLineWidth =Max(1, *value);
00450   FPRINTF((file,"# %d Thickness\n",(int)Max(1L,*value)));
00451 }

void C2F() setwindowdimXfig ( integer x,
integer y,
integer v3,
integer v4 
)

To change the window dimensions : do Nothing in Postscript

Definition at line 196 of file periFig.c.

00197 {
00198 }

void C2F() setwindowposXfig ( integer x,
integer y,
integer v3,
integer v4 
)

to set the window upper-left pointeger position (Void)

Definition at line 212 of file periFig.c.

00213 {
00214 }

void C2F() unsetclipXfig ( integer v1,
integer v2,
integer v3,
integer v4 
)

unset clip zone

Definition at line 278 of file periFig.c.

References BCG::ClipRegionSet, BCG::CurClipRegion, FALSE, file, FPRINTF, ScilabGCXfig, ScilabGCXfig_is_initialized, and sciprint().

00279 {
00280   
00281   if ( ScilabGCXfig_is_initialized == FALSE ) {
00282     sciprint("xinit must be called before any action \r\n");
00283     return;
00284   }
00285   
00286   ScilabGCXfig.ClipRegionSet = 0;
00287   ScilabGCXfig.CurClipRegion[0]= -1;
00288   ScilabGCXfig.CurClipRegion[1]= -1;
00289   ScilabGCXfig.CurClipRegion[2]= 200000;
00290   ScilabGCXfig.CurClipRegion[3]= 200000;
00291   FPRINTF((file,"# %d %d %d %d setclipzone\n",-1,-1,200000,200000));
00292 }

Here is the call graph for this function:

void C2F() usecolorXfig ( integer num,
integer v2,
integer v3,
integer v4 
)

Definition at line 668 of file periFig.c.

References C2F, BCG::CurColor, BCG::CurColorStatus, BCG::CurDashStyle, BCG::CurPattern, FALSE, GREYNUMBER, i, BCG::IDLastPattern, Max, Min, BCG::Numcolors, PI0, ScilabGCXfig, ScilabGCXfig_is_initialized, sciprint(), setdashXfig(), and setpatternXfig().

Referenced by setgccolormapXfig().

00669 {
00670   integer i;
00671   
00672   if ( ScilabGCXfig_is_initialized == FALSE ) {
00673     sciprint("xinit must be called before any action \r\n");
00674     return;
00675   }
00676   
00677   i =  Min(Max(*num,0),1);
00678   if (  ScilabGCXfig.CurColorStatus != (int) i) 
00679     {
00680       if (ScilabGCXfig.CurColorStatus == 1) 
00681         {
00682           /* je passe de Couleur a n&b */
00683           /* remise des couleurs a vide */
00684           ScilabGCXfig.CurColorStatus = 1;
00685           C2F(setpatternXfig)((i=1,&i),PI0,PI0,PI0);
00686           /* passage en n&b */
00687           ScilabGCXfig.CurColorStatus = 0;
00688           i= ScilabGCXfig.CurPattern+1;
00689           C2F(setpatternXfig)(&i,PI0,PI0,PI0);
00690           i= ScilabGCXfig.CurDashStyle+1;
00691           C2F(setdashXfig)(&i,PI0,PI0,PI0);
00692           ScilabGCXfig.IDLastPattern = GREYNUMBER - 1;
00693         }
00694       else 
00695         {
00696           /* je passe en couleur */
00697           /* remise a zero des patterns et dash */
00698           /* remise des couleurs a vide */
00699           ScilabGCXfig.CurColorStatus = 0;
00700           C2F(setpatternXfig)((i=1,&i),PI0,PI0,PI0);
00701           C2F(setdashXfig)((i=1,&i),PI0,PI0,PI0);
00702           /* passage en couleur  */
00703           ScilabGCXfig.CurColorStatus = 1;
00704           i= ScilabGCXfig.CurColor+1;
00705           C2F(setpatternXfig)(&i,PI0,PI0,PI0);
00706           ScilabGCXfig.IDLastPattern = ScilabGCXfig.Numcolors -1;
00707         }
00708     }
00709 }

Here is the call graph for this function:

Here is the caller graph for this function:

void C2F() viderbuffXfig ( void   ) 

Flush out the X11-buffer

Definition at line 177 of file periFig.c.

00178 {}

void C2F() Write2VectXfig ( integer vx,
integer vy,
integer  n,
integer  flag 
)

void C2F() WriteGenericXfig ( char *  string,
integer  nobj,
integer  sizeobj,
integer vx,
integer vy,
integer  sizev,
integer  flag,
integer fvect 
)

Referenced by drawarcsXfig_old(), drawrectanglesXfig(), fillarcsXfig_old(), and fillpolylinesXfig().

Here is the caller graph for this function:

void C2F() xclick_anyXfig ( char *  str,
integer ibutton,
integer xx1,
integer yy1,
integer v5,
integer v6,
integer v7,
double *  dx1,
double *  dx2,
double *  dx3,
double *  dx4 
)

Wait for mouse click in any graphic window : Empty here

Definition at line 224 of file periFig.c.

00225 { }

void C2F() xclickXfig ( char *  str,
integer ibutton,
integer xx1,
integer yy1,
integer v5,
integer v6,
integer v7,
double *  dx1,
double *  dx2,
double *  dx3,
double *  dx4 
)

Wait for mouse click in graphic window : Empty here

Definition at line 219 of file periFig.c.

00220 { }

void C2F() xendgraphicXfig ( void   ) 

End of graphic (close the file)

Definition at line 134 of file periFig.c.

References FALSE, file, and ScilabGCXfig_is_initialized.

Referenced by initgraphicfromscreenXfig(), initgraphicXfig(), and xendXfig().

00135 {
00136   if (file != stdout && file != (FILE*) 0) {
00137     fclose(file);
00138     file=stdout;
00139   }
00140   ScilabGCXfig_is_initialized = FALSE;
00141 }

Here is the caller graph for this function:

void C2F() xendXfig ( char *  v1,
integer v2,
integer v3,
integer v4,
integer v5,
integer v6,
integer v7,
double *  dx1,
double *  dx2,
double *  dx3,
double *  dx4 
)

Definition at line 143 of file periFig.c.

References C2F, and xendgraphicXfig().

00144 {
00145   C2F(xendgraphicXfig)();
00146 }

Here is the call graph for this function:

void C2F() xgetfontXfig ( integer verbose,
integer font,
integer nargs,
double *  dummy 
)

To get the values id and size of the current font

Definition at line 1059 of file periFig.c.

References FALSE, SciFontInfo::fname, BCG::FontId, FontInfoTabXfig_, BCG::FontSize, ScilabGCXfig, ScilabGCXfig_is_initialized, sciprint(), and sizeXfig_.

Referenced by boundingboxXfig(), and boundingboxXfigM().

01060 {
01061   *nargs=2;
01062 
01063   if ( ScilabGCXfig_is_initialized == FALSE ) {
01064     sciprint("xinit must be called before any action \r\n");
01065     return;
01066   }
01067 
01068   font[0]= ScilabGCXfig.FontId ;
01069   font[1] =ScilabGCXfig.FontSize ;
01070   if (*verbose == 1) 
01071     {
01072       sciprint("\nFontId : %d ",ScilabGCXfig.FontId );
01073       sciprint("--> %s at size",
01074              FontInfoTabXfig_[ScilabGCXfig.FontId].fname);
01075       sciprint("%s pts\r\n",sizeXfig_[ScilabGCXfig.FontSize]);
01076     }
01077 }

Here is the call graph for this function:

Here is the caller graph for this function:

void C2F() xgetmouseXfig ( char *  str,
integer ibutton,
integer xx1,
integer yy1,
integer v5,
integer v6,
integer v7,
double *  dx1,
double *  dx2,
double *  dx3,
double *  dx4 
)

Definition at line 227 of file periFig.c.

00228 { }

void C2F() xsetfontXfig ( integer fontid,
integer fontsize,
integer v3,
integer v4 
)

To set the current font id of font and size

Definition at line 1032 of file periFig.c.

References FALSE, file, fname, BCG::FontId, FontInfoTabXfig_, FONTMAXSIZE, FONTNUMBER, BCG::FontSize, FPRINTF, i, isizeXfig_, Max, Min, ok, prec_fact, ScilabGCXfig, ScilabGCXfig_is_initialized, and sciprint().

Referenced by drawpolymarkXfig().

01033 { 
01034   integer i,fsiz;
01035 
01036   if ( ScilabGCXfig_is_initialized == FALSE ) {
01037     sciprint("xinit must be called before any action \r\n");
01038     return;
01039   }
01040 
01041   i = Min(FONTNUMBER-1,Max(*fontid,0));
01042   fsiz = Min(FONTMAXSIZE-1,Max(*fontsize,0));
01043 
01044   if ( FontInfoTabXfig_[i].ok !=1 )
01045     {
01046       /* currently this case occurs only when i=FONTNUMBER-1 */
01047       sciprint("\n Sorry This Font is Not available: use default font (Times)\n");
01048       i = 2;
01049     }
01050   ScilabGCXfig.FontId = i;
01051   ScilabGCXfig.FontSize = fsiz;
01052   FPRINTF((file,"#/%s findfont %d scalefont setfont\n",
01053            FontInfoTabXfig_[i].fname,
01054            (int)isizeXfig_[fsiz]*prec_fact));
01055 }

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

struct alinfo AluStrucXfig_[]

All the possibilities : Read The X11 manual to get more informations

Referenced by getalufunctionXfig(), and setalufunction1Xfig().

integer bsizeXfig_[6][4]

Initial value:

 {{ 0, -7,  463, 9  },
                           { 0, -9,  574, 12 },
                           { 0, -11, 674, 14 },
                           { 0, -12, 779, 15 },
                           { 0, -15, 972, 19 },
                           { 0, -20,1341, 26 }}

Definition at line 1305 of file periFig.c.

integer DashTab[MAXDASH] = {0,1,1,2,2,2} [static]

dot specification for line style

Definition at line 529 of file periFig.c.

Referenced by set_c(), setdash(), and setthickness().

integer DashTabStyle[MAXDASH] = {0,2,4,2,4,8} [static]

Definition at line 530 of file periFig.c.

FILE* file = stdout [static]

Definition at line 111 of file periFig.c.

Referenced by C2F(), clearareaPos(), clearareaXfig(), create_file_panel(), displaystringPos(), displaystringXfig(), drawarrowsXfig(), drawaxisPos(), drawaxisXfig(), drawClippedPolylineXfig(), drawlinePos(), drawlineXfig(), drawpolylinePos(), drawpolylineXfig(), drawsegmentsXfig(), FileInit(), FileInitXfig(), fillpolylinesPos(), fillpolylinesXfig(), initgraphicfromscreenGif(), initgraphicGif(), initgraphicPos(), initgraphicXfig(), Initialize(), InitStringOrFile(), InsertFileNamed(), main(), setalufunctionPos(), setalufunctionXfig(), setclipPos(), setclipXfig(), setgccolormapPos(), setgccolormapXfig(), setpatternPos(), setpatternXfig(), setthicknessPos(), setthicknessXfig(), SetValues(), setwwhowPos(), unsetclipPos(), unsetclipXfig(), usecolorPos(), WriteColorRGB(), WriteColorRGBDef(), xendgraphicGif(), xendgraphicPos(), xendgraphicXfig(), and xsetfontXfig().

struct SciFontInfo FontInfoTabXfig_[FONTNUMBER]

Referenced by loadfamilyXfig(), queryfamilyXfig(), xgetfontXfig(), and xsetfontXfig().

integer FontsListXfig_[FONTNUMBER][FONTMAXSIZE]

Definition at line 99 of file periFig.c.

Referenced by loadfamilyXfig().

integer isizeXfig_[] = { 8,10,12,14,18,24} [static]

Definition at line 105 of file periFig.c.

Referenced by displaystringXfig(), and xsetfontXfig().

int prec_fact = 16 [static]

for line thickness etc

Definition at line 183 of file periFig.c.

Referenced by ascentPos(), boundingboxPos(), boundingboxXfig(), boundingboxXfigM(), displaystringPos(), drawarrowsXfig(), drawaxisXfig(), drawsegmentsXfig(), FileInit(), FileInitFromScreenPos(), getwindowdimPos(), getwindowdimXfig(), and xsetfontXfig().

struct bgc ScilabGCTabXfig_[]

struct BCG ScilabGCXfig

Definition at line 55 of file periFig.c.

Referenced by absourelXfig(), boundingboxXfigM(), clearwindowXfig(), displaynumbersXfig(), displaystringXfig(), drawarcXfig_old(), drawarrowsXfig(), drawaxisXfig(), drawClippedPolylineXfig(), drawpolymarkXfig(), drawsegmentsXfig(), FileInitFromScreenXfig(), FileInitXfig(), fillpolylinesXfig(), get_dash_or_color_Xfig(), getabsourelXfig(), getalufunctionXfig(), getbackgroundXfig(), getclipXfig(), getcolormapsizeXfig(), getcolormapXfig(), getcursymbolXfig(), getcurwinXfig(), getforegroundXfig(), gethidden3dXfig(), getlastXfig(), getpatternXfig(), getthicknessXfig(), getusecolorXfig(), initgraphicfromscreenXfig(), initgraphicXfig(), set_color(), set_dash_or_color(), set_dash_or_color_Xfig(), set_line_style_Xfig(), set_pattern_or_color(), setalufunction1Xfig(), setalufunctionXfig(), setclipXfig(), setcolormapXfig(), setcursymbolXfig(), setcurwinXfig(), setdashXfig(), sethidden3dXfig(), setpatternXfig(), setthicknessXfig(), unsetclipXfig(), usecolorXfig(), xgetfontXfig(), and xsetfontXfig().

BOOL ScilabGCXfig_is_initialized = FALSE [static]

Definition at line 57 of file periFig.c.

Referenced by clearwindowXfig(), displaynumbersXfig(), displaystringXfig(), drawarcsXfig(), drawarcsXfig_old(), drawarcXfig(), drawarcXfig_old(), drawarrowsXfig(), drawaxisXfig(), drawClippedPolylineXfig(), drawlineXfig(), drawpolylinesXfig(), drawpolylineXfig(), drawpolymarkXfig(), drawrectanglesXfig(), drawrectangleXfig(), drawsegmentsXfig(), FileInitFromScreenXfig(), FileInitXfig(), fillarcsXfig(), fillarcsXfig_old(), fillarcXfig(), fillarcXfig_old(), fillpolylinesXfig(), fillpolylineXfig(), fillrectangleXfig(), get_dash_and_color_Xfig(), get_dash_or_color_Xfig(), getbackgroundXfig(), getcolormapsizeXfig(), getcolormapXfig(), getcursymbolXfig(), getforegroundXfig(), gethidden3dXfig(), getusecolorXfig(), set_color(), set_dash_and_color_Xfig(), set_dash_or_color(), set_dash_or_color_Xfig(), set_line_style_Xfig(), set_pattern_or_color(), setalufunction1Xfig(), setalufunctionXfig(), setclipXfig(), setcolormapXfig(), setcursymbolXfig(), setdashXfig(), setgccolormapXfig(), sethidden3dXfig(), unsetclipXfig(), usecolorXfig(), xendgraphicXfig(), xgetfontXfig(), and xsetfontXfig().

char* sizeXfig_[] = { "08" ,"10","12","14","18","24"} [static]

Definition at line 104 of file periFig.c.

Referenced by getcursymbolXfig(), and xgetfontXfig().

char symb_listXfig_[]

Initial value:

 {
  
  (char)0x2e,(char)0x2b,(char)0xb4,(char)0xc5,(char)0xa8,
  (char)0xe0,(char)0x44,(char)0xd1,(char)0xa7,(char)0x4f}

Definition at line 1761 of file periFig.c.

int symb_xw[FONTMAXSIZE][SYMBOLNUMBER]

Initial value:

{
  {15,75,60,90,90,90,90,90,90,90},
  {30,75,75,105,75,105,105,105,75,105},
  {15,75,75,135,90,135,135,135,105,135},
  {30,105,105,135,105,165,150,165,120,150},
  {30,120,135,195,135,210,195,195,135,195},
  {45,150,150,255,195,270,255,270,195,255}
}
Bounding box for marks : we have used xfig to get the bounding boxes ie the correct w and h ( rect[2],rect[3])

Definition at line 1331 of file periFig.c.

int symb_yh[FONTMAXSIZE][SYMBOLNUMBER]

Initial value:

{
  {30,75,75,90,90,90,90,90,90,90},
  {30,90,90,120,105,105,105,105,105,105},
  {45,105,105,150,90,110,120,135,110,135},
  {45,120,120,150,105,165,135,160,125,150},
  {60,150,150,210,135,195,165,195,165,195},
  {90,180,195,270,180,270,230,270,195,270}
}

Definition at line 1340 of file periFig.c.

double* vdouble = 0 [static]

Definition at line 93 of file periFig.c.

Referenced by ascentPos(), boundingboxPos(), boundingboxXfig(), boundingboxXfigM(), displaystringGif(), displaystringXfig(), drawarcs(), drawarcsGif(), drawarcsPos(), drawarcsXfig(), drawarcsXfig_old(), drawarrows(), drawarrowsGif(), drawarrowsPos(), drawarrowsXfig(), drawaxisXfig(), drawpolylines(), drawpolylinesGif(), drawpolylinesPos(), drawpolylinesXfig(), drawrectangles(), drawrectanglesGif(), drawrectanglesPos(), drawrectanglesXfig(), drawsegments(), drawsegmentsGif(), drawsegmentsPos(), drawsegmentsXfig(), FileInit(), FileInitFromScreenGif(), FileInitFromScreenPos(), FileInitFromScreenXfig(), FileInitGif(), FileInitXfig(), fill_grid_rectangles(), fill_grid_rectangles1(), fillarcPos(), fillarcs(), fillarcsGif(), fillarcsPos(), fillarcsXfig(), fillarcsXfig_old(), fillarcXfig_old(), fillpolylineGif(), fillpolylinePos(), fillpolylines(), fillpolylinesPos(), fillpolylinesXfig(), fillpolylineXfig(), fillrectangleGif(), fillrectanglePos(), fillrectangleXfig(), and setwindowdimGif().

integer xfig_font[] = { 12,32,0,1,2,3,16,17,18,19,0} [static]

xfig code for our fonts

Definition at line 103 of file periFig.c.

Referenced by displaystringXfig().


Generated on Sun Mar 4 15:49:24 2007 for Scilab [trunk] by  doxygen 1.5.1