periWin.c File Reference

#include <Windows.h>
#include <commctrl.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <stdarg.h>
#include "../../gui/src/c/wsci/wresource.h"
#include "../../gui/src/c/wsci/resource.h"
#include "../../gui/src/c/wsci/wcommon.h"
#include "../../gui/src/c/wsci/wgraph.h"
#include "../../gui/src/c/wsci/wtext.h"
#include "Events.h"
#include "bcg.h"
#include "periWin.h"
#include "color.h"
#include "scigraphic.h"
#include "machine.h"
#include "clipping.h"
#include "SetProperty.h"
#include "math_graphics.h"
#include "MALLOC.h"
#include "WindowList.h"

Include dependency graph for periWin.c:

Go to the source code of this file.

Data Structures

struct  alinfo
struct  bgc
struct  tagFontInfo
struct  Offset
struct  FontAlias

Defines

#define CoordModePrevious   1
#define CoordModeOrigin   0
#define GXxor   6
#define WIN_XMAX   (2400)
#define WIN_YMAX   (1800)
#define WIN_HCHAR   (WIN_XMAX/75)
#define WIN_VCHAR   (WIN_YMAX/25)
#define MESSAGE4   "Can't allocate point vector"
#define MESSAGE5   "Can't re-allocate point vector"
#define Char2Int(x)   ( x & 0x000000ff )
#define MAXDASH   5
#define COLORREF   COLORREF
#define GREYNUMBER   17
#define NUMSETFONC   32
#define FONTNUMBER   10
#define FONTMAXSIZE   6
#define SYMBOLNUMBER   10
#define MAXPRINTF   512
#define NBPOINTS   256

Typedefs

typedef tagFontInfo FontInfoT [FONTNUMBER]

Functions

LRESULT CALLBACK WndGraphProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
LRESULT CALLBACK WndParentGraphProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
void setcolormapg (struct BCG *Xgc, integer *v1, integer *v2, double *a, integer *v3)
static void C2F() setscilabFigure (integer *v1, integer *v2, integer *v3, integer *v4, integer *v5, integer *v6, double *figure)
static void C2F() getscilabFigure (integer *verbose, integer *x, integer *narg, double *figure)
static void C2F() setscilabVersion (integer *vers, integer *v2, integer *v3, integer *v4)
static void C2F() getscilabVersion (integer *verbose, integer *vers, integer *narg, double *dummy)
static void C2F() setscilabxgc (integer *v1, integer *v2, integer *v3, integer *v4)
static void C2F() getscilabxgc (integer *verbose, integer *x, integer *narg, double *dummy)
static void C2F() getcolormapsize (integer *verbose, integer *num, integer *narg, double *val)
static POINT *C2F() ReturnPoints ()
static HFONT getcurfont ()
int XorString (integer x, integer y, char *string, int fWidth, int fHeight)
HWND GetWindowNumber ()
BCGAddNewWindowToList ()
int SwitchWindow (integer *intnum)
static int ReallocVector ()
static void DrawMark ()
static void LoadFonts ()
static void LoadSymbFonts ()
static void C2F() loadfamily_n ()
static void CreateGraphClass ()
static BOOL RegisterParentWindowGraphClass (void)
static BOOL RegisterWindowGraphClass (void)
static void XDrawPoints ()
static BOOL SciPalette (int iNumClr)
static void set_current_clip (void)
static void set_clip_after_scroll (void)
void UpdateFileGraphNameMenu (struct BCG *ScilabGC)
void CreateGraphToolBar (struct BCG *ScilabGC)
void CreateGedMenus (struct BCG *ScilabGC)
void SetIsASingleClickToFalse (void)
BOOL IsASingleClickToFalse (void)
BOOL IsWindowInterface (void)
void RefreshGraphToolBar (struct BCG *ScilabGC)
integer sciGetwresize (void)
int sciGetScrollInfo (struct BCG *Scilabgc, int sb_ctl, SCROLLINFO *si)
int sciSetScrollInfo (struct BCG *Scilabgc, int sb_ctl, SCROLLINFO *si, BOOLEAN bRedraw)
int sciInitScrollBar (struct BCG *Scilabgc)
void SetWinhdc (void)
int MaybeSetWinhdc ()
void ReleaseWinHdc ()
void SetGHdc (HDC lhdc, int width, int height)
int XgcAllocColors (struct BCG *xgc, int m)
int XgcFreeColors (struct BCG *xgc)
void sci_pixmapclear_rect (HDC hdc_c, struct BCG *ScilabGC, int ww, int hh)
void sci_pixmapclear (HDC hdc_c, struct BCG *ScilabGC)
void C2F() pixmapclear (integer *v1, integer *v2, integer *v3, integer *v4)
void C2F() show (integer *v1, integer *v2, integer *v3, integer *v4)
void sci_pixmap_resize (struct BCG *ScilabGC, int x, int y)
void CPixmapResize (int x, int y)
void CPixmapResize1 (void)
void C2F() xselgraphic (char *v1, integer *v2, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4)
void C2F() xendgraphic ()
void C2F() xend (char *v1, integer *v2, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4)
void C2F() clearwindow (char *v1, integer *v2, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4)
void Setpopupname (char *string)
void C2F() setpopupname (char *x0, integer *v2, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4)
static int check_mouse (MSG *msg, integer *ibutton, integer *x1, integer *yy1, int xofset, int yofset, int getmouse, int getrelease)
int check_pointer_win (int *x1, int *yy1, int *win)
void set_wait_click (int val)
void set_event_select (int val)
void C2F() xclick_any (char *str, integer *ibutton, integer *x1, integer *yy1, integer *iwin, integer *iflag, integer *istr, double *dv1, double *dv2, double *dv3, double *dv4)
void SciClick (integer *ibutton, integer *x1, integer *yy1, integer *iflag, int getmouse, int getrelease, int dyn_men, char *str, integer *lstr)
void C2F() xclick (char *str, integer *ibutton, integer *x1, integer *yy1, integer *iflag, integer *istr, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4)
void C2F() xgetmouse (char *str, integer *ibutton, integer *x1, integer *yy1, integer *iflag, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4)
void SciMouseCapture (void)
void SciMouseRelease (void)
void C2F() cleararea (char *str, integer *x, integer *y, integer *w, integer *h, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4)
void C2F() getwindowpos (integer *verbose, integer *x, integer *narg, double *dummy)
void C2F() setwindowpos (integer *x, integer *y, integer *v3, integer *v4)
void C2F() getwindowdim (integer *verbose, integer *x, integer *narg, double *dummy)
void C2F() setwindowdim (integer *x, integer *y, integer *v3, integer *v4)
void C2F() getpopupdim (integer *verbose, integer *x, integer *narg, double *dummy)
void C2F() setpopupdim (integer *x, integer *y, integer *v3, integer *v4)
void C2F() setviewport (integer *x, integer *y, integer *v3, integer *v4)
void C2F() getviewport (integer *verbose, integer *x, integer *narg, double *dummy)
void C2F() setcurwin (integer *intnum, integer *v2, integer *v3, integer *v4)
void C2F() getcurwin (integer *verbose, integer *intnum, integer *narg, double *dummy)
void C2F() setclip (integer *x, integer *y, integer *w, integer *h)
void C2F() unsetclip (integer *v1, integer *v2, integer *v3, integer *v4)
void C2F() getclip (integer *verbose, integer *x, integer *narg, double *dummy)
void C2F() setabsourel (integer *num, integer *v2, integer *v3, integer *v4)
void C2F() getabsourel (integer *verbose, integer *num, integer *narg, double *dummy)
static void idfromname (char *name1, integer *num)
void set_c (integer coli)
void C2F() setalufunction (char *string)
void C2F() setalufunction1 (integer *num, integer *v2, integer *v3, integer *v4)
void C2F() getalufunction (integer *verbose, integer *value, integer *narg, double *dummy)
void C2F() setthickness (integer *value, integer *v2, integer *v3, integer *v4)
void C2F() getthickness (integer *verbose, integer *value, integer *narg, double *dummy)
void C2F() CreatePatterns ()
void C2F() setpattern (integer *num, integer *v2, integer *v3, integer *v4)
void C2F() getpattern (integer *verbose, integer *num, integer *narg, double *dummy)
void C2F() getlast (integer *verbose, integer *num, integer *narg, double *dummy)
void C2F() setdash (integer *value, integer *v2, integer *v3, integer *v4)
void C2F() set_dash_or_color (integer *value, integer *v2, integer *v3, integer *v4)
static void C2F() set_dash_and_color (integer *value, integer *v2, integer *v3, integer *v4)
static void C2F() set_line_style (integer *value, integer *v2, integer *v3, integer *v4)
void C2F() getdash (integer *verbose, integer *value, integer *narg, double *dummy)
void C2F() get_dash_or_color (integer *verbose, integer *value, integer *narg, double *dummy)
static void C2F() get_dash_and_color (integer *verbose, integer *value, integer *narg, double *dummy)
void C2F() usecolor (integer *num, integer *v1, integer *v2, integer *v3)
void C2F() getusecolor (integer *verbose, integer *num, integer *narg, double *dummy)
void C2F() setpixmapOn (integer *num, integer *v2, integer *v3, integer *v4)
void C2F() getpixmapOn (integer *verbose, integer *value, integer *narg, double *dummy)
integer sciGetPixmapStatus ()
void C2F() setwresize (integer *num, integer *v2, integer *v3, integer *v4)
void C2F() getwresize (integer *verbose, integer *value, integer *narg, double *dummy)
int C2F() sedeco (int *flag)
void set_default_colormap ()
void C2F() setcolormap (integer *v1, integer *v2, integer *v3, integer *v4, integer *v5, integer *v6, double *a)
void C2F() setgccolormap (integer *v1, integer *v2, double *a, struct BCG *XGC, integer *v3)
void C2F() pal_setcolormap (integer *v1, integer *v2, integer *v3, integer *v4, integer *v5, integer *v6, double *a)
void C2F() getcolormap (integer *verbose, integer *num, integer *narg, double *val)
void C2F() setbackground (integer *num, integer *v2, integer *v3, integer *v4)
void C2F() getbackground (integer *verbose, integer *num, integer *narg, double *dummy)
void C2F() setforeground (integer *num, integer *v2, integer *v3, integer *v4)
void C2F() getforeground (integer *verbose, integer *num, integer *narg, double *dummy)
void C2F() sethidden3d (integer *num, integer *v2, integer *v3, integer *v4)
void C2F() gethidden3d (integer *verbose, integer *num, integer *narg, double *dummy)
int CheckColormap (int *m)
void get_r (int i, float *r)
void get_g (int i, float *g)
void get_b (int i, float *b)
static void InitMissileXgc ()
void C2F() sempty (integer *verbose, integer *v2, integer *v3, integer *v4)
void C2F() gempty (integer *verbose, integer *v2, integer *v3, double *dummy)
void C2F() MissileGCGetorSet (char *str, integer flag, integer *verbose, integer *x1, integer *x2, integer *x3, integer *x4, integer *x5, integer *x6, double *dv1)
void C2F() MissileGCget (char *str, integer *verbose, integer *x1, integer *x2, integer *x3, integer *x4, integer *x5, double *dv1, double *dv2, double *dv3, double *dv4)
void C2F() MissileGCset (char *str, integer *x1, integer *x2, integer *x3, integer *x4, integer *x5, integer *x6, double *dv1, double *dv2, double *dv3, double *dv4)
void C2F() displaystring (char *string, integer *x, integer *y, integer *v1, integer *flag, integer *v6, integer *v7, double *angle, double *dv2, double *dv3, double *dv4)
void C2F() DispStringAngle (integer *x0, integer *yy0, char *string, double *angle)
void C2F() boundingbox (char *string, integer *x, integer *y, integer *rect, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4)
void C2F() drawline (integer *x1, integer *yy1, integer *x2, integer *y2)
void C2F() drawsegments (char *str, integer *vx, integer *vy, integer *n, integer *style, integer *iflag, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4)
void C2F() drawarrows (char *str, integer *vx, integer *vy, integer *n, integer *as, integer *style, integer *iflag, double *dv1, double *dv2, double *dv3, double *dv4)
void C2F() drawrectangles (char *str, integer *vects, integer *fillvect, integer *n, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4)
void C2F() drawrectangle (char *str, integer *x, integer *y, integer *width, integer *height, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4)
void C2F() fillrectangle (char *str, integer *x, integer *y, integer *width, integer *height, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4)
void fill_grid_rectangles (x, y, double *z, integer n1, integer n2)
void fill_grid_rectangles1 (integer *x, integer *y, double *z, integer n1, integer n2)
void C2F() fillarcs (char *str, integer *vects, integer *fillvect, integer *n, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4)
void C2F() drawarcs (char *str, integer *vects, integer *style, integer *n, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4)
void C2F() drawarc (char *str, integer *x, integer *y, integer *width, integer *height, integer *angle1, integer *angle2, double *dv1, double *dv2, double *dv3, double *dv4)
void C2F() fillarc (char *str, integer *x, integer *y, integer *width, integer *height, integer *angle1, integer *angle2, double *dv1, double *dv2, double *dv3, double *dv4)
void C2F() drawpolylines (char *str, integer *vectsx, integer *vectsy, integer *drawvect, integer *n, integer *p, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4)
void C2F() fillpolylines (char *str, integer *vectsx, integer *vectsy, integer *fillvect, integer *n, integer *p, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4)
static void C2F() analyze_points (integer n, integer *vx, integer *vy, integer onemore)
void C2F() drawClippedPolyline (char *str, integer *n, integer *vx, integer *vy, integer *closeflag, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4)
void C2F() drawpolyline (char *str, integer *n, integer *vx, integer *vy, integer *closeflag, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4)
void C2F() fillpolyline (char *str, integer *n, integer *vx, integer *vy, integer *closeflag, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4)
void C2F() drawpolymark (char *str, integer *n, integer *vx, integer *vy, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4)
static void XDrawPoints (HDC lhdc, POINT *points, integer Npoints)
void DeleteWindowToList (integer num)
void DeleteSGWin (integer intnum)
HWND GetWindowNumber (int wincount)
void C2F() initgraphic (char *string, integer *v2, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4)
void C2F() xinfo (char *message, integer *v2, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4)
void wininfo (char *fmt,...)
static void InitMissileXgc (integer *v1, integer *v2, integer *v3, integer *v4)
void getcolordef (integer *screenc)
void setcolordef (integer screenc)
void ResetScilabXgc (void)
void C2F() drawaxis (char *str, integer *alpha, integer *nsteps, integer *v2, integer *initpoint, integer *v6, integer *v7, double *size, double *dx2, double *dx3, double *dx4)
void C2F() getFontMaxSize (char *str, integer *sizeMin, integer *sizeMax, integer *v1, integer *v2, integer *v3, integer *v4, double *dx1, double *dx2, double *dx3, double *dx4)
void C2F() displaynumbers (char *str, integer *x, integer *y, integer *v1, integer *v2, integer *n, integer *flag, double *z, double *alpha, double *dx3, double *dx4)
void C2F() bitmap (char *string, integer w, integer h)
void C2F() xsetfont (integer *fontid, integer *fontsize, integer *v3, integer *v4)
void C2F() xgetfont (integer *verbose, integer *font, integer *nargs, double *dummy)
void C2F() xsetmark (integer *number, integer *size, integer *v3, integer *v4)
void C2F() xgetmark (integer *verbose, integer *symb, integer *narg, double *dummy)
void C2F() loadfamily (char *name, integer *j, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4)
void C2F() queryfamily (char *name, integer *j, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dv1, double *dv2, double *dv3, double *dv4)
void SciMakeFont (char *name, int size, HFONT *hfont)
static void C2F() loadfamily_n (char *name, integer *j)
void CleanFonts ()
void SciG_Font_Printer (int scale)
void SciG_Font (void)
int C2F() CurSymbXOffset ()
int C2F() CurSymbYOffset ()
static void DrawMark (HDC lhdc, integer *x, integer *y)
int C2F() store_points (integer n, integer *vx, integer *vy, integer onemore)
static int ReallocVector (integer n)
void deletePoints (void)
int C2F() AllocVectorStorage (void)
static int clip_point (integer x, integer y)
void set_clip_box (integer xxleft, integer xxright, integer yybot, integer yytop)
void clip_line (integer x1, integer yy1, integer x2, integer y2, integer *x1n, integer *yy1n, integer *x2n, integer *y2n, integer *flag)
integer first_in (integer n, integer ideb, integer *vx, integer *vy)
integer first_out (integer n, integer ideb, integer *vx, integer *vy)
int CheckScilabXgc ()

Variables

static double * vdouble = 0
unsigned short default_colors []
LPSTR szGraphClass = "wscilab_graph"
LPSTR szParentGraphClass = "wscilab_parent_graph"
static integer DashTab [MAXDASH] = { PS_SOLID,PS_DASH,PS_DOT,PS_DASHDOT,PS_DASHDOTDOT}
GW graphwin
TW textwin
static int screencolor = 1
static COLORREF DefaultBackground = RGB(255,255,255)
static COLORREF DefaultForeground = RGB(0,0,0)
BCG MissileXgc
static integer deleted_win = -1
BCGScilabXgc = (struct BCG *) 0
static HDC hdc = (HDC) 0
static HDC hdc1 = (HDC) 0
static struct alinfo AluStruc_ []
HBRUSH Tabpix_ [GREYNUMBER]
static WORD grey0 [GREYNUMBER][8]
static int set_default_colormap_flag = 1
static struct bgc MissileGCTab_ []
static int scale_font_size = 1
static FontInfoT FontInfoTab
static FontInfoT FontInfoTabPrinter
static FontInfoTFontTab = &FontInfoTab
static char * size_ [] = { "08" ,"10","12","14","18","24"}
static int size_n_ [] = {8,10,12,14,18,24}
static Offset ListOffset
static Offset ListOffsetPrint
static OffsetSymbOffset = &ListOffset
static char Marks []
FontAlias fonttab []
static POINT * points
static unsigned nbpoints
static integer xleft
static integer xright
static integer ybot
static integer ytop


Define Documentation

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

Definition at line 91 of file periWin.c.

#define COLORREF   COLORREF

Definition at line 161 of file periWin.c.

Referenced by AddNewWindowToList(), ChooseColorBox(), cleararea(), clearwindow(), pal_setcolormap(), sci_pixmapclear_rect(), set_c(), set_default_colormap(), setbackground(), setcolormapg(), SetCurrentAlphaLevel(), setdash(), setforeground(), setthickness(), XgcAllocColors(), XgcFreeColors(), and XorString().

#define CoordModeOrigin   0

Definition at line 49 of file periWin.c.

#define CoordModePrevious   1

Definition at line 48 of file periWin.c.

#define FONTMAXSIZE   6

Definition at line 2786 of file periWin.c.

#define FONTNUMBER   10

Definition at line 2784 of file periWin.c.

#define GREYNUMBER   17

from black (*num =0 ) to white

Definition at line 1612 of file periWin.c.

#define GXxor   6

Definition at line 52 of file periWin.c.

#define MAXDASH   5

Definition at line 137 of file periWin.c.

#define MAXPRINTF   512

Definition at line 4006 of file periWin.c.

#define MESSAGE4   "Can't allocate point vector"

Definition at line 89 of file periWin.c.

Referenced by AllocVectorStorage().

#define MESSAGE5   "Can't re-allocate point vector"

Definition at line 90 of file periWin.c.

Referenced by ReallocVector().

#define NBPOINTS   256

Definition at line 4614 of file periWin.c.

Referenced by AllocVectorStorage().

#define NUMSETFONC   32

Definition at line 2596 of file periWin.c.

#define SYMBOLNUMBER   10

Definition at line 2787 of file periWin.c.

#define WIN_HCHAR   (WIN_XMAX/75)

Definition at line 84 of file periWin.c.

#define WIN_VCHAR   (WIN_YMAX/25)

Definition at line 85 of file periWin.c.

#define WIN_XMAX   (2400)

Definition at line 82 of file periWin.c.

Referenced by initgraphic().

#define WIN_YMAX   (1800)

Definition at line 83 of file periWin.c.

Referenced by initgraphic().


Typedef Documentation

typedef struct tagFontInfo FontInfoT[FONTNUMBER]


Function Documentation

struct BCG * AddNewWindowToList (  ) 

Definition at line 3635 of file periWin.c.

References addWindowItem(), BCG::Blue, BCG::CmapFlag, COLORREF, BCG::Colors, BCG::CurColor, BCG::CurWindow, BCG::CWindow, BCG::EventHandler, graphwin, BCG::Green, NULL, and BCG::Red.

Referenced by initgraphic().

03636 {
03637   struct BCG * newWin = addWindowItem() ;
03638 
03639   if ( newWin == NULL ) { return NULL ; }
03640 
03641   /* initialize the bcg */
03642   newWin->CWindow = (HWND) NULL;
03643   newWin->CurWindow = 0;
03644   newWin->in_sizemove = 0;
03645   newWin->Red = (float *) 0;
03646   newWin->Green = (float *) 0;
03647   newWin->Blue = (float *) 0;
03648   newWin->Colors = (COLORREF *) 0;
03649   newWin->CmapFlag  = 1;
03650   newWin->EventHandler[0]='\0'; 
03651   newWin->lpgw = &graphwin;
03652   newWin->hPen  = (HPEN) 0;
03653   newWin->hBrush  = (HBRUSH) 0;
03654   newWin->hbmCompat = (HBITMAP) 0;
03655   newWin->hdcCompat = (HDC) 0;
03656   newWin->CurColor = 32; // Adding here F.Leray set the current color to black (i.e.: 32+1=33)
03657   newWin->IDM_Count=0;
03658   newWin->hMenuRoot=NULL;
03659 
03660   return newWin ;
03661 }

Here is the call graph for this function:

Here is the caller graph for this function:

int C2F() AllocVectorStorage ( void   ) 

Definition at line 4662 of file periWin.c.

References MALLOC, MESSAGE4, NBPOINTS, and sciprint().

Referenced by initgraphic().

04663 {
04664   nbpoints = NBPOINTS;
04665   points = (POINT *) MALLOC( nbpoints * sizeof (POINT)); 
04666   if ( points == 0) { sciprint(MESSAGE4);return(0);}
04667   else return(1);
04668 }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Referenced by drawClippedPolyline().

Here is the caller graph for this function:

void C2F() bitmap ( char *  string,
integer  w,
integer  h 
)

Definition at line 4271 of file periWin.c.

04275 {
04284 }

void C2F() boundingbox ( char *  string,
integer x,
integer y,
integer rect,
integer v5,
integer v6,
integer v7,
double *  dv1,
double*  dv2,
double*  dv3,
double*  dv4 
)

To get the bounding rectangle of a string

text mode is supposed to be bottom

Definition at line 2957 of file periWin.c.

References hdc, and size.

02961 { 
02962   SIZE size ;
02964   GetTextExtentPoint32(hdc,(LPCTSTR)string,(int)strlen(string),&size);
02965   rect[0]= *x ;
02966   rect[1]= *y - size.cy ;
02967   rect[2]= size.cx;
02968   rect[3]= size.cy;
02969 }

static int check_mouse ( MSG *  msg,
integer ibutton,
integer x1,
integer yy1,
int  xofset,
int  yofset,
int  getmouse,
int  getrelease 
) [static]

Definition at line 920 of file periWin.c.

00923 {
00924   if (  msg->message == WM_LBUTTONDOWN )
00925     {
00926       *x1=LOWORD(msg->lParam) + xofset;
00927       *yy1= HIWORD(msg->lParam) + yofset;
00928       *ibutton=0; 
00929     }
00930   else if (  msg->message == WM_MBUTTONDOWN )
00931     {
00932       *x1 = LOWORD(msg->lParam) + xofset;
00933       *yy1= HIWORD(msg->lParam) + yofset;
00934       *ibutton=1; 
00935     }
00936   else if (  msg->message == WM_RBUTTONDOWN )
00937     {
00938       *x1 = LOWORD(msg->lParam) + xofset;
00939       *yy1= HIWORD(msg->lParam) + yofset;
00940       *ibutton=2; 
00941     }
00942   else if ( getmouse == 1 && msg->message == WM_MOUSEMOVE )
00943     {
00944       *x1 = LOWORD(msg->lParam) + xofset;
00945       *yy1= HIWORD(msg->lParam) + yofset;
00946       *ibutton=-1; 
00947     }
00948   else if ( getrelease == 1 &&  msg->message == WM_LBUTTONUP )
00949     {
00950       *x1 = LOWORD(msg->lParam) + xofset;
00951       *yy1= HIWORD(msg->lParam) + yofset;
00952       *ibutton= -5 ; 
00953     }
00954   else if (getrelease == 1 &&  msg->message == WM_MBUTTONUP )
00955     {
00956       *x1 = LOWORD(msg->lParam) + xofset;
00957       *yy1= HIWORD(msg->lParam) + yofset;
00958       *ibutton= -4 ;
00959     }
00960   else if ( getrelease == 1 && msg->message == WM_RBUTTONUP )
00961     {
00962       *x1 = LOWORD(msg->lParam) + xofset;
00963       *yy1= HIWORD(msg->lParam) + yofset;
00964       *ibutton= -3;
00965     }
00966   else 
00967     {
00968       return 0; 
00969     }
00970   return 1;
00971 }

int check_pointer_win ( int x1,
int yy1,
int win 
)

Definition at line 663 of file periWin.c.

References BCG::CurWindow, BCG::CWindow, getScilabWindowList(), WindowList::next, NULL, and WindowList::winxgc.

Referenced by ON_EVENT_GRAPH_WM_KEYDOWN(), and ON_EVENT_GRAPH_WM_KEYUP().

00664 {
00665   RECT lpRect;
00666   HWND hwnd_window_pointed;
00667   WindowList * listptr = NULL ;
00668   POINT Point;
00669   integer iwin = -1;
00670   /* where if the pointer  */
00671   GetCursorPos(&Point);
00672   /* over which window */
00673   hwnd_window_pointed = WindowFromPoint(Point);
00674   /* le curseur est bien sur une fenetre */
00675   if (hwnd_window_pointed != NULL)
00676     {
00677       iwin = -1;
00678       listptr = getScilabWindowList() ;
00679       while ( listptr != NULL )
00680         {
00681           if (hwnd_window_pointed == listptr->winxgc.CWindow 
00682               || hwnd_window_pointed == listptr->winxgc.hWndParent)
00683             {
00684               iwin = listptr->winxgc.CurWindow;
00685               break;
00686             }
00687           listptr =  listptr->next;
00688         }
00689       /* si la fenetre pointee est une fenetre scilab */
00690       if ( iwin != -1 )
00691         {
00692           /* quelle est la dimension de la fenetre */
00693           GetWindowRect(listptr->winxgc.CWindow , &lpRect);
00694           /* on calcule la position relative du click */
00695           *x1  = Point.x - lpRect.left + listptr->winxgc.horzsi.nPos;
00696           *yy1 = Point.y - lpRect.top  + listptr->winxgc.vertsi.nPos;
00697           *win = iwin;
00698           return 1;
00699         }
00700     }
00701   return 0;
00702 }

Here is the call graph for this function:

Here is the caller graph for this function:

int CheckColormap ( int m  ) 

Definition at line 2532 of file periWin.c.

References BCG::CmapFlag, BCG::Numcolors, and ScilabXgc.

02534 {
02535   if (  ScilabXgc != (struct BCG *) 0 )
02536     {
02537       *m =  ScilabXgc->Numcolors;
02538       if ( ScilabXgc->CmapFlag  != 1) 
02539         return 1;
02540       else 
02541         return 0;
02542     }
02543   else {
02544     *m=0;
02545     return(0);}
02546 }

int CheckScilabXgc ( void   ) 

Definition at line 4894 of file periWin.c.

References ScilabXgc.

04895 {
04896   return( ScilabXgc != (struct BCG *) 0);
04897 }

void CleanFonts (  ) 

Definition at line 4480 of file periWin.c.

References FONTMAXSIZE, FONTNUMBER, FontTab, i, and ok.

Referenced by SciG_Font_Printer().

04481 {
04482   int i,j;
04483   for ( j= 0 ; j < FONTNUMBER  ; j++ )
04484   {
04485     if ( (*FontTab)[j].ok == 1) 
04486     {
04487       (*FontTab)[j].ok = 0;
04488       for ( i = 0; i < FONTMAXSIZE ; i++)
04489       {
04490         DeleteObject( (*FontTab)[j].hf[i]) ;
04491         (*FontTab)[j].hf[i] = (HFONT) 0;
04492       }
04493     }
04494   }
04495 }

Here is the caller graph for this function:

void C2F() cleararea ( char *  str,
integer x,
integer y,
integer w,
integer h,
integer v6,
integer v7,
double *  dv1,
double *  dv2,
double *  dv3,
double *  dv4 
)

Definition at line 977 of file periWin.c.

References COLORREF, BCG::Colors, DefaultBackground, hdc, NULL, BCG::NumBackground, ScilabXgc, and x.

00989 {
00990   HBRUSH hBrush;
00991   RECT rect;
00992   static COLORREF px;
00993   px = (ScilabXgc->Colors == NULL)? DefaultBackground 
00994     :  ScilabXgc->Colors[ScilabXgc->NumBackground];
00995   SetRect(&rect,(int) *x,(int) *y,(int) *x+*w,(int) *y+*h);
00997   hBrush = CreateSolidBrush(px);
00998   FillRect(hdc, &rect,hBrush );
00999   DeleteObject(hBrush);
01002 }

void C2F() clearwindow ( char *  v1,
integer v2,
integer v3,
integer v4,
integer v5,
integer v6,
integer v7,
double *  dv1,
double*  dv2,
double*  dv3,
double*  dv4 
)

Clear the current graphic window

verifier ce qui se passe si on est en Xor ? XXXXXXXX

Definition at line 589 of file periWin.c.

References C2F, BCG::ClipRegionSet, COLORREF, BCG::Colors, BCG::CWindow, BCG::CWindowHeight, BCG::CWindowWidth, DefaultBackground, hdc, NULL, BCG::NumBackground, PI0, pixmapclear(), RefreshGraphToolBar(), sciGetPixmapStatus(), ScilabXgc, set_current_clip(), and show().

00593 {
00594   RECT rect;
00595   static COLORREF px;
00596   HBRUSH hBrush;
00597   if ( ScilabXgc->ClipRegionSet == 1) 
00598     SelectClipRgn(hdc,NULL);
00599   if ( sciGetPixmapStatus() == 1) 
00600     {
00601       C2F(pixmapclear)(PI0,PI0,PI0,PI0);
00602       C2F(show)(PI0,PI0,PI0,PI0);      
00603     }
00604   else
00605     {
00606       px = (ScilabXgc->Colors == NULL)? DefaultBackground 
00607         :  ScilabXgc->Colors[ScilabXgc->NumBackground];
00608       SetBkColor(hdc, px );
00609       GetClientRect(ScilabXgc->CWindow, &rect);
00611       hBrush = CreateSolidBrush(px);
00612       /* on met a jour la couleur de fond */
00613       rect.top    = 0;
00614       rect.left   = 0;
00615       rect.right  = ScilabXgc->CWindowWidth;
00616       rect.bottom = ScilabXgc->CWindowHeight;
00617       FillRect(hdc, &rect,hBrush );
00618       DeleteObject(hBrush);
00619     }
00620   /* reset the clip region using current data */
00621   set_current_clip ();
00622 
00623   RefreshGraphToolBar(ScilabXgc);
00624         
00625 }

Here is the call graph for this function:

void clip_line ( integer  x1,
integer  yy1,
integer  x2,
integer  y2,
integer x1n,
integer yy1n,
integer x2n,
integer y2n,
integer flag 
)

Definition at line 4728 of file periWin.c.

References clip_point(), count, dx, dy, and int.

04737 {
04738   integer x, y, dx, dy, x_intr[2], y_intr[2], count, pos1, pos2;
04739 
04740   *x1n=x1; *yy1n=yy1; *x2n=x2; *y2n=y2; *flag=4;
04741   pos1 = clip_point(x1, yy1);
04742   pos2 = clip_point(x2, y2);
04743   if (pos1 || pos2) {
04744     if (pos1 & pos2) { *flag=0;return;}   
04745     /* segment is totally out. */
04746 
04747     /* Here part of the segment MAy be inside. test the intersection
04748      * of this segment with the 4 boundaries for hopefully 2 intersections
04749      * in. If non found segment is totaly out.
04750      */
04751     count = 0;
04752     dx = x2 - x1;
04753     dy = y2 - yy1;
04754 
04755     /* Find intersections with the x parallel bbox lines: */
04756     if (dy != 0) {
04757       x = (int) ((ybot - y2)  * ((double) dx / (double) dy) + x2);
04758       /* Test for ybot boundary. */
04759       if (x >= xleft && x <= xright) {
04760         x_intr[count] = x;
04761         y_intr[count++] = ybot;
04762       }
04763       x = (int) ((ytop - y2) * ((double) dx / (double) dy) + x2); 
04764       /* Test for ytop boundary. */
04765       if (x >= xleft && x <= xright) {
04766         x_intr[count] = x;
04767         y_intr[count++] = ytop;
04768       }
04769     }
04770     if ( count < 2 ) 
04771       {
04772         /* Find intersections with the y parallel bbox lines: */
04773         if (dx != 0) {
04774           y = (int) ((xleft - x2) * ((double) dy / (double) dx) + y2);   
04775           /* Test for xleft boundary. */
04776           if (y >= ybot && y <= ytop) {
04777             x_intr[count] = xleft;
04778             y_intr[count++] = y;
04779           }
04780           if ( count < 2 ) 
04781             {
04782               y = (int) ((xright - x2) * ((double) dy / (double) dx) + y2);  
04783               /* Test for xright boundary. */
04784               if (y >= ybot && y <= ytop) {
04785                 x_intr[count] = xright;
04786                 y_intr[count++] = y;
04787               }
04788             }
04789         }
04790       }
04791 
04792     if (count == 2) {
04793       if (pos1 && pos2) {          /* Both were out - update both */
04794         *x1n = x_intr[0];
04795         *yy1n = y_intr[0];
04796         *x2n = x_intr[1];
04797         *y2n = y_intr[1];
04798         *flag=3;return;
04799       }
04800       else if (pos1) {       /* Only x1/yy1 was out - update only it */
04801         if (dx * (x2 - x_intr[0]) + dy * (y2 - y_intr[0]) >= 0) {
04802           *x1n = x_intr[0];
04803           *yy1n = y_intr[0];
04804           *flag=1;return;
04805         }
04806         else {
04807           *x1n = x_intr[1];
04808           *yy1n = y_intr[1];
04809           *flag=1;return;
04810         }
04811       }
04812       else {             /* Only x2/y2 was out - update only it */
04813         if (dx * (x_intr[0] - x1) + dy * (y_intr[0] - yy1) >= 0) {
04814           *x2n = x_intr[0];
04815           *y2n = y_intr[0];
04816           *flag=2;return;
04817         }
04818         else {
04819           *x2n = x_intr[1];
04820           *y2n = y_intr[1];
04821           *flag=2;return;
04822         }
04823       }
04824     }
04825     else 
04826       {
04827         /* count != 0 */
04828         *flag=0;return;
04829       }
04830   }
04831 }

Here is the call graph for this function:

static int clip_point ( integer  x,
integer  y 
) [static]

Definition at line 4690 of file periWin.c.

Referenced by clip_line().

04691 {
04692   integer ret_val = 0;
04693   if (x < xleft) ret_val |= (char)0x01;
04694   else if (x > xright) ret_val |= (char)0x02;
04695   if (y < ybot) ret_val |= (char)0x04;
04696   else if (y > ytop) ret_val |= (char)0x08;
04697   return ret_val;
04698 }

Here is the caller graph for this function:

void CPixmapResize ( int  x,
int  y 
)

Definition at line 522 of file periWin.c.

References sci_pixmap_resize(), and ScilabXgc.

Referenced by CPixmapResize1().

00523 {
00524   void sci_pixmap_resize(ScilabXgc, x, y) ;
00525 }

Here is the call graph for this function:

Here is the caller graph for this function:

void CPixmapResize1 ( void   ) 

Definition at line 531 of file periWin.c.

References BCG::CWindowHeight, BCG::CWindowWidth, sci_pixmap_resize(), sciGetPixmapStatus(), and ScilabXgc.

Here is the call graph for this function:

void CreateGedMenus ( struct BCG ScilabGC  ) 

Definition at line 1035 of file wgmenu.c.

Referenced by initgraphic(), and RefreshMenus().

01036 {
01037   int WinNum=ScilabGC->CurWindow;
01038 
01039 
01040   /*
01041   for new menus
01042   ScilabXgc->hMenuRoot=CreateMenu();
01043   ScilabXgc->IDM_Count=1;
01044 
01045   SetMenu(ScilabXgc->hWndParent,ScilabXgc->hMenuRoot); 
01046   */
01047 #ifdef WITH_TK
01048   integer ne=14, menutyp=2, ierr;
01049   char *EditMenusE[]={"&Select figure as current","&Redraw figure","&Erase figure","[--]","&Copy object","&Paste object","Move object","Delete object","[--]","Figure properties","Current &axes properties","[--]",MSG_SCIMSG116,MSG_SCIMSG117};
01050   char *EditMenusF[]={"&Selectionner figure comme courante","&Redessiner figure","[--]","&Effacer figure","Copier objet","Coller objet","Déplacer objet","Détruire objet","[--]","Propriétés de la &figure","Propriétés des &axes courants","[--]",MSG_SCIMSG118,MSG_SCIMSG119};
01051 
01052   /* Disable Double Arrow */
01053   integer ni=/*7*/6;
01054   char *InsertMenusE[]={"&Line","&Polyline","&Arrow",/*"&Double Arrow",*/"&Text","&Rectangle","&Circle"};
01055   char *InsertMenusF[]={"&Ligne","L&igne brisée","&Fleche",/*"&Double Fleche",*/"&Texte","&Rectangle","&Cercle"};
01056 #else
01057   integer ne=3, menutyp=2, ierr;
01058   char *EditMenusE[]={"&Select figure","&Redraw figure","&Erase figure"};
01059   char *EditMenusF[]={"&Selectionner figure","&Redessiner figure","&Effacer figure"};
01060 #endif
01061 
01062   UpdateFileGraphNameMenu(ScilabGC);
01063   LoadGraphMacros(ScilabGC);
01064 
01065   switch( ScilabGC->lpmw.CodeLanguage)
01066   {
01067   case 1:
01068     AddMenu(&WinNum,"&Editer", EditMenusF, &ne, &menutyp, "ged", &ierr);
01069 #ifdef WITH_TK
01070     /*AddMenu(&WinNum,"&Inserer", InsertMenusF, &ni, &menutyp, "ged_insert", &ierr);*/
01071 #endif
01072     break;
01073   default:
01074     AddMenu(&WinNum,"&Edit", EditMenusE, &ne, &menutyp, "ged", &ierr);
01075 #ifdef WITH_TK
01076     /*AddMenu(&WinNum,"&Insert", InsertMenusE, &ni, &menutyp, "ged_insert", &ierr);*/
01077 #endif
01078     break;
01079   }
01080 
01081 }

Here is the caller graph for this function:

static void CreateGraphClass (  )  [static]

Definition at line 3920 of file periWin.c.

References RegisterParentWindowGraphClass(), and RegisterWindowGraphClass().

Referenced by initgraphic().

03921 {
03922   RegisterParentWindowGraphClass();
03923   RegisterWindowGraphClass();
03924 }

Here is the call graph for this function:

Here is the caller graph for this function:

void CreateGraphToolBar ( struct BCG ScilabGC  ) 

Definition at line 45 of file Toolbar.c.

Referenced by initgraphic().

00046 {
00047         ScilabGC->lpmw.nButton=0;
00048 
00049         CreateButtonToolBar(ScilabGC,MSG_SCIMSG14,(HMENU)TOOLBAR_ZOOM,IDI_ZOOM,MSG_SCIMSG14,WS_CHILD|WS_VISIBLE|BS_ICON);
00050         CreateButtonToolBar(ScilabGC,MSG_SCIMSG15,(HMENU)TOOLBAR_UNZOOM,IDI_UNZOOM,MSG_SCIMSG15,WS_CHILD|WS_VISIBLE|BS_ICON);
00051         CreateButtonToolBar(ScilabGC,MSG_SCIMSG16,(HMENU)TOOLBAR_ROTATE3D,IDI_3DROT,MSG_SCIMSG16,WS_CHILD|WS_VISIBLE|BS_ICON);
00052         CreateButtonToolBar(ScilabGC,MSG_SCIMSG106,(HMENU)TOOLBAR_GED,IDI_GED,MSG_SCIMSG106,WS_CHILD|WS_VISIBLE|BS_ICON);
00053         CreateButtonToolBar(ScilabGC,MSG_SCIMSG113,(HMENU)TOOLBAR_PICKER,IDI_PICKER,MSG_SCIMSG113,WS_CHILD|WS_VISIBLE|BS_ICON|BS_AUTOCHECKBOX|BS_PUSHLIKE);
00054         CreateButtonToolBar(ScilabGC,MSG_SCIMSG107,(HMENU)TOOLBAR_LINE,IDI_LINE,MSG_SCIMSG107,WS_CHILD|WS_VISIBLE|BS_ICON);
00055         CreateButtonToolBar(ScilabGC,MSG_SCIMSG120,(HMENU)TOOLBAR_POLYLINE,IDI_POLYLINE,MSG_SCIMSG120,WS_CHILD|WS_VISIBLE|BS_ICON);
00056         CreateButtonToolBar(ScilabGC,MSG_SCIMSG108,(HMENU)TOOLBAR_ARROW,IDI_ARROW,MSG_SCIMSG108,WS_CHILD|WS_VISIBLE|BS_ICON);
00057         /*CreateButtonToolBar(ScilabGC,MSG_SCIMSG109,(HMENU)TOOLBAR_DOUBLEARROW,IDI_DOUBLEARROW,MSG_SCIMSG109,WS_CHILD|WS_VISIBLE|BS_ICON);*/
00058         CreateButtonToolBar(ScilabGC,MSG_SCIMSG110,(HMENU)TOOLBAR_TEXT,IDI_TEXT,MSG_SCIMSG110,WS_CHILD|WS_VISIBLE|BS_ICON);
00059         CreateButtonToolBar(ScilabGC,MSG_SCIMSG111,(HMENU)TOOLBAR_RECTANGLE,IDI_RECTANGLE,MSG_SCIMSG111,WS_CHILD|WS_VISIBLE|BS_ICON);
00060         CreateButtonToolBar(ScilabGC,MSG_SCIMSG112,(HMENU)TOOLBAR_CIRCLE,IDI_CIRCLE,MSG_SCIMSG112,WS_CHILD|WS_VISIBLE|BS_ICON);
00061 
00062         ScilabGC->lpmw.LockToolBar=FALSE;
00063 
00064         if (DefaultShowToolBar == FALSE) HideGraphToolBar(ScilabGC);
00065         else
00066         {
00067                 ScilabGC->lpmw.ShowToolBar=TRUE;
00068         }
00069 
00070 }

Here is the caller graph for this function:

void C2F() CreatePatterns (  ) 

Definition at line 1637 of file periWin.c.

References GREYNUMBER, and i.

Referenced by initgraphic().

01638 { 
01639   integer i ;
01640   for ( i=0 ; i < GREYNUMBER ; i++)
01641     {
01642       HBITMAP hBitmap;
01643       hBitmap = CreateBitmap(8,8,1,1,grey0[i]);
01644       Tabpix_[i] =CreatePatternBrush(hBitmap);
01645       DeleteObject(hBitmap);
01646     }
01647 }

Here is the caller graph for this function:

int C2F() CurSymbXOffset ( void   ) 

symbol at point (x,y)

Definition at line 4569 of file periWin.c.

References BCG::CurHardSymb, BCG::CurHardSymbSize, ScilabXgc, SymbOffset, and Offset::xoffset.

Referenced by DrawMark().

04570 {
04571   return(- SymbOffset->xoffset[ScilabXgc->CurHardSymbSize]
04572          [ScilabXgc->CurHardSymb]);
04573 }

Here is the caller graph for this function:

int C2F() CurSymbYOffset ( void   ) 

Definition at line 4575 of file periWin.c.

References BCG::CurHardSymb, BCG::CurHardSymbSize, ScilabXgc, SymbOffset, and Offset::yoffset.

Referenced by DrawMark().

04576 {
04577   return( SymbOffset->yoffset[ScilabXgc->CurHardSymbSize]
04578           [ScilabXgc->CurHardSymb]);
04579 }

Here is the caller graph for this function:

void deletePoints ( void   ) 

Definition at line 4653 of file periWin.c.

References FREE, and NULL.

04654 {
04655   if( points != NULL )
04656   {
04657     FREE( points ) ;
04658     points = NULL ;
04659   }
04660 }

void DeleteSGWin ( integer  intnum  ) 

destruction d'une fenetre

No more graphic window ;

fix the new current graphic window

Definition at line 3705 of file periWin.c.

References curwin(), BCG::CurWindow, del_window_scale(), DeleteWindowToList(), get_window_scale(), getFirstWindow(), isWindowListEmpty(), NULL, ResetScilabXgc(), and ScilabXgc.

03706 {
03707   int curwin;
03708   if ( ScilabXgc == NULL ) { return ; }
03709   curwin = ScilabXgc->CurWindow ;
03710   DeleteWindowToList( intnum ) ;
03711   /*XXXX: jpc 2000: I also delete the scale list associated to that window */
03712   del_window_scale(intnum);
03713   if ( curwin  == intnum )
03714     {
03715       if ( isWindowListEmpty() )
03716         {
03718           ScilabXgc = NULL ;
03719         }
03720       else
03721         {
03723           ScilabXgc = getFirstWindow() ;
03724           ResetScilabXgc() ;
03725           get_window_scale(ScilabXgc->CurWindow,NULL);
03726         }
03727     }
03728 }

Here is the call graph for this function:

void DeleteWindowToList ( integer  num  ) 

detruit la fenetre num dans la liste des fenetres

Freeing bitmaps

Definition at line 3664 of file periWin.c.

References CloseGraphMacros(), BCG::CurPixmapStatus, BCG::CWindow, deleted_win, FREE, getWindowXgcNumber(), NULL, removeWindowItem(), and XgcFreeColors().

Referenced by DeleteSGWin(), and test_xgc().

03665 {
03666   struct BCG * window = getWindowXgcNumber( num ) ;
03667 
03668   if ( window == NULL ) { return ; }
03669 
03670   deleted_win = num;
03671   DestroyWindow(window->hWndParent);
03672   DestroyWindow(window->CWindow);
03673   DestroyWindow(window->Statusbar);
03674   CloseGraphMacros( window ) ;
03675   XgcFreeColors( window );
03676 
03677   /* allocated in wgmenu.c:UpdateFileGraphNameMenu */
03678   if ( window->lpgw->szMenuName != NULL )
03679   {
03680     FREE(window->lpgw->szMenuName) ;
03681     window->lpgw->szMenuName = NULL ;
03682   }
03683 
03684   if ( window->CurPixmapStatus == 1) 
03685   {
03687     if ( window->hdcCompat)
03688     {
03689       SelectObject( window->hdcCompat, NULL ) ;
03690     }
03691     if ( window->hbmCompat)
03692     {
03693       DeleteObject( window->hbmCompat ) ;
03694     }
03695     if ( window->hdcCompat)
03696     {
03697       DeleteDC( window->hdcCompat ) ;
03698     }
03699 
03700   }
03701   removeWindowItem( window ) ;
03702 }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 4249 of file periWin.c.

References buf, C2F, BCG::CurNumberDispFormat, displaystring(), i, PD0, PI0, and ScilabXgc.

04261 { 
04262   char buf[20];
04263   integer i ;
04264   for (i=0 ; i< *n ; i++)
04265     {
04266       sprintf(buf,ScilabXgc->CurNumberDispFormat,z[i]);
04267       C2F(displaystring)(buf,&(x[i]),&(y[i]),PI0,flag,PI0,PI0,&(alpha[i]),PD0,PD0,PD0) ;
04268     }
04269 }

Here is the call graph for this function:

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

Definition at line 2744 of file periWin.c.

References Abs, boundingbox(), C2F, BCG::CurDrawFunction, DispStringAngle(), drawrectangle(), GXxor, hdc, PD0, PI0, ScilabXgc, size, and XorString().

02748 { 
02749   if ( Abs(*angle) <= 0.1) 
02750     {
02751       if ( ScilabXgc->CurDrawFunction ==  GXxor )
02752         {
02753           SIZE size ;
02754           GetTextExtentPoint32(hdc,string,strlen(string),&size);
02755           XorString(*x,*y,string,size.cx,size.cy);
02756         }
02757       else
02758         {
02759           SetBkMode(hdc, TRANSPARENT); 
02760           TextOut(hdc,(int) *x,(int) *y,string,strlen(string));
02761           SetBkMode(hdc, OPAQUE); 
02762         }
02763       if ( *flag == 1) 
02764         {
02765           integer rect[4];
02766           C2F(boundingbox)(string,x,y,rect,PI0,PI0,PI0,PD0,PD0,PD0,PD0);
02767           C2F(drawrectangle)(string,rect,rect+1,rect+2,rect+3,PI0,PI0,PD0,PD0,PD0,PD0);
02768         }
02769     }
02770   else 
02771     {
02772       C2F(DispStringAngle)(x,y,string,angle);
02773     }
02774 }

Here is the call graph for this function:

void C2F() DispStringAngle ( integer x0,
integer yy0,
char *  string,
double *  angle 
)

Definition at line 2853 of file periWin.c.

References DEFAULT_CHARSET, BCG::FontId, BCG::FontSize, hdc, int, memset(), NULL, p, ScilabXgc, and TRUE.

02854 {
02855 
02856   HFONT hfnt, hfntPrev;
02857   size_t pcch;
02858   LOGFONT lf;
02859   char *p;
02860   
02861  memset(&lf, 0, sizeof(LOGFONT));
02862  strncpy(lf.lfFaceName,(*FontTab)[ScilabXgc->FontId].fname,LF_FACESIZE);
02863 
02864  lf.lfHeight  = - size_n_[ScilabXgc->FontSize]*scale_font_size;
02865  lf.lfCharSet = DEFAULT_CHARSET;
02866  if ( (p = strstr((*FontTab)[ScilabXgc->FontId].fname," Italic")) != (LPSTR)NULL ) {
02867    lf.lfFaceName[ (unsigned int)(p- (*FontTab)[ScilabXgc->FontId].fname) ] = '\0';
02868    lf.lfItalic = TRUE;
02869  }
02870  if ( (p = strstr((*FontTab)[ScilabXgc->FontId].fname," Bold")) != (LPSTR)NULL ) {
02871    lf.lfFaceName[ (unsigned int)(p- (*FontTab)[ScilabXgc->FontId].fname) ] = '\0';
02872    lf.lfWeight = FW_BOLD;
02873  }
02874    
02875  SetBkMode(hdc, TRANSPARENT); 
02876  
02877  /* hfnt = CreateFontIndirect((LOGFONT FAR *)&lf);*/
02878  
02879  lf.lfEscapement = (int) (-(*angle)*10);
02880 
02881  hfnt = CreateFontIndirect((LOGFONT FAR *)&lf); 
02882  hfntPrev = SelectObject(hdc, hfnt);
02883         
02884  pcch = strlen(string);
02885 
02886  TextOut(hdc, *x0, *yy0, string, pcch); 
02887  SelectObject(hdc, hfntPrev); 
02888 
02889  DeleteObject(hfnt); 
02890  
02891  // Reset the background mode to its default. 
02892  
02893  SetBkMode(hdc, OPAQUE); 
02894  
02895 }

Here is the call graph for this function:

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

Draw a single ellipsis or part of it

Ellipse(hdc,(int) *x,(int) *y,(int) *width + *x ,(int) *height + *y );

180*64

Definition at line 3357 of file periWin.c.

References hdc, M_PI, Max, and ScilabXgc.

03361 { 
03362   int xmid= *x + *width/2;
03363   int ymid= *y + *height/2;
03364   int lg= Max(*width,*height);
03365   SelectObject(hdc,GetStockObject(NULL_BRUSH));
03367   Arc(hdc,(int) *x,(int) *y,(int) *width + *x ,(int) *height + *y, 
03368       xmid + (int) (lg*cos(*angle1*M_PI/11520.00)),
03369       ymid - (int) (lg*sin(*angle1*M_PI/11520.00)),
03370       xmid + (int)  (lg*cos((*angle1+*angle2)*M_PI/11520.00)),
03371       ymid - (int)(lg*sin((*angle1+*angle2)*M_PI/11520.00))); 
03372   if ( ScilabXgc->hBrush != (HBRUSH) 0) SelectObject(hdc,ScilabXgc->hBrush);
03373 }

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

caution : angle=degreangle*64

Definition at line 3328 of file periWin.c.

References C2F, drawarc(), get_dash_and_color(), i, PD0, PI0, set_dash_and_color(), set_line_style(), and vdouble.

03340 {
03341   integer verbose=0,Dnarg,Dvalue[10],NDvalue,i;
03342   /* store the current values */
03343   C2F(get_dash_and_color)(&verbose,Dvalue,&Dnarg,vdouble);
03344   for (i=0 ; i< *n ; i++)
03345     {
03346       NDvalue = style[i];
03347       C2F(set_line_style)(&NDvalue,PI0,PI0,PI0);
03348       C2F(drawarc)(str,vects+6*i,vects+6*i+1,
03349                    vects+6*i+2,vects+6*i+3,
03350                    vects+6*i+4,vects+6*i+5,PD0,PD0,PD0,PD0);
03351     }
03352   C2F(set_dash_and_color)( Dvalue,PI0,PI0,PI0);
03353 }

Here is the call graph for this function:

void C2F() drawarrows ( char *  str,
integer vx,
integer vy,
integer n,
integer as,
integer style,
integer iflag,
double *  dv1,
double *  dv2,
double *  dv3,
double *  dv4 
)

as is 10*arsize (arsize) the size of the arrow head in pixels

Definition at line 3037 of file periWin.c.

References Abs, C2F, dx, dy, fillpolylines(), get_dash_and_color(), hdc, i, inint, M_PI, NULL, p, PD0, PI0, set_dash_and_color(), set_line_style(), SMDOUBLE, and vdouble.

03049 { 
03050   integer verbose=0,Dnarg,Dvalue[10],NDvalue,i;
03051   double cos20=cos(20.0*M_PI/180.0);
03052   double sin20=sin(20.0*M_PI/180.0);
03053   integer polyx[4],polyy[4];
03054   C2F(get_dash_and_color)(&verbose,Dvalue,&Dnarg,vdouble);
03055   for (i=0 ; i < *n/2 ; i++)
03056     { 
03057       double dx,dy,norm;
03058       if ( (int) *iflag == 1) 
03059         NDvalue = style[i];
03060       else 
03061         NDvalue=(*style < 1) ?  Dvalue[0] : *style;
03062       C2F(set_line_style)(&NDvalue,PI0,PI0,PI0);
03063       
03064       dx=( vx[2*i+1]-vx[2*i]);
03065       dy=( vy[2*i+1]-vy[2*i]);
03066       norm = sqrt(dx*dx+dy*dy);
03067       if ( Abs(norm) >  SMDOUBLE ) 
03068         { integer nn=1,p=3;
03069         dx=(*as/10.0)*dx/norm;dy=(*as/10.0)*dy/norm;
03070         polyx[0]= polyx[3]=vx[2*i+1];/* correction bug 607 (bruno 18 nov 2004) */
03071         polyx[1]= inint(polyx[0]  - cos20*dx -sin20*dy );
03072         polyx[2]= inint(polyx[0]  - cos20*dx + sin20*dy);
03073         polyy[0]= polyy[3]=vy[2*i+1];/* correction bug 607 (bruno 18 nov 2004) */
03074         polyy[1]= inint(polyy[0] + sin20*dx -cos20*dy) ;
03075         polyy[2]= inint(polyy[0] - sin20*dx - cos20*dy) ;
03076         C2F(fillpolylines)("v",polyx,polyy,&NDvalue, &nn,&p,PI0,PD0,PD0,PD0,PD0);
03077         }
03078       MoveToEx(hdc,(int) vx[2*i],(int) vy[2*i],NULL);
03079       LineTo(hdc,(int) (vx[2*i+1]-dx*cos20),(int) (vy[2*i+1]-dy*cos20));
03080       
03081 
03082     }
03083   C2F(set_dash_and_color)( Dvalue,PI0,PI0,PI0);
03084 }

Here is the call graph for this function:

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

Definition at line 4186 of file periWin.c.

References hdc, i, inint, M_PI, NULL, xi, and yi.

04198 { integer i;
04199  double xi,yi,xf,yf;
04200  double cosal,sinal;
04201  cosal= cos( (double)M_PI * (*alpha)/180.0);
04202  sinal= sin( (double)M_PI * (*alpha)/180.0);
04203  for (i=0; i <= nsteps[0]*nsteps[1]; i++)
04204    {
04205      if ( ( i % nsteps[0]) != 0) 
04206        {
04207          xi = initpoint[0]+i*size[0]*cosal;
04208          yi = initpoint[1]+i*size[0]*sinal;
04209          xf = xi - ( size[1]*sinal);
04210          yf = yi + ( size[1]*cosal);
04211          MoveToEx(hdc,inint(xi),inint(yi),NULL);
04212          LineTo(hdc,inint(xf),inint(yf));
04213        }
04214    }
04215  for (i=0; i <= nsteps[1]; i++)
04216    { xi = initpoint[0]+i*nsteps[0]*size[0]*cosal;
04217    yi = initpoint[1]+i*nsteps[0]*size[0]*sinal;
04218    xf = xi - ( size[1]*size[2]*sinal);
04219    yf = yi + ( size[1]*size[2]*cosal);
04220    MoveToEx(hdc,inint(xi),inint(yi),NULL);
04221    LineTo(hdc,inint(xf),inint(yf));
04222    }
04230 }

void C2F() drawClippedPolyline ( char *  str,
integer n,
integer vx,
integer vy,
integer closeflag,
integer v6,
integer v7,
double *  dv1,
double *  dv2,
double *  dv3,
double *  dv4 
)

ths routine also perform clipping to avoid overflow

Definition at line 3506 of file periWin.c.

References analyze_points(), C2F, and n1.

03518 { 
03519   integer n1;
03520   if (*closeflag == 1) n1 = *n+1;else n1= *n;
03521   if (n1 >= 2) 
03522   {
03523     C2F(analyze_points)( *n, vx, vy, *closeflag );
03524   }
03525 }

Here is the call graph for this function:

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

Definition at line 2975 of file periWin.c.

References hdc, and NULL.

02980 {
02981    
02982   MoveToEx(hdc,(int) *x1,(int) *yy1,NULL);
02983   LineTo(hdc,(int) *x2,(int) *y2);
02984   
02985 }

static void DrawMark ( HDC  lhdc,
integer x,
integer y 
) [static]

Definition at line 4585 of file periWin.c.

References C2F, BCG::CurDrawFunction, BCG::CurHardSymb, CurSymbXOffset(), CurSymbYOffset(), GXxor, hdc, Marks, ScilabXgc, and XorString().

04589 {
04590   char str[2];
04591 
04592   str[0]=Marks[ScilabXgc->CurHardSymb];
04593   str[1]='\0';
04594   if ( ScilabXgc->CurDrawFunction ==  GXxor )
04595     {
04596       SIZE size ;
04597       GetTextExtentPoint32(hdc,str,1,&size);
04598       XorString(*x+C2F(CurSymbXOffset)(),*y+C2F(CurSymbYOffset)(),
04599                 str,size.cx,size.cy);
04600     }
04601   else
04602     {
04603       TextOut(hdc,*x+C2F(CurSymbXOffset)(),*y+C2F(CurSymbYOffset)(),str,1); 
04604     }
04605 
04606 }

Here is the call graph for this function:

static void DrawMark (  )  [static]

Referenced by drawpolymark().

Here is the caller graph for this function:

void C2F() drawpolyline ( char *  str,
integer n,
integer vx,
integer vy,
integer closeflag,
integer v6,
integer v7,
double *  dv1,
double *  dv2,
double *  dv3,
double *  dv4 
)

n is the number of points of the polyline

Definition at line 3531 of file periWin.c.

References C2F, hdc, n1, ReturnPoints(), and store_points().

03543 { 
03544   integer n1;
03545   if (*closeflag == 1) n1 = *n+1;else n1= *n;
03546   if (n1 >= 2) 
03547   {
03548     if (C2F(store_points)(*n, vx, vy,*closeflag))
03549           {
03550             Polyline(hdc,C2F(ReturnPoints)(),(int) n1);
03551           } 
03552   }
03553 }

Here is the call graph for this function:

void C2F() drawpolylines ( char *  str,
integer vectsx,
integer vectsy,
integer drawvect,
integer n,
integer p,
integer v7,
double *  dv1,
double *  dv2,
double *  dv3,
double *  dv4 
)

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

we use the markid : drawvect[i]

we use the line-style number abs(drawvect[i])

back to default values

Definition at line 3401 of file periWin.c.

References C2F, close(), drawpolyline(), drawpolymark(), get_dash_and_color(), i, PD0, PI0, set_dash_and_color(), set_line_style(), setpattern(), vdouble, xgetmark(), and xsetmark().

03413 { integer verbose=0 ,symb[2],Mnarg,Dnarg,Dvalue[10],NDvalue,i,close;
03414 /* store the current values */
03415  C2F(xgetmark)(&verbose,symb,&Mnarg,vdouble);
03416  C2F(get_dash_and_color)(&verbose,Dvalue,&Dnarg,vdouble);
03417  for (i=0 ; i< *n ; i++)
03418    {
03419      if (drawvect[i] <= 0)
03420        { 
03421          NDvalue = - drawvect[i] ;
03422          C2F(xsetmark)(&NDvalue,symb+1,PI0,PI0);
03423          C2F(setpattern)(Dvalue+6,PI0,PI0,PI0);
03424           
03425          C2F(drawpolymark)(str,p,vectsx+(*p)*i,vectsy+(*p)*i,PI0,PI0,PI0,PD0,PD0,PD0,PD0);
03426        }
03427      else
03428        {
03429          C2F(set_line_style)(drawvect+i,PI0,PI0,PI0);
03430          close = 0;
03431          C2F(drawpolyline)(str,p,vectsx+(*p)*i,vectsy+(*p)*i,&close,
03432                            PI0,PI0,PD0,PD0,PD0,PD0);
03433        }
03434    }
03436  C2F(set_dash_and_color)( Dvalue,PI0,PI0,PI0);
03437  C2F(xsetmark)(symb,symb+1,PI0,PI0);
03438 }

Here is the call graph for this function:

void C2F() drawpolymark ( char *  str,
integer n,
integer vx,
integer vy,
integer v5,
integer v6,
integer v7,
double *  dv1,
double *  dv2,
double *  dv3,
double *  dv4 
)

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

the symbol font

Definition at line 3580 of file periWin.c.

References C2F, BCG::CurHardSymb, BCG::CurHardSymbSize, DrawMark(), BCG::FontId, BCG::FontSize, hdc, i, L, PI0, ReturnPoints(), ScilabXgc, store_points(), XDrawPoints(), and xsetfont().

03592 {
03593   if ( ScilabXgc->CurHardSymb == 0 )
03594     {
03595       if (C2F(store_points)(*n, vx, vy,0L))             
03596         {
03597           XDrawPoints (hdc,C2F(ReturnPoints)(), *n);
03598         }
03599     }
03600   else 
03601     { 
03602       integer i,keepid,keepsize,hds;
03603       i=1; 
03604       keepid =  ScilabXgc->FontId;
03605       keepsize= ScilabXgc->FontSize;
03606       hds= ScilabXgc->CurHardSymbSize;
03607       C2F(xsetfont)(&i,&hds,PI0,PI0);
03608       for ( i=0; i< *n ;i++) DrawMark(hdc,vx+i,vy+i);
03609       C2F(xsetfont)(&keepid,&keepsize,PI0,PI0);
03610     }
03611 }

Here is the call graph for this function:

void C2F() drawrectangle ( char *  str,
integer x,
integer y,
integer width,
integer height,
integer v6,
integer v7,
double *  dv1,
double *  dv2,
double *  dv3,
double *  dv4 
)

Draw one rectangle with current line style

Definition at line 3140 of file periWin.c.

References hdc, and ScilabXgc.

03152 { 
03153   SelectObject(hdc,GetStockObject(NULL_BRUSH));
03154   /* +1 added for correct 2d axis necessary !! **/
03155   Rectangle(hdc,(int) *x,(int) *y,(int) *width+*x+1 ,(int) *height+*y+1);
03156   if ( ScilabXgc->hBrush != (HBRUSH) 0) 
03157     SelectObject(hdc,ScilabXgc->hBrush);
03158 }

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

if fillvect[i] is < 0 then draw the rectangle with -fillvect[i]

Definition at line 3097 of file periWin.c.

References C2F, drawrectangle(), fillrectangle(), get_dash_and_color(), getpattern(), i, PD0, PI0, set_dash_and_color(), set_line_style(), setpattern(), and vdouble.

03109 {
03110   integer i,cpat,verbose=0,num,cd[10];
03111   C2F(getpattern)(&verbose,&cpat,&num,vdouble);
03112 
03113   C2F(get_dash_and_color)(&verbose,cd,&num,vdouble);
03114   for (i=0 ; i< *n ; i++)
03115     {
03116       if (fillvect[i] < 0)
03117         {
03118           int dash = - fillvect[i];
03119           C2F(set_line_style)(&dash,PI0,PI0,PI0);
03120           C2F(drawrectangle)(str,vects+4*i,vects+4*i+1,vects+4*i+2,vects+4*i+3
03121                              ,PI0,PI0,PD0,PD0,PD0,PD0);
03122         }
03123       else if (fillvect[i] == 0)
03124         {
03125           /* C2F(set_line_style)(&cd,PI0,PI0,PI0);*/
03126           C2F(drawrectangle)(str,vects+4*i,vects+4*i+1,vects+4*i+2,vects+4*i+3
03127                              ,PI0,PI0,PD0,PD0,PD0,PD0);
03128         }
03129       else
03130         {
03131           C2F(setpattern)(&(fillvect[i]),PI0,PI0,PI0);
03132           C2F(fillrectangle)(str,vects+4*i,vects+4*i+1,vects+4*i+2,vects+4*i+3,PI0,PI0,PD0,PD0,PD0,PD0);
03133         }
03134     }
03135   C2F(set_dash_and_color)(&(cd[0]),PI0,PI0,PI0);
03136 }

Here is the call graph for this function:

void C2F() drawsegments ( char *  str,
integer vx,
integer vy,
integer n,
integer style,
integer iflag,
integer v7,
double *  dv1,
double *  dv2,
double *  dv3,
double *  dv4 
)

n is the size of vx and vy

Definition at line 2992 of file periWin.c.

References C2F, get_dash_and_color(), hdc, i, NULL, PI0, set_dash_and_color(), set_line_style(), and vdouble.

03004 {
03005   integer verbose=0,Dnarg,Dvalue[10],NDvalue;
03006   integer i ;
03007 
03008   C2F(get_dash_and_color)(&verbose,Dvalue,&Dnarg,vdouble);
03009 
03010 
03011   if ( (int) *iflag == 1) { /* one style per segment */
03012     for (i=0 ; i < *n/2 ; i++) {
03013       NDvalue = style[i];
03014       C2F(set_line_style)(&NDvalue,PI0,PI0,PI0);
03015       MoveToEx(hdc,(int) vx[2*i],(int) vy[2*i],NULL);
03016       LineTo(hdc,(int) vx[2*i+1],(int) vy[2*i+1]);
03017     }
03018   }
03019   else {
03020     if (*style >= 1) /* set color */
03021       C2F(set_line_style)(style,PI0,PI0,PI0);
03022 
03023     for (i=0 ; i < *n/2 ; i++) {
03024       MoveToEx(hdc,(int) vx[2*i],(int) vy[2*i],NULL);
03025       LineTo(hdc,(int) vx[2*i+1],(int) vy[2*i+1]);
03026     }
03027   }
03028   C2F(set_dash_and_color)( Dvalue,PI0,PI0,PI0);
03029 }

Here is the call graph for this function:

void fill_grid_rectangles ( x  ,
y  ,
double *  z,
integer  n1,
integer  n2 
)

Definition at line 3187 of file periWin.c.

References Abs, C2F, getlast(), getpattern(), getwindowdim(), hdc, i, inint, j, Maxi(), MaybeSetWinhdc(), Mini(), PI0, ReleaseWinHdc(), setpattern(), SMDOUBLE, and vdouble.

Referenced by GraySquare().

03191 {
03192   double zmoy,zmax,zmin,zmaxmin;
03193   integer i,j,verbose=0,whiteid,narg,fill[1],cpat,xz[2];
03194   int flag;
03195 
03196   zmin=Mini(z,(n1)*(n2));
03197   zmax=Maxi(z,(n1)*(n2));
03198   zmaxmin=zmax-zmin;
03199   if (zmaxmin <= SMDOUBLE) zmaxmin=SMDOUBLE;
03200   /* WARNING: this routine is provided here to accelerate 
03201    * multiple rectangles drawing 
03202    * since it is not called the usual way i.e through 
03203    * dr we must add here SetWinhdc and ReleaseWinHdc 
03204    */ 
03205   flag=MaybeSetWinhdc();
03206   C2F(getlast)(&verbose,&whiteid,&narg,vdouble);
03207   C2F(getpattern)(&verbose,&cpat,&narg,vdouble);
03208   C2F(getwindowdim)(&verbose,xz,&narg,vdouble);
03209 
03210   for (i = 0 ; i < (n1)-1 ; i++)
03211     for (j = 0 ; j < (n2)-1 ; j++)
03212       {
03213         integer w,h;
03214         zmoy=1/4.0*(z[i+n1*j]+z[i+n1*(j+1)]+z[i+1+n1*j]+z[i+1+n1*(j+1)]);
03215         fill[0]=1 + inint((whiteid-1)*(zmoy-zmin)/(zmaxmin));
03216         C2F(setpattern)(fill,PI0,PI0,PI0);
03217         w=Abs(x[i+1]-x[i]);h=Abs(y[j+1]-y[j]);
03218         /* We don't trace rectangle which are totally out **/
03219         if ( w != 0 && h != 0 && x[i] < xz[0] && y[j+1] < xz[1] && x[i]+w > 0 && y[j+1]+h > 0 )
03220           Rectangle(hdc,(int) x[i],(int) y[j+1],(int) w + x[i]+1 ,(int) h + y[j+1]+1 );
03221       }
03222   C2F(setpattern)(&cpat,PI0,PI0,PI0);
03223   if ( flag == 1) ReleaseWinHdc();
03224 }

Here is the call graph for this function:

Here is the caller graph for this function:

void fill_grid_rectangles1 ( integer x,
integer y,
double *  z,
integer  n1,
integer  n2 
)

Definition at line 3236 of file periWin.c.

References Abs, C2F, getpattern(), getwindowdim(), hdc, i, int, j, MaybeSetWinhdc(), PI0, ReleaseWinHdc(), setpattern(), and vdouble.

Referenced by GraySquare1().

03242 {
03243   integer i,j,verbose=0,narg,fill[1],cpat,xz[2];
03244   int flag;
03245 
03246   /* WARNING: this routine is provided here to accelerate 
03247    * multiple rectangles drawing 
03248    * since it is not called the usual way i.e through 
03249    * dr we must add here SetWinhdc and ReleaseWinHdc 
03250    */ 
03251   flag=MaybeSetWinhdc();
03252   C2F(getpattern)(&verbose,&cpat,&narg,vdouble);
03253   C2F(getwindowdim)(&verbose,xz,&narg,vdouble);
03254   for (i = 0 ; i < (n1)-1 ; i++)
03255     for (j = 0 ; j < (n2)-1 ; j++)
03256       {
03257         integer w,h;
03258         fill[0]= (int) z[i+(n1-1)*j];
03259         C2F(setpattern)(fill,PI0,PI0,PI0);
03260         w=Abs(x[j+1]-x[j]);
03261         h=Abs(y[i+1]-y[i]);
03262         /* We don't trace rectangle which are totally out **/
03263         if ( w != 0 && h != 0 && x[j] < xz[0] && y[i] < xz[1] && x[j]+w > 0 && y[i]+h > 0 )
03264           Rectangle(hdc,(int) x[j],(int) y[i],(int) w + x[j]+1 ,(int) h + y[i]+1 );
03265       }
03266   C2F(setpattern)(&cpat,PI0,PI0,PI0);
03267   if ( flag == 1) ReleaseWinHdc();
03268 }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Fill a single elipsis or part of it with current pattern

Ellipse(hdc,(int) *x,(int) *y,(int)*width+*x ,(int)*height+*y );

180*64

Definition at line 3376 of file periWin.c.

References hdc, M_PI, and Max.

03380 {
03381   int xmid= *x + *width/2;
03382   int ymid= *y + *height/2;
03383   int lg= Max(*width,*height);
03385   Pie(hdc,(int) *x,(int) *y,(int) *width + *x ,(int) *height + *y, 
03386       xmid +(int)  (lg*cos(*angle1*M_PI/11520.00)),
03387       ymid - (int) (lg*sin(*angle1*M_PI/11520.00)),
03388       xmid+(int) (lg*cos((*angle1+*angle2)*M_PI/11520.00)),
03389       ymid - (int) (lg*sin((*angle1+*angle2)*M_PI/11520.00))); 
03390 }

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

The drawing style is the current drawing

Definition at line 3284 of file periWin.c.

References C2F, drawarc(), fillarc(), getpattern(), i, BCG::IDLastPattern, PD0, PI0, ScilabXgc, setpattern(), and vdouble.

03296 {
03297   integer i,cpat,verb,num;
03298   verb=0;
03299   C2F(getpattern)(&verb,&cpat,&num,vdouble);
03300   for (i=0 ; i< *n ; i++)
03301     {
03302       if (fillvect[i] > ScilabXgc->IDLastPattern + 1)
03303         {
03304           C2F(setpattern)(&(cpat),PI0,PI0,PI0);
03305           C2F(drawarc)(str,vects+6*i,vects+6*i+1,
03306                        vects+6*i+2,vects+6*i+3,
03307                        vects+6*i+4,vects+6*i+5,PD0,PD0,PD0,PD0);
03308         }
03309       else
03310         {
03311           C2F(setpattern)(&(fillvect[i]),PI0,PI0,PI0);
03312           C2F(fillarc)(str,vects+6*i,vects+6*i+1,
03313                        vects+6*i+2,vects+6*i+3,
03314                        vects+6*i+4,vects+6*i+5,PD0,PD0,PD0,PD0);
03315         }
03316     }
03317   C2F(setpattern)(&(cpat),PI0,PI0,PI0);
03318 }

Here is the call graph for this function:

void C2F() fillpolyline ( char *  str,
integer n,
integer vx,
integer vy,
integer closeflag,
integer v6,
integer v7,
double *  dv1,
double *  dv2,
double *  dv3,
double *  dv4 
)

according to *closeflag : the given vector is a polyline or a polygon

Definition at line 3557 of file periWin.c.

References C2F, hdc, n1, ReturnPoints(), and store_points().

03569 {
03570   integer n1;
03571   if (*closeflag == 1) n1 = *n+1;else n1= *n;
03572   if (C2F(store_points)(*n, vx, vy,*closeflag))
03573     {
03574       Polygon(hdc,C2F(ReturnPoints)(), n1);
03575     }
03576 }

Here is the call graph for this function:

void C2F() fillpolylines ( char *  str,
integer vectsx,
integer vectsy,
integer fillvect,
integer n,
integer p,
integer v7,
double *  dv1,
double *  dv2,
double *  dv3,
double *  dv4 
)

fill a set of polygons each of which is defined by (*p) points (*n) is the number of polygons the polygon is closed by the routine fillvect[*n] : fillvect[*n] : if fillvect[i] == 0 draw the boundaries with current color if fillvect[i] > 0 draw the boundaries with current color then fill with pattern fillvect[i] if fillvect[i] < 0 fill with pattern - fillvect[i]

on peint puis on fait un contour ferme

Definition at line 3451 of file periWin.c.

References C2F, close(), drawpolyline(), fillpolyline(), get_dash_and_color(), getpattern(), i, PD0, PI0, set_dash_and_color(), set_line_style(), setpattern(), and vdouble.

03463 {
03464   integer Dnarg,Dvalue[10];
03465   integer i,cpat,verbose=0,num,close=1,pattern;
03466   C2F(getpattern)(&verbose,&cpat,&num,vdouble);
03467   C2F(get_dash_and_color)(&verbose,Dvalue,&Dnarg,vdouble);
03468   for (i=0 ; i< *n ; i++)
03469     {
03470       if (fillvect[i] > 0) 
03471         { 
03473           C2F(setpattern)(&fillvect[i],PI0,PI0,PI0);
03474           C2F(fillpolyline)(str,p,vectsx+(*p)*i,vectsy+(*p)*i,(close=1,&close),
03475                             PI0,PI0,PD0,PD0,PD0,PD0);
03476           C2F(set_line_style)(Dvalue,PI0,PI0,PI0);
03477           C2F(setpattern)(&(cpat),PI0,PI0,PI0);
03478           C2F(drawpolyline)(str,p,vectsx+(*p)*i,vectsy+(*p)*i,(close=1,&close)
03479                             ,PI0,PI0,PD0,PD0,PD0,PD0);
03480         }
03481       else  if (fillvect[i] == 0 )
03482         {
03483           C2F(set_line_style)(Dvalue,PI0,PI0,PI0);
03484           C2F(setpattern)(&cpat,PI0,PI0,PI0);
03485           C2F(drawpolyline)(str,p,vectsx+(*p)*i,vectsy+(*p)*i,(close=0,&close)
03486                             ,PI0,PI0,PD0,PD0,PD0,PD0);
03487         }
03488       else 
03489         {
03490           pattern = -fillvect[i] ;
03491           C2F(setpattern)(&pattern,PI0,PI0,PI0);
03492           C2F(fillpolyline)(str,p,vectsx+(*p)*i,vectsy+(*p)*i,(close=0,&close)
03493                             ,PI0,PI0,PD0,PD0,PD0,PD0);
03494         }
03495     }
03496   C2F(set_dash_and_color)(Dvalue,PI0,PI0,PI0); 
03497 }

Here is the call graph for this function:

void C2F() fillrectangle ( char *  str,
integer x,
integer y,
integer width,
integer height,
integer v6,
integer v7,
double *  dv1,
double *  dv2,
double *  dv3,
double *  dv4 
)

fill one rectangle, with current pattern

Rectangle with current pen and brush

Definition at line 3162 of file periWin.c.

References hdc.

03174 { 
03176   Rectangle(hdc,(int) *x,(int) *y,(int) *width + *x+1 ,(int) *height + *y+1 );
03177 }

integer first_in ( integer  n,
integer  ideb,
integer vx,
integer vy 
)

Definition at line 4842 of file periWin.c.

References i.

04847 {
04848   integer i;
04849   for (i=ideb  ; i < n ; i++)
04850     {
04851       if (vx[i]>= xleft && vx[i] <= xright  && vy[i] >= ybot && vy[i] <= ytop)
04852                         {
04853                                 return(i);
04854                         }
04855     }
04856   return(-1);
04857 }

integer first_out ( integer  n,
integer  ideb,
integer vx,
integer vy 
)

Definition at line 4865 of file periWin.c.

References i.

04870 {
04871   integer i;
04872   for (i=ideb  ; i < n ; i++)
04873     {
04874       if ( vx[i]< xleft || vx[i]> xright  || vy[i] < ybot || vy[i] > ytop) return(i);
04875     }
04876   return(-1);
04877 }

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

Definition at line 2587 of file periWin.c.

References Scistring().

02592 {
02593   if ( *verbose ==1 ) Scistring("\n No operation ");
02594 }

Here is the call graph for this function:

void get_b ( int  i,
float *  b 
)

Definition at line 2562 of file periWin.c.

References BCG::Blue, and ScilabXgc.

02565 {
02566   *b = ScilabXgc->Blue[i];
02567 }

static void C2F() get_dash_and_color ( integer verbose,
integer value,
integer narg,
double *  dummy 
) [static]

Definition at line 1830 of file periWin.c.

References C2F, getdash(), and getpattern().

Referenced by drawarcs(), drawarrows(), drawpolylines(), drawrectangles(), drawsegments(), and fillpolylines().

01835 {
01836   /*may be improved replacing 6 by narg */
01837   C2F(getdash)(verbose, value, narg,dummy);
01838   C2F(getpattern)(verbose, value+6, narg,dummy);
01839   *narg = 6;
01840 }

Here is the call graph for this function:

Here is the caller graph for this function:

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

to get the current dash-style

Definition at line 1813 of file periWin.c.

References C2F, BCG::CurColor, BCG::CurColorStatus, getdash(), ScilabXgc, and sciprint().

01818 {
01819 
01820   if ( ScilabXgc->CurColorStatus == 1) 
01821     {
01822       *narg =1 ;
01823       *value =ScilabXgc->CurColor+1;
01824       if (*verbose == 1) sciprint("Color %d",(int)*value);
01825       return;
01826     }
01827   C2F(getdash)(verbose, value, narg,dummy);
01828 }

Here is the call graph for this function:

void get_g ( int  i,
float *  g 
)

Definition at line 2555 of file periWin.c.

References BCG::Green, and ScilabXgc.

02558 {
02559   *g = ScilabXgc->Green[i];
02560 }

void get_r ( int  i,
float *  r 
)

Definition at line 2548 of file periWin.c.

References BCG::Red, and ScilabXgc.

02551 {
02552   *r = ScilabXgc->Red[i];
02553 }

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

to get information on absolute or relative mode

Definition at line 1386 of file periWin.c.

References CoordModeOrigin, BCG::CurVectorStyle, ScilabXgc, and Scistring().

01391 {
01392   *narg = 1;
01393   *num = ScilabXgc->CurVectorStyle  ;
01394   if (*verbose == 1) {
01395     if (ScilabXgc->CurVectorStyle == CoordModeOrigin)
01396       Scistring("\nTrace Absolu");
01397     else 
01398       Scistring("\nTrace Relatif");
01399   }
01400 }

Here is the call graph for this function:

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

Definition at line 1530 of file periWin.c.

References AluStruc_, BCG::CurDrawFunction, info, name, ScilabXgc, and sciprint().

01535 { 
01536   *narg =1 ;
01537   *value = ScilabXgc->CurDrawFunction ;
01538   if (*verbose ==1 ) 
01539     { 
01540       sciprint("\nThe Alufunction is %s -> <%s>\r\n",
01541                AluStruc_[*value].name,
01542                AluStruc_[*value].info);}
01543 }

Here is the call graph for this function:

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

Definition at line 2442 of file periWin.c.

References BCG::CurColorStatus, BCG::NumBackground, ScilabXgc, and sciprint().

02447 {
02448   *narg=1;
02449   if ( ScilabXgc->CurColorStatus == 1 )
02450     {
02451       *num = ScilabXgc->NumBackground + 1;
02452     }
02453   else
02454     {
02455       *num = 1;
02456     }
02457   if (*verbose == 1)
02458     sciprint("\n Background : %d\r\n",*num);
02459 }

Here is the call graph for this function:

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

Get the boundaries of the current clip zone

Definition at line 1338 of file periWin.c.

References BCG::ClipRegionSet, BCG::CurClipRegion, ScilabXgc, sciprint(), and Scistring().

01343 {
01344   x[0] = ScilabXgc->ClipRegionSet;
01345   if ( x[0] == 1)
01346     {
01347       *narg = 5;
01348       x[1] =ScilabXgc->CurClipRegion[0];
01349       x[2] =ScilabXgc->CurClipRegion[1];
01350       x[3] =ScilabXgc->CurClipRegion[2];
01351       x[4] =ScilabXgc->CurClipRegion[3];
01352     }
01353   else *narg = 1;
01354   if (*verbose == 1) {
01355     if (ScilabXgc->ClipRegionSet == 1)
01356       sciprint("\nThere's a Clip Region :x:%d,y:%d,w:%d,h:%d\r\n",
01357                ScilabXgc->CurClipRegion[0],
01358                ScilabXgc->CurClipRegion[1],
01359                ScilabXgc->CurClipRegion[2],
01360                ScilabXgc->CurClipRegion[3]);
01361     else 
01362       Scistring("\nNo Clip Region");
01363   }
01364 }

Here is the call graph for this function:

void getcolordef ( integer screenc  ) 

Definition at line 4090 of file periWin.c.

References screencolor.

04091 {
04092   *screenc= screencolor;
04093 }

void C2F() getcolormap ( integer verbose,
integer num,
integer narg,
double *  val 
)

Definition at line 2403 of file periWin.c.

References BCG::Blue, BCG::Green, i, m, BCG::Numcolors, BCG::Red, ScilabXgc, and sciprint().

02408 {
02409   int m = ScilabXgc->Numcolors;
02410   int i;
02411   *narg = 1;
02412   *num = m;
02413   for (i = 0; i < m; i++) {
02414     val[i] = (double)ScilabXgc->Red[i];
02415     val[i+m] = (double)ScilabXgc->Green[i];
02416     val[i+2*m] = (double)ScilabXgc->Blue[i];
02417   }
02418   if (*verbose == 1) {
02419     sciprint("Size of colormap: %d colors\r\n",m);
02420   }
02421 }

Here is the call graph for this function:

static void C2F() getcolormapsize ( integer verbose,
integer num,
integer narg,
double *  val 
) [static]

static HFONT getcurfont (  )  [static]

Definition at line 4316 of file periWin.c.

References BCG::FontId, BCG::FontSize, FontTab, and ScilabXgc.

Referenced by XorString().

04317 {
04318   return( (*FontTab)[ScilabXgc->FontId].hf[ScilabXgc->FontSize]);
04319 }

Here is the caller graph for this function:

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

Get the id number of the Current Graphic Window In all the other functions we are sure that ScilabXgc exists when we call them ( see sciwin in matdes.f ) exept for this function which is called in sciwin and the previous one

Definition at line 1259 of file periWin.c.

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

01264 {
01265   *narg =1 ;
01266   *intnum = (ScilabXgc != (struct BCG *) 0) ? ScilabXgc->CurWindow : 0;
01267   if (*verbose == 1) 
01268     sciprint("\nCurrent Graphic Window :%d\r\n",(int) *intnum);
01269 }

Here is the call graph for this function:

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

Definition at line 1794 of file periWin.c.

References BCG::CurDashStyle, ScilabXgc, and Scistring().

Referenced by get_dash_and_color(), and get_dash_or_color().

01795 {
01796   *narg =1 ;
01797   *value =ScilabXgc->CurDashStyle+1;
01798   if ( *verbose == 1) 
01799   {
01800     switch ( *value )
01801     {
01802     case 0: Scistring("\nLine style = Line Solid\n"); break ;
01803     case 1: Scistring("\nLine style = DASH\n"); break ;
01804     case 2: Scistring("\nLine style = DOT\n"); break ;
01805     case 3: Scistring("\nLine style = DASHDOT\n"); break ;
01806     case 4: Scistring("\nLine style = DASHDOTDOT\n"); break ;
01807     }
01808   }
01809 }

Here is the call graph for this function:

Here is the caller graph for this function:

void C2F() getFontMaxSize ( char *  str,
integer sizeMin,
integer sizeMax,
integer v1,
integer v2,
integer v3,
integer v4,
double *  dx1,
double *  dx2,
double *  dx3,
double *  dx4 
)

get the miniam and maximal font size the driver can display

Definition at line 4235 of file periWin.c.

References FONTMAXSIZE.

04238 {
04239   *sizeMin = 0 ;
04240   *sizeMax = FONTMAXSIZE ;
04241 }

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

Definition at line 2475 of file periWin.c.

References BCG::CurColorStatus, BCG::NumForeground, ScilabXgc, and sciprint().

02480 {
02481   *narg=1;
02482   if ( ScilabXgc->CurColorStatus == 1 )
02483     {
02484       *num = ScilabXgc->NumForeground + 1;
02485     }
02486   else
02487     {
02488       *num =  1; 
02489     }
02490   if (*verbose == 1)
02491     sciprint("\n Foreground : %d\r\n",*num);
02492 }

Here is the call graph for this function:

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

Definition at line 2508 of file periWin.c.

References BCG::CurColorStatus, BCG::NumHidden3d, ScilabXgc, and sciprint().

02513 {
02514   *narg=1;
02515   if ( ScilabXgc->CurColorStatus == 1 )
02516     {
02517       *num = ScilabXgc->NumHidden3d + 1;
02518     }
02519   else
02520     {
02521       *num = 1; 
02522     }
02523   if (*verbose == 1) sciprint("\n Hidden3d : %d\r\n",*num);
02524 }

Here is the call graph for this function:

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

To get the id of the last pattern

Definition at line 1683 of file periWin.c.

References BCG::CurColorStatus, BCG::IDLastPattern, ScilabXgc, and sciprint().

Referenced by fill_grid_rectangles().

01688 {
01689   if ( ScilabXgc->CurColorStatus == 1 ) 
01690     {
01691       *num = ScilabXgc->IDLastPattern + 1;
01692       if (*verbose == 1) 
01693         sciprint("\n Id of Last Color %d\r\n",(int)*num);
01694     }
01695   else 
01696     {
01697       *num = ScilabXgc->IDLastPattern + 1;
01698       if (*verbose == 1) 
01699         sciprint("\n Id of Last Pattern %d\r\n",(int)*num);
01700     }
01701   *narg=1;
01702 }

Here is the call graph for this function:

Here is the caller graph for this function:

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

To get the id of the current pattern

Definition at line 1668 of file periWin.c.

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

Referenced by drawrectangles(), fill_grid_rectangles(), fill_grid_rectangles1(), fillarcs(), fillpolylines(), and get_dash_and_color().

01673 { 
01674   *narg=1;
01675   if ( ScilabXgc->CurColorStatus == 1 ) 
01676     *num = ScilabXgc->CurColor +1 ;
01677   else 
01678     *num = ScilabXgc->CurPattern +1 ;
01679   if (*verbose == 1) sciprint("\n Pattern : %d\r\n",ScilabXgc->CurPattern+1);
01680 }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 1971 of file periWin.c.

References sciGetPixmapStatus(), and sciprint().

01972 {
01973   *value=sciGetPixmapStatus();
01974   *narg =1 ;
01975   if (*verbose == 1) sciprint("Color %d",(int)*value);
01976 }

Here is the call graph for this function:

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

To get the popup window size

Definition at line 1125 of file periWin.c.

References BCG::CWindowHeightView, BCG::CWindowWidthView, ScilabXgc, and sciprint().

01130 {
01131   x[0]= ScilabXgc->CWindowWidthView; 
01132   x[1]= ScilabXgc->CWindowHeightView;
01133   *narg = 2;
01134   if (*verbose == 1) 
01135     sciprint("\n ScilabXgc->CWindow dim :%d,%d\r\n",(int) x[0],(int) x[1]);
01136 }

Here is the call graph for this function:

static void C2F() getscilabFigure ( integer verbose,
integer x,
integer narg,
double *  figure 
) [static]

static void C2F() getscilabVersion ( integer verbose,
integer vers,
integer narg,
double *  dummy 
) [static]

static void C2F() getscilabxgc ( integer verbose,
integer x,
integer narg,
double *  dummy 
) [static]

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

to get the thickness value

Definition at line 1602 of file periWin.c.

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

01603 {
01604   *narg =1 ;
01605   *value = ScilabXgc->CurLineWidth ;
01606   if (*verbose ==1 ) sciprint("\nLine Width:%d\r\n", ScilabXgc->CurLineWidth ) ;
01607 }

Here is the call graph for this function:

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

Definition at line 1884 of file periWin.c.

References BCG::CurColorStatus, ScilabXgc, and sciprint().

01889 {
01890   *num = ScilabXgc->CurColorStatus;
01891   if (*verbose == 1) 
01892     sciprint("\n Use color %d\r\n",(int)*num);
01893   *narg=1;
01894 }

Here is the call graph for this function:

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

C2F(getviewport) : To get the viewport Upper/Left point Position

Definition at line 1166 of file periWin.c.

References BCG::mafigure, sciGetViewport(), and ScilabXgc.

01167 {
01168   *narg = 2;
01169   sciGetViewport( ScilabXgc->mafigure, &x[0], &x[1] ) ;
01170 } 

Here is the call graph for this function:

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

To get the window size

Definition at line 1037 of file periWin.c.

References BCG::CWindowHeight, BCG::CWindowWidth, ScilabXgc, and sciprint().

01038 {     
01039   *narg = 2;
01040   /* on renvoie la taille de la fenetre virtuelle */
01041   /* windows devrait s'occupper de tout afficher correctement */
01042   x[0]= ScilabXgc->CWindowWidth;
01043   x[1]= ScilabXgc->CWindowHeight;
01044   if (*verbose == 1) 
01045     sciprint("\n CWindow dim :%d,%d\r\n",(int) x[0],(int) x[1]);
01046 } 

Here is the call graph for this function:

HWND GetWindowNumber ( int  wincount  ) 

Definition at line 3734 of file periWin.c.

References BCG::CWindow, and getWindowXgcNumber().

03736 {
03737   struct BCG *bcg;
03738   bcg = getWindowXgcNumber(wincount);
03739   if ( bcg != (struct BCG *) 0)
03740     return( bcg->CWindow);
03741   else
03742     return( (HWND) 0);
03743 }

Here is the call graph for this function:

HWND GetWindowNumber (  ) 

functions

Referenced by xclick_any().

Here is the caller graph for this function:

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

to get the window upper-left point coordinates on the screen

Definition at line 1011 of file periWin.c.

References ScilabXgc, and sciprint().

01016 {
01017   RECT rect;
01018   GetWindowRect(ScilabXgc->hWndParent,&rect);
01019   *narg = 2;
01020   x[0]=rect.left; x[1] = rect.top;
01021   if (*verbose == 1) 
01022     sciprint("\n ScilabXgc->CWindow position :%d,%d\r\n",x[0],x[1]);
01023 }

Here is the call graph for this function:

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

Definition at line 2003 of file periWin.c.

References sciGetwresize(), and sciprint().

02008 {
02009   *value = sciGetwresize();
02010   *narg =1 ;
02011   if (*verbose == 1) sciprint("Resize status %d",(int)*value);
02012 }

Here is the call graph for this function:

static void idfromname ( char *  name1,
integer num 
) [static]

Definition at line 1428 of file periWin.c.

References AluStruc_, i, info, name, sciprint(), and Scistring().

Referenced by setalufunction(), and xset_alufunction().

01431 {int i;
01432  *num = -1;
01433  for ( i =0 ; i < 16;i++)
01434    if (strcmp(AluStruc_[i].name,name1)== 0) 
01435      *num=AluStruc_[i].id;
01436  if (*num == -1 ) 
01437    {
01438      Scistring("\n Use the following keys (integer in scilab");
01439      for ( i=0 ; i < 16 ; i++)
01440        sciprint("\nkey %s   -> %s\r\n",AluStruc_[i].name,
01441                 AluStruc_[i].info);
01442    }
01443 }

Here is the call graph for this function:

Here is the caller graph for this function:

void C2F() initgraphic ( char *  string,
integer v2,
integer v3,
integer v4,
integer v5,
integer v6,
integer v7,
double *  dv1,
double *  dv2,
double *  dv3,
double *  dv4 
)

EntryCounter is used to check for first Entry + to now an available number

XXXXXX : pour l'instant couleur par defaut

XXX : utiliser EntryCounter ???

Read or use default values

ReadRegistryGraph takes care of graphwin.Origin and graphwin.Size

ScilabXgc is send to CreateWindow and this information is used in WndGraphProc

to know that we are inside init code

Default value is without Pixmap

Definition at line 3749 of file periWin.c.

References AddNewWindowToList(), AllocVectorStorage(), tagGW::ButtonHeight, C2F, CreateGedMenus(), CreateGraphClass(), CreateGraphToolBar(), CreatePatterns(), BCG::CurPixmapStatus, BCG::CurResizeStatus, BCG::CurWindow, BCG::CWindow, BCG::CWindowHeight, BCG::CWindowHeightView, BCG::CWindowWidth, BCG::CWindowWidthView, FALSE, graphwin, hdc, tagGW::hInstance, tagGW::hPrevInstance, InitMissileXgc(), InitStatusBar(), LoadFonts(), Max, NULL, tagGW::Origin, PI0, ReadRegistryGraph(), tagGW::resized, SB_HORZ, SB_VERT, sciGetScrollInfo(), ScilabXgc, sciSetScrollInfo(), Scistring(), screencolor, SetFocus(), SetWinhdc(), tagGW::Size, SW_SHOWNORMAL, szGraphClass, szParentGraphClass, TRUE, WIN_XMAX, WIN_YMAX, tagGW::xmax, and tagGW::ymax.

03761 { 
03762         static char popupname[sizeof("ScilabGraphic")+4];
03763         static char winname[sizeof("BG")+4];
03764         struct BCG *NewXgc ;
03765         RECT rect,rect1;
03766         static integer EntryCounter = 0;
03767         integer WinNum;
03768         static HMENU sysmenu;
03769         SCROLLINFO vertsi;
03770         SCROLLINFO horzsi;
03771 
03772         if ( v2 != (integer *) NULL && *v2 != -1 )
03773         {
03774                 WinNum= *v2;
03775         }
03776         else
03777         {
03778                 WinNum= EntryCounter;
03779         }
03780 
03781         if (EntryCounter == 0)
03782         {
03784                 screencolor = 1;
03785                 if (C2F(AllocVectorStorage)()==0) return;
03786                 graphwin.xmax = WIN_XMAX;
03787                 graphwin.ymax = WIN_YMAX;
03788                 if (! graphwin.hPrevInstance) 
03789                 {
03790                         CreateGraphClass();
03791                 }
03793         }
03794 
03795         if (( NewXgc = AddNewWindowToList()) == (struct BCG *) 0)
03796         {
03797                 Scistring("initgraphics: unable to alloc\n");
03798                 return;
03799         }
03800         else
03801         {
03802                 ScilabXgc= NewXgc;
03803         }
03808         /* Probleme graphwin peut etre locké par une autre fonction */
03809         /* Faire une copie serait preferable */
03810         ScilabXgc->lpgw = &graphwin;
03811 
03812         sprintf(popupname,"ScilabGraphic%d", (int)WinNum);
03813         if (EntryCounter == 0)
03814         {
03815                 ReadRegistryGraph(ScilabXgc);
03816         }
03817         ScilabXgc->Inside_init=1; 
03819         ScilabXgc->hWndParent = CreateWindow(szParentGraphClass, popupname,
03820                         WS_OVERLAPPEDWINDOW,
03821                         graphwin.Origin.x, graphwin.Origin.y,
03822                         graphwin.Size.x, graphwin.Size.y,
03823                         NULL, NULL, graphwin.hInstance, 
03824                         NewXgc);
03825 
03826         if (ScilabXgc->hWndParent == (HWND)NULL)
03827         {
03828                 MessageBox((HWND)NULL,"Couldn't open parent graph window",(LPSTR)NULL, MB_ICONHAND | MB_SYSTEMMODAL);
03829                 return;
03830         }
03831         ShowWindow(ScilabXgc->hWndParent,  SW_SHOWNORMAL);
03832         ScilabXgc->Statusbar =  InitStatusBar (ScilabXgc->hWndParent);
03833         ShowWindow(ScilabXgc->Statusbar,  SW_SHOWNORMAL);
03834         GetWindowRect (ScilabXgc->Statusbar, &rect1) ;
03835         GetClientRect(ScilabXgc->hWndParent, &rect);
03836 
03837         MoveWindow(ScilabXgc->Statusbar, 0, rect.bottom -( rect1.bottom - rect1.top),
03838         rect.right,  ( rect1.bottom - rect1.top), TRUE) ;
03839 
03840         sprintf((char *)winname,"BG%d", (int)WinNum);
03841 
03842         ScilabXgc->CWindowWidth =  rect.right;
03843         ScilabXgc->CWindowHeight = rect.bottom - ( rect1.bottom - rect1.top);
03844 
03845         ScilabXgc->CWindow = CreateWindow(szGraphClass, winname,
03846                 WS_CHILD | WS_VSCROLL | WS_HSCROLL,
03847                 0, graphwin.ButtonHeight,
03848                 ScilabXgc->CWindowWidth,
03849                 ScilabXgc->CWindowHeight,
03850                 ScilabXgc->hWndParent,
03851                 NULL, graphwin.hInstance,
03852                 NewXgc);
03853 
03854         ScilabXgc->CurResizeStatus = 1;
03855         ScilabXgc->CWindowWidthView  = ScilabXgc->CWindowWidth;
03856         ScilabXgc->CWindowHeightView = ScilabXgc->CWindowHeight;
03857 
03858         /* definition des scroll bars verticalles */
03859         vertsi.cbSize = sizeof(SCROLLINFO);
03860         vertsi.fMask  = SIF_RANGE | SIF_PAGE | SIF_POS;
03861         vertsi.nMin   = 0;
03862         vertsi.nMax   = ScilabXgc->CWindowHeight;
03863         vertsi.nPage  = ScilabXgc->CWindowHeightView;
03864         vertsi.nPos   = 0;
03865         sciSetScrollInfo(ScilabXgc,SB_VERT, &(vertsi), TRUE);
03866         sciGetScrollInfo(ScilabXgc,SB_VERT, &vertsi);
03867 
03868         /* definition des scroll bars horizontalle */
03869         horzsi.cbSize = sizeof(SCROLLINFO);
03870         horzsi.fMask  = SIF_RANGE | SIF_PAGE | SIF_POS;
03871         horzsi.nMin   = 0;
03872         horzsi.nMax   = ScilabXgc->CWindowWidth;
03873         horzsi.nPage  = ScilabXgc->CWindowWidthView;
03874         horzsi.nPos   = 0;
03875         sciSetScrollInfo(ScilabXgc,SB_HORZ, &horzsi, TRUE);       
03876         sciGetScrollInfo(ScilabXgc,SB_HORZ, &horzsi);
03877         
03878         if (ScilabXgc->CWindow == (HWND)NULL) 
03879         {
03880                 MessageBox((HWND)NULL,"Couldn't open graphic window",(LPSTR)NULL, MB_ICONHAND | MB_SYSTEMMODAL);
03881                 return;
03882         }
03883 
03884         ShowWindow(ScilabXgc->CWindow, SW_SHOWNORMAL);
03885         ShowWindow(ScilabXgc->hWndParent,  SW_SHOWNORMAL);
03886         graphwin.resized = FALSE;
03887         /*UpdateFileGraphNameMenu( ScilabXgc);
03888         LoadGraphMacros( ScilabXgc);*/
03890         ScilabXgc->CurPixmapStatus = 0;
03891         ScilabXgc->CurResizeStatus = 1;
03892         ScilabXgc->CurWindow = WinNum;
03893         /* on fait un SetWinhdc car on vient de creer la fenetre */
03894         /* le release est fait par Xcall.c */
03895         SetWinhdc();
03896         SetMapMode(hdc, MM_TEXT);
03897         SetBkMode(hdc,TRANSPARENT);
03898         GetClientRect(ScilabXgc->CWindow, &rect);
03899         SetViewportExtEx(hdc, rect.right, rect.bottom,NULL);
03900         SetTextAlign(hdc, TA_LEFT|TA_BOTTOM);
03901         SetFocus( ScilabXgc->CWindow);
03902         if (EntryCounter == 0)
03903         {
03904                 C2F(CreatePatterns)();
03905                 LoadFonts();
03906         } 
03907         InitMissileXgc(PI0,PI0,PI0,PI0);/* a laisser ici */
03908         /* to be sure that current values are recorded */  
03909         /*StoreXgc(WinNum);*/
03910         EntryCounter=Max(EntryCounter,WinNum);
03911         EntryCounter++;
03912                 
03913         /* see ../wsci/wgmenu.c */
03914         CreateGedMenus(ScilabXgc);        
03915         CreateGraphToolBar(ScilabXgc);    
03916 
03917         ScilabXgc->Inside_init=0;
03918 }

Here is the call graph for this function:

static void InitMissileXgc ( integer v1,
integer v2,
integer v3,
integer v4 
) [static]

Definition at line 4027 of file periWin.c.

References C2F, BCG::ClipRegionSet, CoordModeOrigin, Cscale2default(), BCG::CurColorStatus, BCG::CurLineWidth, BCG::CurNumberDispFormat, DefaultForeground, getcolordef(), GREYNUMBER, i, BCG::IDLastPattern, j, BCG::mafigure, NULL, BCG::NumForeground, PI0, ScilabXgc, set_default_colormap(), setabsourel(), setalufunction1(), setbackground(), setdash(), setforeground(), sethidden3d(), setpattern(), setpixmapOn(), setthickness(), unsetclip(), usecolor(), xsetfont(), and xsetmark().

04028 { 
04029   integer i,j;
04030   ScilabXgc->IDLastPattern = GREYNUMBER - 1;
04031   ScilabXgc->CurLineWidth=0 ;
04032   C2F(setalufunction1)((i=3,&i),PI0,PI0,PI0);
04034   i=j= -1;
04035   C2F(unsetclip)(PI0,PI0,PI0,PI0);
04036   ScilabXgc->ClipRegionSet= 0;
04037   C2F(xsetfont)((i=2,&i),(j=1,&j),PI0,PI0);
04038   C2F(xsetmark)((i=0,&i),(j=0,&j),PI0,PI0);
04040   i= CoordModeOrigin ;
04041   C2F(setabsourel)(&i,PI0,PI0,PI0);
04042   /* initialisation des pattern dash par defaut en n&b */
04043   ScilabXgc->CurColorStatus =0;
04044   C2F(setpattern)((i=1,&i),PI0,PI0,PI0);
04045   C2F(setdash)((i=1,&i),PI0,PI0,PI0);
04046   C2F(sethidden3d)((i=1,&i),PI0,PI0,PI0);
04048   C2F(setthickness)((i=0,&i),PI0,PI0,PI0);
04049   /* initialisation de la couleur par defaut */ 
04050   ScilabXgc->CurColorStatus = 1;
04051   set_default_colormap(); //F.Leray This call initializes ScilabXgc->NumForeground = 32 and ScilabXgc->NumBackground = 33
04052   C2F(setalufunction1)((i=3,&i),PI0,PI0,PI0);
04053   C2F(setpattern)((i=DefaultForeground,&i),PI0,PI0,PI0);
04054   C2F(setpattern)((i=ScilabXgc->NumForeground+1,&i),PI0,PI0,PI0);
04055   C2F(setthickness)((i=1,&i),PI0,PI0,PI0);
04056   /*** XXXXX a faire aussi pour le n&b plus haut ***/
04057   C2F(setforeground)((i=ScilabXgc->NumForeground+1,&i),PI0,PI0,PI0);
04058   C2F(setbackground)((i=ScilabXgc->NumForeground+2,&i),PI0,PI0,PI0); // F.Leray Check if OK here may be Pb here... 04.03.04
04059   C2F(sethidden3d)((i=4,&i),PI0,PI0,PI0);
04060   /* Choix du mode par defaut (decide dans initgraphic) */
04061   getcolordef(&i);
04065   ScilabXgc->mafigure = (sciPointObj *)NULL;
04066   ScilabXgc->CurColorStatus = (i == 1) ? 0: 1;
04067   C2F(usecolor)(&i ,PI0,PI0,PI0);
04068   strcpy(ScilabXgc->CurNumberDispFormat,"%-5.2g");
04069 
04071   Cscale2default();
04072 
04073   /* This is a very bad idea to try to put a 
04074    * C2F(setwresize)((i = 1, &i), PI0,PI0,PI0);
04075    * here. It leads to an infinite paint loop 
04076    * since setwresize start a InvalidateRect 
04077    * and InitMissileXgc if started from xset('default') 
04078    * is a recorded graphic 
04079    * xset('default') -> setwresize -> InvalidateRect 
04080    * then paint -> xset('default')
04081    */ 
04082   
04083   C2F(setpixmapOn)((i = 0,&i),PI0,PI0,PI0);
04084 }

Here is the call graph for this function:

static void InitMissileXgc (  )  [static]

Referenced by initgraphic().

Here is the caller graph for this function:

BOOL IsASingleClickToFalse ( void   ) 

BOOL IsWindowInterface ( void   ) 

Definition at line 127 of file WinConsole.c.

Referenced by C2F(), Callback_ABOUT(), Callback_FILESASSOCIATIONBOX(), ChangeCursorWhenScilabIsReady(), clear_eoline(), clear_line(), ClearLinesScreenConsole(), GetCurrentLanguage(), GetStateToolBarWin32(), HideToolBarWin32(), InterfaceWindowsClipboard(), NotTTyRead(), ON_ABOUT_WM_COMMAND(), redraw_line(), sci_clc(), sci_raise_window(), sci_tohome(), SetLanguageMenu(), TerminateGUI(), ToolBarWin32(), UpdateFileGraphNameMenu(), user_putc(), user_puts(), write_scilab(), Write_Scilab_Window(), and xscimore().

00128 {
00129         return WindowMode;
00130 }

Here is the caller graph for this function:

void C2F() loadfamily ( char *  name,
integer j,
integer v3,
integer v4,
integer v5,
integer v6,
integer v7,
double *  dv1,
double *  dv2,
double*  dv3,
double*  dv4 
)

Definition at line 4377 of file periWin.c.

References C2F, fonttab, i, loadfamily_n(), NULL, and FontAlias::Winname.

04381 { 
04382   integer i;
04384   i=0;
04385   while ( fonttab[i].alias != (char *) NULL)
04386     {
04387       if (strcmp(fonttab[i].alias,name)==0)
04388         {
04389           C2F(loadfamily_n)(fonttab[i].Winname,j);
04390           return ;
04391         }
04392       i++;
04393     }
04394   C2F(loadfamily_n)(name,j);
04395 }

Here is the call graph for this function:

static void C2F() loadfamily_n ( char *  name,
integer j 
) [static]

Definition at line 4452 of file periWin.c.

References fname, FONTMAXSIZE, FontTab, i, SciMakeFont(), sciprint(), Scistring(), and size_n_.

04455 { 
04456   integer i,flag=1 ;
04457   for ( i = 0; i < FONTMAXSIZE ; i++)
04458     {
04459       SciMakeFont(name,size_n_[i], &((*FontTab)[*j].hf[i]));
04460       if  (  (*FontTab)[*j].hf[i] == (HFONT) 0 )
04461         { 
04462           flag=0;
04463           sciprint("Unknown font : %s\r\n",name);
04464           Scistring("I'll use font: Courier New\r\n");
04465           SciMakeFont("Courier New",size_n_[i], &((*FontTab)[*j].hf[i]));
04466           if  ( (*FontTab)[*j].hf[i] == (HFONT) 0)
04467             {
04468               sciprint("Unknown font : %s\r\n","Courier New");
04469               Scistring("  Please send a bug report !\r\n");
04470             }
04471         }
04472     }
04473   (*FontTab)[*j].ok = 1;
04474   if (flag != 0) 
04475     strcpy((*FontTab)[*j].fname,name);
04476   else
04477     strcpy((*FontTab)[*j].fname,"Courier New");
04478 }

Here is the call graph for this function:

static void C2F() loadfamily_n (  )  [static]

Referenced by loadfamily().

Here is the caller graph for this function:

static void LoadFonts ( void   ) 

Definition at line 4523 of file periWin.c.

References C2F, loadfamily(), LoadSymbFonts(), PD0, and PI0.

Referenced by initgraphic(), and SciG_Font_Printer().

04524 {
04525   integer fnum;
04526   C2F(loadfamily)("CourR",(fnum=0,&fnum),PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0); 
04527   LoadSymbFonts();
04528   C2F(loadfamily)("TimR",(fnum=2,&fnum),PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0);
04529   /*  
04530       XXX : we load fonts when we need see xsetfonts
04531       C2F(loadfamily)("TimI",(fnum=3,&fnum),PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0);
04532       C2F(loadfamily)("TimB",(fnum=4,&fnum),PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0);
04533       C2F(loadfamily)("TimBI",(fnum=5,&fnum),PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0); 
04534       See xsetfont
04535   */
04536 }

Here is the call graph for this function:

Here is the caller graph for this function:

static void LoadSymbFonts (  ) 

Definition at line 4539 of file periWin.c.

References C2F, FONTMAXSIZE, FontTab, hdc, i, loadfamily(), Marks, NULL, PD0, PI0, SymbOffset, SYMBOLNUMBER, Offset::xoffset, and Offset::yoffset.

Referenced by LoadFonts().

04540 {
04542   integer j,fid;
04543   integer i;
04545   C2F(loadfamily)("Symb",(i=1,&i),PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0);
04546   /* We compute the char offset for several chars of the symbol font    */
04548   fid=1; 
04549   for (i =0 ; i < FONTMAXSIZE ; i++)
04550     {
04551       if ( (*FontTab)[1].hf[i] != NULL)
04552         {
04553           SelectFont(hdc, (*FontTab)[fid].hf[i]);
04554           for (j=0 ; j < SYMBOLNUMBER ; j++)
04555             {
04556               SIZE size;
04557               char str[1];
04558               str[0]=Marks[j];
04559               GetTextExtentPoint32(hdc,str,1,&size);
04560               SymbOffset->xoffset[i][j] = size.cx /2;
04561               SymbOffset->yoffset[i][j] = size.cy /2;
04562             }
04563         }
04564     }
04565 }

Here is the call graph for this function:

Here is the caller graph for this function:

int MaybeSetWinhdc ( void   ) 

Definition at line 324 of file periWin.c.

References BCG::CWindow, GetDriverId(), hdc, sciGetPixmapStatus(), ScilabXgc, and TryToGetDC().

Referenced by drawArcEntity(), drawAxesEntity(), drawFecEntity(), drawFigureEntity(), drawGrayplotEntity(), drawLegendEntity(), DrawMerge3d(), drawPolylineEntity(), drawRectangleEntity(), drawSegsEntity(), drawSubWinEntity(), drawSurfaceEntity(), drawTextEntity(), fill_grid_rectangles(), and fill_grid_rectangles1().

00325 {
00326   int DiD = GetDriverId();      /* F.Leray 26.07.04 */
00327   if(  DiD != 0)
00328     return 0;
00329 
00331   if ( hdc == (HDC) 0)  
00332     {
00333       if ( sciGetPixmapStatus() == 1) 
00334         {
00335           hdc   = ScilabXgc->hdcCompat;
00336 
00337           /* 09.02.04 et 16.02.04 Leray*/
00338           /* IL FAUDRA RETOURNER UNE VALEUR MAIS LAQUELLE ???*/
00339           // return( ?? );
00340           // je mets un return(1) pour le moment pour rester cohérent
00341           // avec SetWinhdc (cf. ci-dessus).
00342           return(1);
00343         }
00344       else
00345         {
00346           hdc=TryToGetDC(ScilabXgc->CWindow);
00347           return(1);
00348         }
00349     }
00350   else 
00351     {
00352       return(0);
00353     }
00354 }

Here is the call graph for this function:

Here is the caller graph for this function:

void C2F() MissileGCget ( char *  str,
integer verbose,
integer x1,
integer x2,
integer x3,
integer x4,
integer x5,
double *  dv1,
double *  dv2,
double *  dv3,
double *  dv4 
)

Definition at line 2703 of file periWin.c.

References C2F, L, and MissileGCGetorSet().

02708 { 
02709   int x6=0;
02710   C2F(MissileGCGetorSet)(str,1L,verbose,x1,x2,x3,x4,x5,&x6,dv1);
02711 }

Here is the call graph for this function:

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

Definition at line 2672 of file periWin.c.

References bgc::getfonc, i, j, MissileGCTab_, name, NUMSETFONC, and sciprint().

Referenced by MissileGCget(), and MissileGCset().

02673 {
02674   integer i ;
02675   for (i=0; i < NUMSETFONC ; i++)
02676   {
02677     integer j;
02678     j = strcmp(str,MissileGCTab_[i].name);
02679     if ( j == 0 ) 
02680     {
02681 #ifdef _DEBUG
02682       if (*verbose == 1)         sciprint("\nGetting Info on %s\r\n",str);
02683 #endif
02684       if (flag == 1)     (MissileGCTab_[i].getfonc)(verbose,x1,x2,dv1);
02685       else  (MissileGCTab_[i].setfonc)(x1,x2,x3,x4,x5,x6,dv1);
02686       return;
02687     }
02688     else 
02689     {
02690       if ( j <= 0)
02691       {
02692         sciprint("\nUnknow X operator <%s>\r\n",str);
02693         *x1=1;*x2=0;
02694         return;
02695       }
02696     }
02697   }
02698   sciprint("\n Unknow X operator <%s>\r\n",str);
02699   *x1=1;
02700   *x2=0;
02701 }

Here is the call graph for this function:

Here is the caller graph for this function:

void C2F() MissileGCset ( char *  str,
integer x1,
integer x2,
integer x3,
integer x4,
integer x5,
integer x6,
double *  dv1,
double *  dv2,
double *  dv3,
double *  dv4 
)

Definition at line 2713 of file periWin.c.

References C2F, L, and MissileGCGetorSet().

02725 {
02726   integer verbose=0 ;
02727   C2F(MissileGCGetorSet)(str,0L,&verbose,x1,x2,x3,x4,x5,x6,dv1);
02728 }

Here is the call graph for this function:

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

Definition at line 2244 of file periWin.c.

References b, BITSPIXEL, BCG::Blue, C2F, BCG::CmapFlag, COLORREF, BCG::Colors, BCG::CurDrawFunction, FALSE, FREE, g, BCG::Green, hdc, i, BCG::IDLastPattern, m, maxcol, NULL, BCG::NumBackground, BCG::Numcolors, BCG::NumForeground, PI0, PLANES, RASTERCAPS, RC_PALETTE, BCG::Red, ScilabXgc, SciPalette(), sciprint(), Scistring(), setalufunction1(), setbackground(), setforeground(), setpattern(), usecolor(), and XgcAllocColors().

02249 {
02250   int i,m,maxcol;
02251   COLORREF  *c = (COLORREF *) NULL;
02252   float *r = (float *) NULL;
02253   float *g = (float *) NULL;
02254   float *b = (float *) NULL;
02255   int iPlanes = GetDeviceCaps(hdc,PLANES);
02256   int iBitsPixel = GetDeviceCaps(hdc,BITSPIXEL);
02257 
02258   *v3 = 0;
02259 
02262   if ( iBitsPixel > 24 ) iBitsPixel = 24;
02263   maxcol = 1 << ( iPlanes*iBitsPixel);
02264 
02265   if (*v2 != 3 || *v1 > maxcol || *v1 < 0) {
02266     sciprint("Colormap must be a m x 3 array with m <= %d\r\n",maxcol);
02267     *v3 = 1;
02268     return;
02269   }
02270   m = *v1;
02271 
02272   /* Save old color vectors */
02273   if(ScilabXgc->Colors != (COLORREF *) NULL) // F.Leray
02274     c = ScilabXgc->Colors;
02275   
02276   if(ScilabXgc->Red != (float *) NULL)
02277     r = ScilabXgc->Red;
02278   
02279   if(ScilabXgc->Green != (float *) NULL)
02280     g = ScilabXgc->Green;
02281 
02282   if(ScilabXgc->Blue != (float *) NULL)
02283     b = ScilabXgc->Blue;
02284  
02285   if (!XgcAllocColors(ScilabXgc,m)) {
02286     ScilabXgc->Colors = c;
02287     ScilabXgc->Red = r;
02288     ScilabXgc->Green = g;
02289     ScilabXgc->Blue = b;
02290     *v3 = 1;
02291     return;
02292   }
02293 
02294   /* Checking RGB values */
02295   for (i = 0; i < m; i++) {
02296     if (a[i] < 0 || a[i] > 1 || a[i+m] < 0 || a[i+m] > 1 ||
02297         a[i+2*m] < 0 || a[i+2*m]> 1) {
02298       Scistring("RGB values must be between 0 and 1\n");
02299       ScilabXgc->Colors = c;
02300       ScilabXgc->Red = r;
02301       ScilabXgc->Green = g;
02302       ScilabXgc->Blue = b;
02303       *v3 = 1;
02304       return;
02305     }
02306     ScilabXgc->Red[i] = (float)a[i];
02307     ScilabXgc->Green[i] = (float)a[i+m];
02308     ScilabXgc->Blue[i] = (float)a[i+2*m];  
02309     ScilabXgc->Colors[i] = RGB((unsigned short) (255.0*a[i]),
02310                                (unsigned short) (255.0*a[i+m]),
02311                                (unsigned short) (255.0*a[i+2*m]));
02312   }
02313   /* Black */
02314   ScilabXgc->Red[m] = ScilabXgc->Green[m] =  ScilabXgc->Blue[m] = (float) 0;
02315   ScilabXgc->Colors[m]= RGB(0,0,0);
02316 
02317   /* White */
02318   ScilabXgc->Red[m+1] =  ScilabXgc->Green[m+1] =  ScilabXgc->Blue[m+1] = (float) 0;
02319   ScilabXgc->Colors[m+1]= RGB(255,255,255);
02320 
02321   if ((GetDeviceCaps(hdc, RASTERCAPS)) & RC_PALETTE )
02322     {
02323       if ( SciPalette(m) == FALSE )
02324         {
02325           for (i = 0; i < m; i++) {
02326             ScilabXgc->Colors[i] = RGB((unsigned short) (255.0*a[i]),
02327                                        (unsigned short) (255.0*a[i+m]),
02328                                        (unsigned short) (255.0*a[i+2*m]));
02329           }
02330           ScilabXgc->Colors[m]= RGB(0,0,0);
02331           ScilabXgc->Colors[m+1]= RGB(255,255,255);
02332         }
02333     }
02334   ScilabXgc->Numcolors = m;
02335   ScilabXgc->IDLastPattern = m - 1;
02336   ScilabXgc->CmapFlag = 0;
02337   ScilabXgc->NumForeground = m;
02338   ScilabXgc->NumBackground = m + 1;
02339   C2F(usecolor)((i=1,&i) ,PI0,PI0,PI0);
02341   C2F(setpattern)((i=ScilabXgc->NumForeground+1,&i),PI0,PI0,PI0);  
02342   C2F(setalufunction1)(&ScilabXgc->CurDrawFunction,PI0,PI0,PI0);
02343   C2F(setpattern)((i=ScilabXgc->NumForeground+1,&i),PI0,PI0,PI0);  
02344   C2F(setforeground)((i=ScilabXgc->NumForeground+1,&i),PI0,PI0,PI0);
02345   C2F(setbackground)((i=ScilabXgc->NumForeground+2,&i),PI0,PI0,PI0);
02346   FREE(c); FREE(r); FREE(g); FREE(b);
02347 }

Here is the call graph for this function:

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

Definition at line 473 of file periWin.c.

References sci_pixmapclear(), and ScilabXgc.

Referenced by clearwindow(), and setpixmapOn().

00474 {
00475   sci_pixmapclear(ScilabXgc->hdcCompat, ScilabXgc);
00476 }

Here is the call graph for this function:

Here is the caller graph for this function:

void C2F() queryfamily ( char *  name,
integer j,
integer v3,
integer v4,
integer v5,
integer v6,
integer v7,
double *  dv1,
double *  dv2,
double *  dv3,
double *  dv4 
)

Definition at line 4397 of file periWin.c.

References fname, FONTNUMBER, fonttab, FontTab, and i.

04409 { 
04410   integer i ;
04411   name[0]='\0';
04412   // for (i=0;i<FONTNUMBER;i++) { //Pb here: fonttab size is 10 and i goes from 0 to 10 included 
04413   // fonttab[10] is "{(char *) NULL,( char *) NULL}" F.Leray 24.02.04
04414   // Pb fixed by setting FONTNUMBER to 10
04415   
04416   for (i=0;i<FONTNUMBER;i++) {
04417     v3[i]=strlen((*FontTab)[i].fname);
04418     if (v3[i] > 0)
04419       strcat(name,(*FontTab)[i].fname);
04420     else {
04421       v3[i]=strlen(fonttab[i].Winname);
04422       strcat(name,fonttab[i].Winname);
04423     }
04424   }
04425   *j=FONTNUMBER;
04426 }

static int ReallocVector ( integer  n  )  [static]

Definition at line 4636 of file periWin.c.

References MESSAGE5, REALLOC, and sciprint().

04638 {
04639   while ( (unsigned) n > nbpoints){
04640     nbpoints = 2 * nbpoints ;
04641 
04642     points = (POINT *) REALLOC(points,(unsigned)
04643                                nbpoints * sizeof (POINT));
04644     if (points == 0) 
04645       { 
04646         sciprint(MESSAGE5);
04647         return (0);
04648       }
04649   }
04650   return(1);
04651 }

Here is the call graph for this function:

static int ReallocVector (  )  [static]

Referenced by store_points().

Here is the caller graph for this function:

void RefreshGraphToolBar ( struct BCG ScilabGC  ) 

Definition at line 72 of file Toolbar.c.

Referenced by clearwindow(), and show().

00073 {
00074   int i=0;
00075 
00076 
00077   if (ScilabGC->lpmw.ShowToolBar)
00078   {
00079     for (i=3;i<ScilabGC->lpmw.nButton;i++)
00080     {
00081       ShowWindow(ScilabGC->lpmw.hButton[i],SW_SHOWNORMAL);
00082     }
00083   }
00084   for (i=0;i<ScilabGC->lpmw.nButton;i++)
00085   {
00086     InvalidateRect(ScilabGC->lpmw.hButton[i],NULL,TRUE);
00087   }
00088 }

Here is the caller graph for this function:

static BOOL RegisterParentWindowGraphClass ( void   )  [static]

Definition at line 3926 of file periWin.c.

References FALSE, graphwin, tagGW::hInstance, IDI_PUFFIN, NULL, szParentGraphClass, TRUE, and WndParentGraphProc().

Referenced by CreateGraphClass().

03927 {
03929   BOOL bOK=FALSE;
03930   static WNDCLASS ParentGraphwndclass;
03931         
03932   ParentGraphwndclass.style = CS_HREDRAW | CS_VREDRAW;
03933   ParentGraphwndclass.lpfnWndProc = WndParentGraphProc;
03934   ParentGraphwndclass.cbClsExtra = 0;
03935   ParentGraphwndclass.cbWndExtra = 4 * sizeof(void *);
03936   ParentGraphwndclass.hInstance = graphwin.hInstance;
03937   ParentGraphwndclass.hIcon =  LoadIcon (graphwin.hInstance,(LPCSTR)TEXT(IDI_PUFFIN));
03938   ParentGraphwndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
03939   ParentGraphwndclass.hbrBackground = NULL;
03940   ParentGraphwndclass.lpszMenuName = NULL;
03941   ParentGraphwndclass.lpszClassName = szParentGraphClass;
03942 
03943   if (!RegisterClass(&ParentGraphwndclass))
03944     {
03945       DWORD dwLastError = GetLastError();
03946       char buff1[1000], buff2[1000];
03947 
03948       FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, dwLastError, 0, buff1, sizeof (buff1), NULL);
03949       sprintf(buff2, "ParentGraphwndclass Win32 error %ld occured", dwLastError);
03950 
03951       MessageBox(NULL, buff1, buff2, MB_ICONERROR);
03952       bOK=FALSE;
03953     }
03954   else bOK=TRUE;
03955 
03956   return bOK;
03957 }

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL RegisterWindowGraphClass ( void   )  [static]

Definition at line 3959 of file periWin.c.

References FALSE, graphwin, tagGW::hInstance, NULL, szGraphClass, TRUE, and WndGraphProc().

Referenced by CreateGraphClass().

03960 {
03961   BOOL bOK=FALSE;
03962   static WNDCLASS Graphwndclass;
03964   Graphwndclass.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC |CS_DBLCLKS ;
03965   Graphwndclass.lpfnWndProc = WndGraphProc;
03966   Graphwndclass.cbClsExtra = 0;
03967   Graphwndclass.cbWndExtra = 4 * sizeof(void *);
03968   Graphwndclass.hInstance = graphwin.hInstance;
03969   Graphwndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
03970   Graphwndclass.hCursor =  LoadCursor(NULL, IDC_CROSS);
03971   Graphwndclass.hbrBackground = NULL;
03972   Graphwndclass.lpszMenuName = NULL;
03973   Graphwndclass.lpszClassName = szGraphClass;
03974 
03975   if (!RegisterClass(&Graphwndclass))
03976     {
03977       DWORD dwLastError = GetLastError();
03978       char buff1[1000], buff2[1000];
03979 
03980       FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, dwLastError, 0, buff1, sizeof (buff1), NULL);
03981       sprintf(buff2, "ParentGraphwndclass Win32 error %ld occured", dwLastError);
03982 
03983       MessageBox(NULL, buff1, buff2, MB_ICONERROR);
03984       bOK=FALSE;
03985     }
03986   else bOK=TRUE;
03987 
03988   return bOK;
03989 }

Here is the call graph for this function:

Here is the caller graph for this function:

void ReleaseWinHdc ( void   ) 

Definition at line 356 of file periWin.c.

References BCG::CWindow, GetDriverId(), hdc, sciGetPixmapStatus(), and ScilabXgc.

Referenced by dr(), drawArcEntity(), drawAxesEntity(), drawFecEntity(), drawFigureEntity(), drawGrayplotEntity(), drawLegendEntity(), DrawMerge3d(), drawPolylineEntity(), drawRectangleEntity(), drawSegsEntity(), drawSubWinEntity(), drawSurfaceEntity(), drawTextEntity(), fill_grid_rectangles(), fill_grid_rectangles1(), I3dRotation(), SetGHdc(), SwitchWindow(), and zoom_get_rectangle().

00357 {
00358   int DiD = GetDriverId();      /* F.Leray 26.07.04 */
00359   if(  DiD != 0)
00360     { /* Nothing to do */
00361     }
00362   else
00363     {
00364       if ( ScilabXgc != (struct BCG *) 0 && ScilabXgc->CWindow != (HWND) 0)
00365         {
00366           if ( sciGetPixmapStatus() != 1) 
00367             ReleaseDC(ScilabXgc->CWindow,hdc);
00368           hdc = (HDC) 0;
00369         }
00370     }
00371 }

Here is the call graph for this function:

Here is the caller graph for this function:

void ResetScilabXgc ( void   ) 

Utilise le ScilabXgc courant pour reinitialiser le gc XWindow cela est utilis'e quand on change de fenetre graphique

wininfo("Reset Scilab Xgc avec %d %d\r\n",i,j);

Definition at line 4103 of file periWin.c.

References C2F, BCG::ClipRegionSet, BCG::CurClipRegion, BCG::CurColor, BCG::CurColorStatus, BCG::CurDashStyle, BCG::CurDrawFunction, BCG::CurHardSymb, BCG::CurHardSymbSize, BCG::CurLineWidth, BCG::CurPattern, BCG::CurVectorStyle, DefaultForeground, BCG::FontId, BCG::FontSize, i, j, BCG::NumBackground, BCG::NumForeground, BCG::NumHidden3d, PI0, ScilabXgc, setabsourel(), setalufunction1(), setbackground(), setclip(), setdash(), setforeground(), sethidden3d(), setpattern(), setthickness(), unsetclip(), xsetfont(), and xsetmark().

Referenced by DeleteSGWin(), scig_replay_hdc(), setpixmapOn(), and SwitchWindow().

04104 { 
04105   integer i,j, clip[4];
04106   i= ScilabXgc->FontId;
04107   j= ScilabXgc->FontSize;
04108   C2F(xsetfont)(&i,&j,PI0,PI0);
04110   i= ScilabXgc->CurHardSymb;
04111   j= ScilabXgc->CurHardSymbSize;
04112   C2F(xsetmark)(&i,&j,PI0,PI0);
04113   
04114   i= ScilabXgc->CurLineWidth;
04115   C2F(setthickness)(&i,PI0,PI0,PI0);
04116   
04117   i= ScilabXgc->CurVectorStyle;
04118   C2F(setabsourel)(&i,PI0,PI0,PI0);
04119   
04120   i= ScilabXgc->CurDrawFunction;
04121   C2F(setalufunction1)(&i,PI0,PI0,PI0);
04122   
04123   if (ScilabXgc->ClipRegionSet == 1) 
04124     {
04125       for ( i= 0 ; i < 4; i++) clip[i]=ScilabXgc->CurClipRegion[i];
04126       C2F(setclip)(clip,clip+1,clip+2,clip+3);
04127     }
04128   else
04129     C2F(unsetclip)(PI0,PI0,PI0,PI0);
04130 
04131   if (ScilabXgc->CurColorStatus == 0) 
04132     {
04133       /* remise des couleurs a vide */
04134       ScilabXgc->CurColorStatus = 1;
04135       C2F(setpattern)((i=DefaultForeground,&i),PI0,PI0,PI0);
04136       /* passage en n&b */
04137       ScilabXgc->CurColorStatus = 0;
04138       i= ScilabXgc->CurPattern + 1;
04139       C2F(setpattern)(&i,PI0,PI0,PI0);
04140       i= ScilabXgc->CurDashStyle + 1;
04141       C2F(setdash)(&i,PI0,PI0,PI0);
04142       i= ScilabXgc->NumHidden3d+1;
04143       C2F(sethidden3d)(&i,PI0,PI0,PI0);
04144     }
04145   else 
04146     {
04147       /* remise a zero des patterns et dash */
04148       /* remise des couleurs a vide */
04149       ScilabXgc->CurColorStatus = 0;
04150       C2F(setpattern)((i=1,&i),PI0,PI0,PI0);
04151       C2F(setdash)((i=1,&i),PI0,PI0,PI0);
04152       /* passage en couleur  */
04153       ScilabXgc->CurColorStatus = 1;
04154       i= ScilabXgc->CurColor + 1;
04155       C2F(setpattern)(&i,PI0,PI0,PI0);
04156       i= ScilabXgc->NumBackground+1;
04157       C2F(setbackground)(&i,PI0,PI0,PI0);
04158       i= ScilabXgc->NumForeground+1;
04159       C2F(setforeground)(&i,PI0,PI0,PI0);
04160       i= ScilabXgc->NumHidden3d+1;
04161       C2F(sethidden3d)(&i,PI0,PI0,PI0);
04162     }
04163 }

Here is the call graph for this function:

Here is the caller graph for this function:

static POINT* C2F() ReturnPoints (  )  [static]

XXX a mettre ailleurs

Referenced by drawpolyline(), drawpolymark(), and fillpolyline().

Here is the caller graph for this function:

void sci_pixmap_resize ( struct BCG ScilabGC,
int  x,
int  y 
)

Resize the pixmap associated to CurWindow and store it back in the window List

Definition at line 498 of file periWin.c.

Referenced by CPixmapResize(), CPixmapResize1(), and GViewportResize().

00499 {
00500   HDC hdc1;
00501   HBITMAP hbmTemp;
00502   hdc1=TryToGetDC(ScilabGC->CWindow);
00503   hbmTemp = CreateCompatibleBitmap (hdc1,x,y);
00504   ReleaseDC(ScilabGC->CWindow,hdc1);
00505   if (!hbmTemp)
00506     {
00507       sciprint("Can't resize pixmap\r\n");
00508       return;
00509     }
00510   else
00511     {
00512       HBITMAP  hbmSave;
00513       hbmSave = SelectObject ( ScilabGC->hdcCompat, hbmTemp);
00514       if ( ScilabGC->hbmCompat != NULL)
00515         DeleteObject (ScilabGC->hbmCompat);
00516       ScilabGC->hbmCompat = hbmTemp;
00517       sci_pixmapclear(ScilabGC->hdcCompat, ScilabGC);
00518       /* XXX C2F(show)(PI0,PI0,PI0,PI0); */ 
00519     }
00520 }

Here is the caller graph for this function:

void sci_pixmapclear ( HDC  hdc_c,
struct BCG ScilabGC 
)

Definition at line 467 of file periWin.c.

References BCG::CWindowHeight, BCG::CWindowWidth, and sci_pixmapclear_rect().

Referenced by pixmapclear(), sci_pixmap_resize(), ScilabGResize(), and ScilabPaintWithBitmap().

00468 {
00469   sci_pixmapclear_rect(hdc_c,ScilabGC, 
00470                        ScilabGC->CWindowHeight,ScilabGC->CWindowWidth);
00471 }

Here is the call graph for this function:

Here is the caller graph for this function:

void sci_pixmapclear_rect ( HDC  hdc_c,
struct BCG ScilabGC,
int  ww,
int  hh 
)

Pixmap routines

Definition at line 449 of file periWin.c.

References COLORREF, BCG::Colors, DefaultBackground, NULL, and BCG::NumBackground.

Referenced by sci_pixmapclear().

00450 {
00451   RECT rect;
00452   COLORREF px;
00453   HBRUSH hBrush;
00454   if ( hdc_c  == NULL) return ;
00455   px = (ScilabGC->Colors == NULL)? DefaultBackground 
00456     :  ScilabGC->Colors[ScilabGC->NumBackground];
00457   SetBkColor( hdc_c , px );
00458   rect.top    = 0;
00459   rect.bottom = ww ;
00460   rect.left   = 0;
00461   rect.right  = hh ;
00462   hBrush = CreateSolidBrush(px);
00463   FillRect( hdc_c , &rect,hBrush );
00464   DeleteObject(hBrush);
00465 }

Here is the caller graph for this function:

void SciClick ( integer ibutton,
integer x1,
integer yy1,
integer iflag,
int  getmouse,
int  getrelease,
int  dyn_men,
char *  str,
integer lstr 
)

Definition at line 786 of file periWin.c.

References C2F, CheckClickQueue(), ClearClickQueue(), CtrlCHit(), BCG::CurWindow, BCG::CWindow, getmen(), ismenu(), ok, ScilabXgc, set_event_select(), set_wait_click(), SW_SHOWNORMAL, sxevents(), and textwin.

Referenced by xclick(), and xgetmouse().

00787 {
00788   integer ok,choice,motion,release;
00789   int win;
00790 
00791   choice=(dyn_men>1); /* depending on lhs */
00792   if ( ScilabXgc == (struct BCG *) 0 || ScilabXgc->CWindow == (HWND) 0)
00793   {
00794     *x1   =  -1;
00795     *yy1  =  -1;
00796     *ibutton = -100;
00797     return;
00798   }
00799 
00800   win = ScilabXgc->CurWindow;
00801 
00802   if ( *iflag ==0 )  ClearClickQueue(ScilabXgc->CurWindow);
00803 
00805   if (IsIconic(ScilabXgc->hWndParent)) ShowWindow(ScilabXgc->hWndParent, SW_SHOWNORMAL);
00806   BringWindowToTop(ScilabXgc->hWndParent);
00807 
00808   set_wait_click(1);
00809   set_event_select(1+2*getmouse+4*getrelease);
00810 
00811   while ( 1 ) 
00812   {
00814     if (choice) win=-1;
00815     ok=0;
00816     if (CheckClickQueue(&win,x1,yy1,ibutton,&motion,&release) == 1)  {
00817       if ((release&&getrelease) || (motion&&getmouse) || ((motion==0)&&(release==0))){
00818         *iflag=win;
00819         ok=1;
00820         break;
00821       }
00822       if (choice) win=-1;
00823     }
00824     if(ok) break;
00825 
00826     /* make the X and tk event loop */
00827     C2F(sxevents)();
00828     Sleep(1);
00829 
00830     if ( ScilabXgc == (struct BCG *) 0 || ScilabXgc->CWindow == (HWND) 0)
00831     {
00832       /* graphic window was deleted */
00833       *x1= 0 ;
00834       *yy1= 0;
00835       *ibutton=-100; 
00836       set_event_select(1+4);
00837       set_wait_click(0);
00838       return;
00839     }
00840 
00841     if ( dyn_men == 1 &&  C2F(ismenu)()==1 ) 
00842     {
00843       int entry;
00844       C2F(getmen)(str,lstr,&entry);
00845       *ibutton = -2;
00846       *x1=0;
00847       *yy1=0;
00848       set_event_select(1+4);
00849       set_wait_click(0);
00850       return ;
00851     }
00852 
00853     if ( CtrlCHit(&textwin) == 1) 
00854     {
00855       *x1= 0 ;
00856       *yy1= 0;
00857       *ibutton=0;
00858       break ;
00859     }
00860   }
00861   set_event_select(1+4);
00862   set_wait_click(0);
00863 }

Here is the call graph for this function:

Here is the caller graph for this function:

void SciG_Font ( void   ) 

Definition at line 4512 of file periWin.c.

References FontInfoTab, FontTab, ListOffset, scale_font_size, and SymbOffset.

Referenced by scig_replay_hdc().

04513 {
04514   FontTab = &FontInfoTab;
04515   SymbOffset = &ListOffset;
04516   scale_font_size = 1; 
04517 }

Here is the caller graph for this function:

void SciG_Font_Printer ( int  scale  ) 

Definition at line 4501 of file periWin.c.

References CleanFonts(), FontInfoTabPrinter, FontTab, ListOffsetPrint, LoadFonts(), scale_font_size, and SymbOffset.

Referenced by scig_replay_hdc().

04502 {
04503   static int last_scale= -1;
04504   FontTab = &FontInfoTabPrinter;
04505   SymbOffset = &ListOffsetPrint;
04506   if ( last_scale != -1 && last_scale != scale ) 
04507     CleanFonts();
04508   scale_font_size = last_scale = scale;
04509   LoadFonts();
04510 }

Here is the call graph for this function:

Here is the caller graph for this function:

integer sciGetPixmapStatus (  ) 

Returns the pixmap status. 0: it's drawn directly on screen 1: it's drawn by a pixmap first

Author:
Matthieu PHILIPPE
Date:
Dec 1999

Definition at line 1978 of file periWin.c.

References BCG::CurPixmapStatus, and ScilabXgc.

Referenced by clearwindow(), CPixmapResize1(), getpixmapOn(), MaybeSetWinhdc(), ReleaseWinHdc(), scig_replay_hdc(), setpixmapOn(), and SetWinhdc().

01979 {
01980   return ScilabXgc->CurPixmapStatus;
01981 }

Here is the caller graph for this function:

int sciGetScrollInfo ( struct BCG Scilabgc,
int  sb_ctl,
SCROLLINFO *  si 
)

Returns the dimension of the scroll bars

Attention:
Do not call GetScrollInfo windows function, sciGetScrollInfo do that and more things !
Parameters:
[in] Scilabgc 
[in] sb_ctl 
[in] si 
Author:
Matthieu PHILIPPE
Date:
Dec 1999

Definition at line 214 of file periWin.c.

References BCG::CWindow, SB_HORZ, and SB_VERT.

00215 {
00216   SCROLLINFO totosi;
00217   switch (sb_ctl) 
00218     {
00219     case SB_VERT:
00220       /* definition des scroll bars verticalles */
00221       si->cbSize = Scilabgc->vertsi.cbSize;
00222       si->fMask  = Scilabgc->vertsi.fMask;
00223       si->nMin   = Scilabgc->vertsi.nMin;
00224       si->nMax   = Scilabgc->vertsi.nMax;
00225       si->nPage  = Scilabgc->vertsi.nPage;
00226       si->nPos   = Scilabgc->vertsi.nPos;
00227       break;
00228     case SB_HORZ:
00229       /* definition des scroll bars horizontalles */
00230       si->cbSize = Scilabgc->horzsi.cbSize;
00231       si->fMask  = Scilabgc->horzsi.fMask;
00232       si->nMin   = Scilabgc->horzsi.nMin;
00233       si->nMax   = Scilabgc->horzsi.nMax;
00234       si->nPage  = Scilabgc->horzsi.nPage;
00235       si->nPos   = Scilabgc->horzsi.nPos;
00236       break;
00237     default:
00238       break;
00239     }
00240   /* force le rafraichissement de l'affichage des SB !!! */
00241   GetScrollInfo(Scilabgc->CWindow, sb_ctl, &totosi);
00242   return 0;
00243 }

integer sciGetwresize ( void   ) 

int sciInitScrollBar ( struct BCG Scilabgc  ) 

Definition at line 289 of file periWin.c.

References BCG::CWindowHeight, BCG::CWindowHeightView, BCG::CWindowWidth, BCG::CWindowWidthView, SB_HORZ, SB_VERT, ScilabXgc, sciSetScrollInfo(), si, and TRUE.

00290 {
00291   SCROLLINFO si;
00292 
00293   /* definition des scroll bars verticalles a la creationS*/
00294   si.cbSize = sizeof(SCROLLINFO);
00295   si.fMask  = SIF_RANGE | SIF_PAGE | SIF_POS;
00296   si.nMin   = 0;
00297   si.nMax   = Scilabgc->CWindowHeight;
00298   si.nPage  = Scilabgc->CWindowHeightView;
00299   si.nPos   = 0;
00300   sciSetScrollInfo(ScilabXgc,SB_VERT, &si, TRUE);
00301 
00302   /* definition des scroll bars horizontalles */
00303   si.cbSize = sizeof(SCROLLINFO);
00304   si.fMask  = SIF_RANGE | SIF_PAGE | SIF_POS;
00305   si.nMin   = 0;
00306   si.nMax   = Scilabgc->CWindowWidth;
00307   si.nPage  = Scilabgc->CWindowWidthView;
00308   si.nPos   = 0;
00309   sciSetScrollInfo(ScilabXgc,SB_HORZ, &si, TRUE);
00310   return 0;
00311 }

Here is the call graph for this function:

void SciMakeFont ( char *  name,
int  size,
HFONT hfont 
)

creates a font

lf.lfHeight = - MulDiv( size, GetDeviceCaps(hdc, LOGPIXELSY), 72);

Definition at line 4429 of file periWin.c.

References DEFAULT_CHARSET, int, memset(), NULL, scale_font_size, and TRUE.

Referenced by loadfamily_n().

04433 {
04434   LOGFONT lf;
04435   char *p;
04436   memset(&lf, 0, sizeof(LOGFONT));
04437   strncpy(lf.lfFaceName,name,LF_FACESIZE);
04439   lf.lfHeight  = - size*scale_font_size;
04440   lf.lfCharSet = DEFAULT_CHARSET;
04441   if ( (p = strstr(name," Italic")) != (LPSTR)NULL ) {
04442     lf.lfFaceName[ (unsigned int)(p- name) ] = '\0';
04443     lf.lfItalic = TRUE;
04444   }
04445   if ( (p = strstr(name," Bold")) != (LPSTR)NULL ) {
04446     lf.lfFaceName[ (unsigned int)(p- name) ] = '\0';
04447     lf.lfWeight = FW_BOLD;
04448   }
04449   *hfont = CreateFontIndirect((LOGFONT FAR *)&lf);
04450 }

Here is the call graph for this function:

Here is the caller graph for this function:

void SciMouseCapture ( void   ) 

Definition at line 898 of file periWin.c.

References BCG::CWindow, and ScilabXgc.

Referenced by I3dRotation(), and zoom_get_rectangle().

00899 {
00900   SetCapture(ScilabXgc->CWindow);
00901 }

Here is the caller graph for this function:

void SciMouseRelease ( void   ) 

Definition at line 903 of file periWin.c.

Referenced by I3dRotation(), and zoom_get_rectangle().

00904 {
00905   ReleaseCapture();
00906 }

Here is the caller graph for this function:

static BOOL SciPalette ( int  iNumClr  )  [static]

Definition at line 2349 of file periWin.c.

References BCG::Blue, BCG::Colors, FALSE, BCG::Green, hdc, i, INT, NULL, BCG::Red, ScilabXgc, sciprint(), TRUE, and UINT.

Referenced by pal_setcolormap().

02350 {
02351   static HPALETTE hPal=NULL;
02352   LOGPALETTE    *plogPal;
02353   UINT          uiSizPal;
02354   INT           i;
02355   uiSizPal = sizeof(WORD)*2 + sizeof(PALETTEENTRY)*iNumClr;
02356   if ((plogPal = (LOGPALETTE *) LocalAlloc(LMEM_FIXED,uiSizPal)) == NULL) {
02357     sciprint("Fail in Allocating palette!\r\n");
02358     hPal = NULL;
02359     return FALSE;
02360   }
02361   plogPal->palVersion = 0x300;
02362   plogPal->palNumEntries = (WORD) iNumClr;
02363 
02364   for (i=0; i<iNumClr; i++) 
02365     {
02366       plogPal->palPalEntry[i].peRed   =(unsigned char) (255.0* ScilabXgc->Red[i]);
02367       plogPal->palPalEntry[i].peGreen =(unsigned char) (255.0* ScilabXgc->Green[i]);
02368       plogPal->palPalEntry[i].peBlue  =(unsigned char) (255.0* ScilabXgc->Blue[i]);
02369       plogPal->palPalEntry[i].peFlags = PC_RESERVED;
02370       ScilabXgc->Colors[i]=PALETTERGB(plogPal->palPalEntry[i].peRed,
02371                                       plogPal->palPalEntry[i].peGreen,
02372                                       plogPal->palPalEntry[i].peBlue);
02373     }
02374 
02375   if ( hPal != (HPALETTE) NULL) DeleteObject(hPal);
02376   hPal = CreatePalette((LPLOGPALETTE)plogPal);
02377   if ((hPal) == NULL) {
02378     sciprint("Fail in creating palette!\r\n");
02379     return FALSE;
02380   }
02381   SelectPalette(hdc, hPal, FALSE);
02382   RealizePalette(hdc);
02384   GlobalFree(plogPal);
02385   return TRUE;
02386 }

Here is the call graph for this function:

Here is the caller graph for this function:

int sciSetScrollInfo ( struct BCG Scilabgc,
int  sb_ctl,
SCROLLINFO *  si,
BOOLEAN  bRedraw 
)

Sets the dimension of the scroll bars

Attention:
Do not call SetScrollInfo windows function, sciSetScrollInfo do that and more things !
Parameters:
[in] Scilabgc 
[in] sb_ctl 
[in] si 
[in] bRedraw 
Author:
Matthieu PHILIPPE
Date:
Dec 1999

Definition at line 245 of file periWin.c.

References BCG::CurResizeStatus, BCG::CWindow, SB_HORZ, SB_VERT, and sciGetScrollInfo().

00246 {
00247   int inttmp = si->nMax;
00248   SCROLLINFO totosi;
00249   
00250   switch (sb_ctl) {
00251   case SB_VERT:
00252     /* definition des scroll bars verticalles */
00253     Scilabgc->vertsi.cbSize = si->cbSize;
00254     Scilabgc->vertsi.fMask  = si->fMask;
00255     Scilabgc->vertsi.nMin   = si->nMin;
00256     Scilabgc->vertsi.nMax   = si->nMax;
00257     Scilabgc->vertsi.nPage  = si->nPage;
00258     if ( Scilabgc->CurResizeStatus == 1) 
00259       {
00260         si->nMax = 0; /* on effectue un swapp pour ne pas changer la val (pointeur !!) */
00261         /* 0 permet de faire disparaitre les scrollbars */
00262       }
00263     Scilabgc->vertsi.nPos   = si->nPos; 
00264     break;
00265   case SB_HORZ:
00266     /* definition des scroll bars horizontalles */
00267     Scilabgc->horzsi.cbSize = si->cbSize;
00268     Scilabgc->horzsi.fMask  = si->fMask;
00269     Scilabgc->horzsi.nMin   = si->nMin;
00270     Scilabgc->horzsi.nMax   = si->nMax;
00271     Scilabgc->horzsi.nPage  = si->nPage;
00272     if ( Scilabgc->CurResizeStatus == 1 ) {  si->nMax = 0;} 
00273     Scilabgc->horzsi.nPos   = si->nPos;
00274     break;
00275   default:
00276     break;
00277   }
00278   /* reset clip region after a scroll */
00279   /* set_clip_after_scroll() ; */
00280   /* ? */  
00281   SetScrollInfo(Scilabgc->CWindow, sb_ctl, si, bRedraw);
00282   if (  Scilabgc->CurResizeStatus == 1)
00283     si->nMax = inttmp;
00284   /* force le rafraichissement de l'affichage des SB !!! */
00285   sciGetScrollInfo(Scilabgc, sb_ctl, &totosi);
00286   return 0;
00287 }

Here is the call graph for this function:

int C2F() sedeco ( int flag  ) 

Definition at line 2024 of file periWin.c.

02025 {
02026   set_default_colormap_flag = *flag;
02027   return(0);
02028 }

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

Definition at line 2578 of file periWin.c.

References Scistring().

02583 {
02584   if ( *verbose ==1 ) Scistring("\n No operation ");
02585 }

Here is the call graph for this function:

void set_c ( integer  coli  ) 

Definition at line 1448 of file periWin.c.

References COLORREF, BCG::Colors, BCG::CurColor, BCG::CurDashStyle, BCG::CurDrawFunction, BCG::CurLineWidth, DashTab, GXxor, hdc, i, id, Max, Min, NULL, BCG::NumBackground, BCG::Numcolors, PS_SOLID, ScilabXgc, style, and width.

Referenced by AllocBotShadowPixel(), AllocTopShadowPixel(), set_dash_or_color(), setalufunction(), setalufunction1(), setpattern(), xset_alufunction2(), xset_dash_or_color(), and xset_pattern().

01449 {
01450   int i=0,id=0, width=0;
01451   COLORREF col=RGB(0,0,0);
01452   HBRUSH hBrush=NULL;
01453   HBRUSH hBrushOld=NULL;
01454   HPEN hpen=NULL;
01455   HPEN hpenOld=NULL;
01456   int style=0;
01457 
01458   if (ScilabXgc->Colors == NULL)  return;
01459 
01460   i= Max(0,Min(coli,ScilabXgc->Numcolors + 1));
01461   ScilabXgc->CurColor = i ;
01462 
01463   if ( ScilabXgc->CurDrawFunction !=  GXxor ) col = ScilabXgc->Colors[i];
01464   else col = ScilabXgc->Colors[i] ^ ScilabXgc->Colors[ScilabXgc->NumBackground];
01465 
01466   hBrush=CreateSolidBrush(col);
01467   hBrushOld=SelectObject(hdc,hBrush);
01468   if ( hBrushOld ) DeleteObject(hBrushOld);
01469   ScilabXgc->hBrush = hBrush;
01470 
01471   id =  ScilabXgc->CurDashStyle;
01472   style=DashTab[id];
01473 
01474   width = ScilabXgc->CurLineWidth;
01475 
01476   if ( (style == PS_SOLID) || (width<=1) )
01477   {
01478     hpen = CreatePen(style,ScilabXgc->CurLineWidth,col);
01479   }
01480   else
01481   {
01482     LOGBRUSH logbrush;
01483     logbrush.lbStyle = BS_SOLID;
01484     logbrush.lbColor = col;
01485     logbrush.lbHatch = 0;
01486     hpen = ExtCreatePen(PS_GEOMETRIC|PS_ENDCAP_FLAT|style,width,&logbrush,0,NULL);
01487   }
01488 
01489   hpenOld=SelectObject(hdc,hpen);
01490   if (hpenOld) DeleteObject(hpenOld);
01491   ScilabXgc->hPen = hpen;
01492 
01493   SetTextColor(hdc,col); 
01494 }

Here is the caller graph for this function:

static void set_clip_after_scroll ( void   )  [static]

Definition at line 1310 of file periWin.c.

References BCG::ClipRegionSet, BCG::CurClipRegion, BCG::CWindow, hdc, SB_HORZ, SB_VERT, sciGetwresize(), and ScilabXgc.

01311 {  
01312   HRGN hRgn;
01313   if (ScilabXgc->ClipRegionSet == 1 && sciGetwresize() == 0) 
01314     {
01315       hRgn = CreateRectRgn(ScilabXgc->CurClipRegion[0] -  GetScrollPos(ScilabXgc->CWindow,SB_HORZ),
01316                            ScilabXgc->CurClipRegion[1] - GetScrollPos(ScilabXgc->CWindow,SB_VERT),
01317                            ScilabXgc->CurClipRegion[2] 
01318                            + ScilabXgc->CurClipRegion[0],
01319                            ScilabXgc->CurClipRegion[3]  
01320                            +  ScilabXgc->CurClipRegion[1]);    
01321       SelectClipRgn(hdc, hRgn);
01322       DeleteObject(hRgn);
01323     }
01324 }

Here is the call graph for this function:

void set_clip_box ( integer  xxleft,
integer  xxright,
integer  yybot,
integer  yytop 
)

Definition at line 4711 of file periWin.c.

04715 {
04716   xleft=xxleft;
04717   xright=xxright;
04718   ybot=yybot;
04719   ytop=yytop;
04720 }

static void set_current_clip ( void   )  [static]

Definition at line 1286 of file periWin.c.

References BCG::ClipRegionSet, BCG::CurClipRegion, BCG::CWindow, hdc, SB_HORZ, SB_VERT, sciGetwresize(), and ScilabXgc.

Referenced by clearwindow(), and setclip().

01287 {
01288   HRGN hRgn;
01289   if (ScilabXgc->ClipRegionSet == 0) return;
01290   if (sciGetwresize() == 1) {
01291     hRgn = CreateRectRgn(ScilabXgc->CurClipRegion[0],
01292                          ScilabXgc->CurClipRegion[1],
01293                          ScilabXgc->CurClipRegion[2] 
01294                          + ScilabXgc->CurClipRegion[0],
01295                          ScilabXgc->CurClipRegion[3]  
01296                          +  ScilabXgc->CurClipRegion[1]);    
01297   }
01298   else {
01299     hRgn = CreateRectRgn(ScilabXgc->CurClipRegion[0] - GetScrollPos(ScilabXgc->CWindow,SB_HORZ),
01300                          ScilabXgc->CurClipRegion[1] - GetScrollPos(ScilabXgc->CWindow,SB_VERT),
01301                          ScilabXgc->CurClipRegion[2] 
01302                          + ScilabXgc->CurClipRegion[0],
01303                          ScilabXgc->CurClipRegion[3]  
01304                          +  ScilabXgc->CurClipRegion[1]);    
01305   }
01306   SelectClipRgn(hdc, hRgn);
01307   DeleteObject(hRgn);
01308 }

Here is the call graph for this function:

Here is the caller graph for this function:

static void C2F() set_dash_and_color ( integer value,
integer v2,
integer v3,
integer v4 
) [static]

Definition at line 1768 of file periWin.c.

References C2F, setdash(), and setpattern().

Referenced by drawarcs(), drawarrows(), drawpolylines(), drawrectangles(), drawsegments(), and fillpolylines().

01773 {
01774   C2F(setdash)(value, v2, v3, v4);
01775   C2F(setpattern)(value+6, v2, v3, v4);
01776 }

Here is the call graph for this function:

Here is the caller graph for this function:

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

else Dashed Line

Definition at line 1758 of file periWin.c.

References C2F, BCG::CurColorStatus, ScilabXgc, set_c(), and setdash().

01763 {
01764   if ( ScilabXgc->CurColorStatus == 1) set_c(*value-1);
01765   else C2F(setdash)(value, v2, v3, v4);
01766 }

Here is the call graph for this function:

void set_default_colormap ( void   ) 

Definition at line 2034 of file periWin.c.

References b, BITSPIXEL, BCG::Blue, BCG::CmapFlag, COLORREF, BCG::Colors, default_colors, DEFAULTNUMCOLORS, FREE, g, BCG::Green, hdc, i, BCG::IDLastPattern, m, maxcol, NULL, BCG::NumBackground, BCG::Numcolors, BCG::NumForeground, PLANES, BCG::Red, ScilabXgc, sciprint(), and XgcAllocColors().

Referenced by InitMissileXgc().

02035 {
02036   int i,m;
02037   unsigned long maxcol;
02038   COLORREF *c = (COLORREF *) NULL;
02039   float *r = (float *) NULL;
02040   float *g = (float *) NULL;
02041   float *b = (float *) NULL;
02043   int iPlanes = GetDeviceCaps(hdc,PLANES);
02044   int iBitsPixel = GetDeviceCaps(hdc,BITSPIXEL);
02045   /* int numcolors = GetDeviceCaps(hdc,NUMCOLORS_SCI);*/
02048   if ( iBitsPixel > 24 ) iBitsPixel = 24;
02049   maxcol = 1 << ( iPlanes*iBitsPixel);
02050 
02051   /* we don't want to set the default colormap at window creation 
02052      if the scilab command was xset("colormap"); */
02053 
02054   if (set_default_colormap_flag == 0) return;
02055   if ( DEFAULTNUMCOLORS > maxcol) {
02056     sciprint("No enough colors for default colormap. Maximum is %d\r\n",
02057              maxcol);
02058     return;
02059   }
02060   m = DEFAULTNUMCOLORS;
02061 
02062   /* Save old color vectors */
02063   if(ScilabXgc->Colors != (COLORREF *) NULL) // F.Leray
02064     c = ScilabXgc->Colors;
02065   
02066   if(ScilabXgc->Red != (float *) NULL)
02067     r = ScilabXgc->Red;
02068   
02069   if(ScilabXgc->Green != (float *) NULL)
02070     g = ScilabXgc->Green;
02071 
02072   if(ScilabXgc->Blue != (float *) NULL)
02073     b = ScilabXgc->Blue;
02074   
02075   if (!XgcAllocColors(ScilabXgc,m)) {
02076     ScilabXgc->Colors = c;
02077     ScilabXgc->Red = r;
02078     ScilabXgc->Green = g;
02079     ScilabXgc->Blue = b;
02080     return;
02081   }
02082 
02083   /* Getting RGB values */
02084   for (i = 0; i < m; i++) {
02085     ScilabXgc->Red[i] = ((float)default_colors[3*i])/(float)255.0;
02086     ScilabXgc->Green[i] = (float)default_colors[3*i+1]/(float)255.0;
02087     ScilabXgc->Blue[i] = (float)default_colors[3*i+2]/(float)255.0;  
02088     ScilabXgc->Colors[i] = RGB(default_colors[3*i],
02089                                default_colors[3*i+1],
02090                                default_colors[3*i+2]);
02091   }
02092   /* Black */
02093   ScilabXgc->Red[m] = ScilabXgc->Green[m] =   ScilabXgc->Blue[m] =(float) 0;
02094   ScilabXgc->Colors[m]= RGB(0,0,0);
02095 
02096   /* White */
02097   ScilabXgc->Red[m+1] =   ScilabXgc->Green[m+1] =   ScilabXgc->Blue[m+1] = (float)1;
02098   ScilabXgc->Colors[m+1]= RGB(255,255,255);
02099 
02100   ScilabXgc->Numcolors = m;
02101   ScilabXgc->IDLastPattern = m - 1;
02102   ScilabXgc->CmapFlag = 1;
02103   /* Black and white pixels */
02104 
02105   ScilabXgc->NumForeground = m;
02106   ScilabXgc->NumBackground = m + 1;
02107   FREE(c); FREE(r); FREE(g); FREE(b);
02108 }

Here is the call graph for this function:

Here is the caller graph for this function:

void set_event_select ( int  val  ) 

Definition at line 247 of file Events.c.

00248 {  
00249     event_select=val;
00250 }

static void C2F() set_line_style ( integer value,
integer v2,
integer v3,
integer v4 
) [static]

Definition at line 1778 of file periWin.c.

References C2F, BCG::CurColorStatus, BCG::CurDashStyle, j, PI0, ScilabXgc, setdash(), and setpattern().

Referenced by drawarcs(), drawarrows(), drawpolylines(), drawrectangles(), drawsegments(), and fillpolylines().

01783 {
01784   integer j;
01785   if (ScilabXgc->CurColorStatus == 0) 
01786     C2F(setdash)(value,PI0,PI0,PI0);
01787   else {
01788     j= ScilabXgc->CurDashStyle + 1;
01789     C2F(setdash)(&j,PI0,PI0,PI0);
01790     C2F(setpattern)(value,PI0,PI0,PI0);
01791   }
01792 }

Here is the call graph for this function:

Here is the caller graph for this function:

void set_wait_click ( int  val  ) 

Definition at line 233 of file Events.c.

00234 {  
00235   if (val==1) {
00236     wait_for_click=val;
00237   }else
00238     wait_for_click=val;
00239 }

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

to set absolute or relative mode

Definition at line 1373 of file periWin.c.

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

Referenced by InitMissileXgc(), and ResetScilabXgc().

01378 {
01379   if (*num == CoordModeOrigin )
01380     ScilabXgc->CurVectorStyle =  CoordModeOrigin;
01381   else 
01382     ScilabXgc->CurVectorStyle =  CoordModePrevious ;
01383 }

Here is the caller graph for this function:

void C2F() setalufunction ( char *  string  ) 

Definition at line 1498 of file periWin.c.

References BCG::CurColor, BCG::CurDrawFunction, hdc, idfromname(), ScilabXgc, set_c(), string, and value.

01500 {     
01501   integer value;
01502   idfromname(string,&value);
01503   if ( value != -1)
01504     {
01505       SetROP2(hdc,(int) value);
01506       ScilabXgc->CurDrawFunction = value;
01507       set_c(ScilabXgc->CurColor);
01508     }
01509 }

Here is the call graph for this function:

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

Definition at line 1511 of file periWin.c.

References AluStruc_, BCG::CurColor, BCG::CurColorStatus, BCG::CurDrawFunction, hdc, alinfo::id, Max, Min, ScilabXgc, set_c(), and value.

Referenced by InitMissileXgc(), pal_setcolormap(), ResetScilabXgc(), setbackground(), setcolormapg(), and setforeground().

01516 {     
01517   int value;
01518   ScilabXgc->CurDrawFunction = Min(15,Max(0,*num));
01519   value=AluStruc_[ScilabXgc->CurDrawFunction].id;
01520   SetROP2(hdc,(int) value);
01521   if ( ScilabXgc->CurColorStatus == 1 )
01522     {
01526       set_c(ScilabXgc->CurColor);
01527     }
01528 }

Here is the call graph for this function:

Here is the caller graph for this function:

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

set and get the number of the background or foreground

A finir XXXX if (ScilabXgc->Cdrawable != (Drawable) ScilabXgc->CWindow ) { XSetWindowBackground(dpy, ScilabXgc->CWindow,px); }

Definition at line 2424 of file periWin.c.

References C2F, COLORREF, BCG::Colors, BCG::CurColorStatus, BCG::CurDrawFunction, DefaultBackground, Max, Min, NULL, BCG::NumBackground, BCG::Numcolors, PI0, ScilabXgc, and setalufunction1().

Referenced by InitMissileXgc(), pal_setcolormap(), ResetScilabXgc(), and setcolormapg().

02425 {
02426   if (ScilabXgc->CurColorStatus == 1)
02427     {
02428       COLORREF px;
02429       ScilabXgc->NumBackground = Max(0,Min(*num - 1,ScilabXgc->Numcolors + 1));
02430       C2F(setalufunction1)(&ScilabXgc->CurDrawFunction,PI0,PI0,PI0);
02431       px = (ScilabXgc->Colors == NULL) ? DefaultBackground :  ScilabXgc->Colors[ScilabXgc->NumBackground];
02432 
02439     }
02440 }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Set a clip zone (rectangle )

Definition at line 1272 of file periWin.c.

References BCG::ClipRegionSet, BCG::CurClipRegion, ScilabXgc, and set_current_clip().

Referenced by ResetScilabXgc().

01277 {
01278   ScilabXgc->ClipRegionSet = 1;
01279   ScilabXgc->CurClipRegion[0]= *x;
01280   ScilabXgc->CurClipRegion[1]= *y;
01281   ScilabXgc->CurClipRegion[2]= *w;
01282   ScilabXgc->CurClipRegion[3]= *h;
01283   set_current_clip();
01284 }

Here is the call graph for this function:

Here is the caller graph for this function:

void setcolordef ( integer  screenc  ) 

Definition at line 4095 of file periWin.c.

References screencolor.

04096 {
04097   screencolor = screenc;
04098 }

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

Definition at line 2120 of file periWin.c.

References BITSPIXEL, hdc, maxcol, PLANES, ScilabXgc, sciprint(), and setcolormapg().

02125 {
02126   unsigned long maxcol;
02127   int iPlanes = GetDeviceCaps(hdc,PLANES);
02128   int iBitsPixel = GetDeviceCaps(hdc,BITSPIXEL);
02129 
02130   *v3 = 0;
02131 
02133   if ( iBitsPixel > 24 ) iBitsPixel = 24;
02134   maxcol = 1 << ( iPlanes*iBitsPixel);
02135  
02137   if (*v2 != 3 || (unsigned long) *v1 > maxcol || *v1 < 0) {
02138     sciprint("Colormap must be a m x 3 array with m <= %d\r\n",maxcol);
02139     *v3 = 1;
02140     return;
02141   }
02142   setcolormapg(ScilabXgc,v1,v2,a,v3);
02143 }

Here is the call graph for this function:

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

Definition at line 2155 of file periWin.c.

References b, BITSPIXEL, BCG::Blue, C2F, BCG::CmapFlag, COLORREF, BCG::Colors, BCG::CurDrawFunction, BCG::CurPixmapStatus, BCG::CWindow, FREE, g, BCG::Green, hdc, i, BCG::IDLastPattern, m, maxcol, NULL, BCG::NumBackground, BCG::Numcolors, BCG::NumForeground, PI0, PLANES, RASTERCAPS, RC_PALETTE, BCG::Red, ScilabXgc, Scistring(), setalufunction1(), setbackground(), setforeground(), setpattern(), TryToGetDC(), usecolor(), and XgcAllocColors().

Referenced by setcolormap(), setgccolormap(), xset_colormap(), and xset_gccolormap().

02156 {
02157   int i,palstatus ,m;
02158   unsigned long maxcol;
02159   COLORREF  *c = (COLORREF *) NULL;
02160   float *r = (float *) NULL;
02161   float *g = (float *) NULL;
02162   float *b = (float *) NULL;
02164   int iPlanes = GetDeviceCaps(hdc,PLANES);
02165   int iBitsPixel = GetDeviceCaps(hdc,BITSPIXEL);
02166 
02167   if ( ScilabXgc->CurPixmapStatus == 1) 
02168     hdc = Xgc->hdcCompat;
02169   else
02170     hdc=TryToGetDC(Xgc->CWindow); /*?????*/
02171 
02173   if ( iBitsPixel > 24 ) iBitsPixel = 24;
02174   maxcol = 1 << ( iPlanes*iBitsPixel);
02175   palstatus= (GetDeviceCaps(hdc, RASTERCAPS) & RC_PALETTE);
02176 
02177  
02178   m = *v1;
02179 
02180   /* Save old color vectors */
02181   if(Xgc->Colors != (COLORREF *) NULL) // F.Leray
02182     c = Xgc->Colors;
02183   
02184   if(Xgc->Red != (float *) NULL)
02185     r = Xgc->Red;
02186   
02187   if(Xgc->Green != (float *) NULL)
02188     g = Xgc->Green;
02189 
02190   if(Xgc->Blue != (float *) NULL)
02191     b = Xgc->Blue;
02192 
02193   if (!XgcAllocColors(Xgc,m)) {
02194     Xgc->Colors = c;
02195     Xgc->Red = r;
02196     Xgc->Green = g;
02197     Xgc->Blue = b;
02198     *v3 = 1;
02199     return;
02200   }
02201 
02202   /* Checking RGB values */
02203   for (i = 0; i < m; i++) {
02204     if (a[i] < 0 || a[i] > 1 || a[i+m] < 0 || a[i+m] > 1 ||
02205         a[i+2*m] < 0 || a[i+2*m]> 1) {
02206       Scistring("RGB values must be between 0 and 1\n");
02207       Xgc->Colors = c;
02208       Xgc->Red = r;
02209       Xgc->Green = g;
02210       Xgc->Blue = b;
02211       *v3 = 1;
02212       return;
02213     }
02214     Xgc->Red[i] = (float)a[i];
02215     Xgc->Green[i] = (float)a[i+m];
02216     Xgc->Blue[i] = (float)a[i+2*m];  
02217     Xgc->Colors[i] = RGB((unsigned short) (255.0*a[i]),
02218                          (unsigned short) (255.0*a[i+m]),
02219                          (unsigned short) (255.0*a[i+2*m]));
02220   }
02221   /* Black */
02222   Xgc->Red[m] = Xgc->Green[m] =  Xgc->Blue[m] = (float) 0;
02223   Xgc->Colors[m]= RGB(0,0,0);
02224 
02225   /* White */
02226   Xgc->Red[m+1] =  Xgc->Green[m+1] =  Xgc->Blue[m+1] = (float) 0;
02227   Xgc->Colors[m+1]= RGB(255,255,255);
02228 
02229   Xgc->Numcolors = m;
02230   Xgc->IDLastPattern = m - 1;
02231   Xgc->CmapFlag = 0;
02232   Xgc->NumForeground = m;
02233   Xgc->NumBackground = m + 1;
02234   C2F(usecolor)((i=1,&i) ,PI0,PI0,PI0);
02236   C2F(setpattern)((i=Xgc->NumForeground+1,&i),PI0,PI0,PI0);  
02237   C2F(setalufunction1)(&Xgc->CurDrawFunction,PI0,PI0,PI0);
02238   C2F(setforeground)((i=Xgc->NumForeground+1,&i),PI0,PI0,PI0);
02239   C2F(setbackground)((i=Xgc->NumForeground+2,&i),PI0,PI0,PI0);
02240   FREE(c); FREE(r); FREE(g); FREE(b);
02241 }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 1176 of file periWin.c.

References C2F, BCG::CurWindow, BCG::CWindow, BCG::CWindowHeight, BCG::CWindowHeightView, BCG::CWindowWidth, BCG::CWindowWidthView, ierr, initgraphic(), MenuFixCurrentWin(), PD0, PI0, ScilabXgc, and SwitchWindow().

01181 { 
01182   struct BCG *bcgk;
01183   integer ierr;
01184   bcgk =  ScilabXgc ;
01186   if (v2 != (integer *) 0) MenuFixCurrentWin(*intnum);
01187   if ( ScilabXgc == (struct BCG *) 0 ) 
01188     {
01190       C2F(initgraphic)("",intnum,&ierr,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0);
01191     }
01192   else 
01193     {
01194       if ( ScilabXgc->CurWindow != *intnum )
01195         {
01196           SwitchWindow(intnum);
01197         }
01198     }
01199   if ( ScilabXgc == (struct BCG *) 0 && bcgk != (struct BCG *) 0)
01200     {
01202       ScilabXgc = bcgk ;
01203       if (v2 != (integer *) 0) MenuFixCurrentWin(bcgk->CurWindow);
01204     }
01205   else 
01206     {
01207       /* update the dimensions   */
01208       RECT rect;
01209       GetClientRect(ScilabXgc->CWindow,&rect);
01210       ScilabXgc->CWindowWidthView  = rect.right-rect.left;
01211       ScilabXgc->CWindowHeightView = rect.bottom-rect.top;
01212       /* ajout pour compatibilite */
01213       ScilabXgc->CWindowWidth  = ScilabXgc->CWindowWidth;
01214       ScilabXgc->CWindowHeight = ScilabXgc->CWindowHeight;
01215     }
01216 }

Here is the call graph for this function:

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

Definition at line 1704 of file periWin.c.

References COLORREF, BCG::Colors, BCG::CurColor, BCG::CurColorStatus, BCG::CurDashStyle, BCG::CurDrawFunction, BCG::CurLineWidth, DashTab, GXxor, hdc, Max, MAXDASH, Min, NULL, BCG::NumBackground, PS_SOLID, ScilabXgc, style, and width.

Referenced by InitMissileXgc(), ResetScilabXgc(), set_dash_and_color(), set_dash_or_color(), set_line_style(), and usecolor().

01705 {
01706   static integer l3 ;
01707   COLORREF col=RGB(0,0,0) ;
01708   HPEN hpen=NULL;
01709   HPEN hpenOld=NULL;
01710   int id=0,width=0;
01711 
01712   l3 = Max(0,Min(MAXDASH - 1,*value - 1));
01713 
01714   width = ScilabXgc->CurLineWidth ;
01715 
01716   if ( ScilabXgc->CurColorStatus == 1) 
01717   {
01718     id = ScilabXgc->CurColor;
01719     if ( ScilabXgc->CurDrawFunction !=  GXxor ) col = ScilabXgc->Colors[id];
01720     else col = ScilabXgc->Colors[id] ^ ScilabXgc->Colors[ScilabXgc->NumBackground];
01721   }
01722   else col=RGB(0,0,0);
01723 
01724   {
01725     int style = DashTab[l3];
01726     if ( (style == PS_SOLID) || (width<=1) )
01727     {
01728       hpen = CreatePen(style,width,col); 
01729     }
01730     else
01731     {
01732       LOGBRUSH logbrush;
01733       logbrush.lbStyle = BS_SOLID;
01734       logbrush.lbColor = col;
01735       logbrush.lbHatch = 0;
01736       hpen = ExtCreatePen(PS_GEOMETRIC|PS_ENDCAP_FLAT|style,width,&logbrush,0,NULL);
01737     }
01738   }
01739 
01740 
01741   hpenOld=SelectObject(hdc,hpen);
01742   if ( hpenOld ) DeleteObject(hpenOld);
01743   ScilabXgc->hPen = hpen;
01744   ScilabXgc->CurDashStyle = l3;
01745 }

Here is the caller graph for this function:

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

set and get the number of the background or foreground

XX inutile

Definition at line 2462 of file periWin.c.

References C2F, COLORREF, BCG::Colors, BCG::CurColorStatus, BCG::CurDrawFunction, DefaultForeground, Max, Min, NULL, BCG::Numcolors, BCG::NumForeground, PI0, ScilabXgc, and setalufunction1().

Referenced by InitMissileXgc(), pal_setcolormap(), ResetScilabXgc(), and setcolormapg().

02463 {
02464   if (ScilabXgc->CurColorStatus == 1)
02465     {
02466       COLORREF px;
02467       ScilabXgc->NumForeground = Max(0,Min(*num - 1,ScilabXgc->Numcolors + 1));
02468       C2F(setalufunction1)(&ScilabXgc->CurDrawFunction,PI0,PI0,PI0);
02469       px = (ScilabXgc->Colors == NULL) ? DefaultForeground 
02470         :  ScilabXgc->Colors[ScilabXgc->NumForeground];
02472     }
02473 }

Here is the call graph for this function:

Here is the caller graph for this function:

void C2F() setgccolormap ( integer v1,
integer v2,
double *  a,
struct BCG XGC,
integer v3 
)

Definition at line 2145 of file periWin.c.

References setcolormapg().

02150 {
02151 
02152   setcolormapg(XGC,v1,v2,a,v3);
02153 }

Here is the call graph for this function:

void SetGHdc ( HDC  lhdc,
int  width,
int  height 
)

Definition at line 378 of file periWin.c.

References BCG::CWindow, BCG::CWindowHeight, BCG::CWindowHeightView, BCG::CWindowWidth, BCG::CWindowWidthView, hdc, hdc1, ReleaseWinHdc(), ScilabXgc, and TryToGetDC().

Referenced by scig_replay_hdc(), and setpixmapOn().

00379 {
00380   if ( lhdc != (HDC) 0)
00381     {
00382       hdc1= hdc ;
00383       if ( hdc != (HDC) 0) ReleaseWinHdc();
00384       hdc = lhdc;
00385       ScilabXgc->CWindowWidth  = width;
00386       ScilabXgc->CWindowHeight = height;
00387     }
00388   else
00389     {
00390       if ( hdc1 != (HDC) 0 && ScilabXgc != (struct BCG *) 0 
00391            && ScilabXgc->CWindow != (HWND) 0 )
00392         {
00393           RECT rect;
00394           hdc=TryToGetDC(ScilabXgc->CWindow);
00395           /* get back the dimensions   */
00396           GetClientRect(ScilabXgc->CWindow,&rect);
00397           ScilabXgc->CWindowWidthView  = rect.right-rect.left;
00398           ScilabXgc->CWindowHeightView = rect.bottom-rect.top;
00399         }
00400     }
00401 }

Here is the call graph for this function:

Here is the caller graph for this function:

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

set and get the number of the hidden3d color

Definition at line 2495 of file periWin.c.

References BCG::CurColorStatus, Max, Min, BCG::Numcolors, BCG::NumHidden3d, and ScilabXgc.

Referenced by InitMissileXgc(), and ResetScilabXgc().

02500 {
02501   if (ScilabXgc->CurColorStatus == 1)
02502     {
02503       /* S Mottelet: Max(-1,... -> Max(-2,...  to take into account the value -1 */
02504       ScilabXgc->NumHidden3d = Max(-2,Min(*num - 1,ScilabXgc->Numcolors + 1));
02505     }
02506 }

Here is the caller graph for this function:

void SetIsASingleClickToFalse ( void   ) 

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

Definition at line 1649 of file periWin.c.

References BCG::CurColorStatus, BCG::CurPattern, GREYNUMBER, hdc, i, Max, Min, ScilabXgc, and set_c().

Referenced by drawpolylines(), drawrectangles(), fill_grid_rectangles(), fill_grid_rectangles1(), fillarcs(), fillpolylines(), InitMissileXgc(), pal_setcolormap(), ResetScilabXgc(), set_dash_and_color(), set_line_style(), setcolormapg(), and usecolor().

01654 { integer i ; 
01655  if ( ScilabXgc->CurColorStatus == 1 ) 
01656    {
01657      set_c(*num-1);
01658    }
01659  else 
01660    {
01661      i= Max(0,Min(*num-1,GREYNUMBER-1));
01662      ScilabXgc->CurPattern = i;
01663      SelectObject(hdc,Tabpix_[i]);
01664    }
01665 }

Here is the call graph for this function:

Here is the caller graph for this function:

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

adding or removing a Background Pixmap to it

I add a Background Pixmap to the window

the create default font/brush etc... in hdc

I remove the Background Pixmap to the window

XXXX

Definition at line 1898 of file periWin.c.

References C2F, BCG::CurPixmapStatus, BCG::CWindow, BCG::CWindowHeight, BCG::CWindowWidth, hdc, Max, Min, NULL, PD0, PI0, pixmapclear(), ResetScilabXgc(), sciGetPixmapStatus(), ScilabXgc, sciprint(), SetGHdc(), show(), TryToGetDC(), and xinfo().

Referenced by InitMissileXgc().

01903 {
01904   integer num1= Min(Max(*num,0),1);
01905   if ( sciGetPixmapStatus() == num1 ) return;
01906   if ( num1 == 1 )
01907     {
01909       C2F(xinfo)("Animation mode is on,( xset('pixmap',0) to leave)",
01910                  PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0);
01911       if ((  ScilabXgc->hdcCompat = CreateCompatibleDC (hdc)) == NULL)
01912         {
01913           sciprint("Setting pixmap on is impossible \r\n");
01914           return;
01915         }
01916       else
01917         {
01918           HBITMAP hbmTemp ;
01919           SetMapMode(ScilabXgc->hdcCompat, MM_TEXT);
01920           SetBkMode(ScilabXgc->hdcCompat,TRANSPARENT);
01921           SetTextAlign(ScilabXgc->hdcCompat, TA_LEFT|TA_BOTTOM);
01922           hbmTemp =CreateCompatibleBitmap (hdc,
01923                                            ScilabXgc->CWindowWidth,
01924                                            ScilabXgc->CWindowHeight);
01925           /* ajout */
01926           if (!hbmTemp)
01927             {
01928               sciprint("Setting pixmap on is impossible \r\n");
01929               return;
01930             }
01931           else
01932             {
01933               HBITMAP  hbmSave;
01934               hbmSave = SelectObject ( ScilabXgc->hdcCompat, hbmTemp);
01935               if ( ScilabXgc->hbmCompat != NULL)
01936                 DeleteObject (ScilabXgc->hbmCompat);
01937               ScilabXgc->hbmCompat = hbmTemp;
01938               ScilabXgc->CurPixmapStatus = 1;
01939               C2F(pixmapclear)(PI0,PI0,PI0,PI0); /* background color */
01941               SetGHdc(ScilabXgc->hdcCompat,ScilabXgc->CWindowWidth,
01942                       ScilabXgc->CWindowHeight);
01943               ResetScilabXgc ();
01944               SetGHdc((HDC)0,ScilabXgc->CWindowWidth,
01945                       ScilabXgc->CWindowHeight);
01946               /* ajout */
01947               C2F(show)(PI0,PI0,PI0,PI0);
01948             }
01949         }
01950     }
01951   if ( num1 == 0 )
01952     {
01954       ScilabXgc->CurPixmapStatus = 0;
01956       if ( ScilabXgc->hdcCompat)
01957         SelectObject (ScilabXgc->hdcCompat, NULL) ;
01958       if ( ScilabXgc->hbmCompat)
01959         DeleteObject (ScilabXgc->hbmCompat);
01960       if ( ScilabXgc->hdcCompat)
01961         {
01962           if ( hdc == ScilabXgc->hdcCompat)
01963             hdc=TryToGetDC(ScilabXgc->CWindow);
01964           DeleteDC(ScilabXgc->hdcCompat);
01965         }
01966       ScilabXgc->hbmCompat = (HBITMAP) 0;
01967       ScilabXgc->hdcCompat = (HDC) 0;
01968     }
01969 }

Here is the call graph for this function:

Here is the caller graph for this function:

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

C2F(setpopupdim) : To change the popup window size (visible borders) it's used by xget('wpdim') and xset('wpdim',x,y) in Scilab langage

Definition at line 1143 of file periWin.c.

References GPopupResize(), and ScilabXgc.

01148 {
01149   /*  int x1= Min((int) *x, ScilabXgc->CWindowWidth);
01150       int x2= Min((int) *y, ScilabXgc->CWindowHeight);
01151 
01152       GPopupResize(ScilabXgc,&x1,&x2);*/
01153 
01154   GPopupResize(ScilabXgc,x,y);
01155 }

Here is the call graph for this function:

void C2F() setpopupname ( char *  x0,
integer v2,
integer v3,
integer v4,
integer v5,
integer v6,
integer v7,
double *  dv1,
double*  dv2,
double*  dv3,
double*  dv4 
)

Definition at line 643 of file periWin.c.

References Setpopupname().

00647 {
00648   Setpopupname(x0);
00649 }

Here is the call graph for this function:

void Setpopupname ( char *  string  ) 

Definition at line 635 of file periWin.c.

References ScilabXgc.

Referenced by setpopupname().

00637 { 
00638   /* set the window title if exists */
00639   SetWindowText(ScilabXgc->hWndParent, string);
00640 }

Here is the caller graph for this function:

static void C2F() setscilabFigure ( integer v1,
integer v2,
integer v3,
integer v4,
integer v5,
integer v6,
double *  figure 
) [static]

static void C2F() setscilabVersion ( integer vers,
integer v2,
integer v3,
integer v4 
) [static]

static void C2F() setscilabxgc ( integer v1,
integer v2,
integer v3,
integer v4 
) [static]

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

defaut value is 1

Definition at line 1549 of file periWin.c.

References COLORREF, BCG::Colors, BCG::CurColor, BCG::CurColorStatus, BCG::CurDashStyle, BCG::CurDrawFunction, BCG::CurLineWidth, DashTab, DefaultForeground, GXxor, hdc, Max, NULL, BCG::NumBackground, PS_SOLID, ScilabXgc, style, and width.

Referenced by InitMissileXgc(), and ResetScilabXgc().

01550 { 
01551   HPEN hpen=NULL ;
01552   HPEN hpenOld=NULL ;
01553 
01554   int width =Max(0, *value);
01555   int style = DashTab[ScilabXgc->CurDashStyle];
01556 
01557   ScilabXgc->CurLineWidth = width ;
01558   
01559   if ( ScilabXgc->CurColorStatus == 1 ) 
01560   {
01561         COLORREF px = DefaultForeground ;
01562         if (ScilabXgc->Colors != NULL)
01563         {
01564                 if ( ScilabXgc->CurDrawFunction !=  GXxor ) px= ScilabXgc->Colors[ScilabXgc->CurColor];
01565                 else px = ScilabXgc->Colors[ScilabXgc->CurColor] ^ ScilabXgc->Colors[ScilabXgc->NumBackground];
01566         }
01567         
01568         if ( (style == PS_SOLID) || (width<=1) )
01569         {
01570                 hpen = CreatePen(style,ScilabXgc->CurLineWidth,px);
01571         }
01572         else
01573         {
01574                 LOGBRUSH logbrush;
01575                 logbrush.lbStyle = BS_SOLID;
01576                 logbrush.lbColor = px;
01577                 logbrush.lbHatch = 0;
01578                 hpen = ExtCreatePen(PS_GEOMETRIC|PS_ENDCAP_FLAT|style,width,&logbrush,0,NULL);
01579         }
01580   }
01581   else 
01582   {
01583         if ( (style == PS_SOLID) || (width<=1) )
01584         {
01585                 hpen = CreatePen(style,width,RGB(0,0,0));
01586         }
01587         else
01588         {
01589                 LOGBRUSH logbrush;
01590                 logbrush.lbStyle = BS_SOLID;
01591                 logbrush.lbColor = RGB(0,0,0);
01592                 logbrush.lbHatch = 0;
01593                 hpen = ExtCreatePen(PS_GEOMETRIC|PS_ENDCAP_FLAT|style,width,&logbrush,0,NULL);
01594         }
01595   }
01596   hpenOld=SelectObject(hdc,hpen);
01597   if ( hpenOld ) DeleteObject(hpenOld);
01598   ScilabXgc->hPen = hpen;
01599 }

Here is the caller graph for this function:

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

To change the window view

Definition at line 1158 of file periWin.c.

References BCG::mafigure, ScilabXgc, and sciSetViewport().

01159 {
01160   sciSetViewport( ScilabXgc->mafigure, *x, *y ) ;
01161 }

Here is the call graph for this function:

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

Definition at line 1054 of file periWin.c.

References CPixmapResize1(), BCG::CWindow, FALSE, Max, NULL, SB_HORZ, SB_VERT, sciGetScrollInfo(), sciGetwresize(), ScilabXgc, sciSetScrollInfo(), and TRUE.

Referenced by setwresize().

01059 {
01060   RECT rect,rect1;
01061   int xof,yof;
01062   SCROLLINFO vertsi;
01063   SCROLLINFO horzsi;
01064   if (ScilabXgc->CWindow != (HWND) NULL) 
01065     {
01066       /* initialisation des variables SCROLLINFO*/
01067       sciGetScrollInfo(ScilabXgc, SB_VERT, &vertsi);
01068       sciGetScrollInfo(ScilabXgc, SB_HORZ, &horzsi);
01069     
01070       ScilabXgc->CWindowWidth = Max((int) *x,50);
01071       ScilabXgc->CWindowHeight =Max((int) *y,50);
01072       if ( sciGetwresize() == 1 ) {
01073         ScilabXgc->CWindowWidthView  = ScilabXgc->CWindowWidth;
01074         ScilabXgc->CWindowHeightView = ScilabXgc->CWindowHeight;
01075         vertsi.nPos   = 0;
01076         horzsi.nPos   = 0;
01077       }
01078 
01079       if ( ScilabXgc->CWindowWidthView > ScilabXgc->CWindowWidth)
01080         ScilabXgc->CWindowWidthView = ScilabXgc->CWindowWidth;
01081 
01082       if (ScilabXgc->CWindowHeightView > ScilabXgc->CWindowHeight)
01083         ScilabXgc->CWindowHeightView = ScilabXgc->CWindowHeight;
01084       CPixmapResize1();
01085 
01086       GetWindowRect (ScilabXgc->hWndParent, &rect) ;
01087       GetWindowRect (ScilabXgc->CWindow, &rect1) ;
01088       xof = (rect.right-rect.left)- (rect1.right - rect1.left);
01089       yof = (rect.bottom-rect.top)- (rect1.bottom -rect1.top );
01090       if (sciGetwresize () == 0)
01091         {
01092           SetWindowPos (ScilabXgc->hWndParent, HWND_TOP, 0, 0,
01093                         ScilabXgc->CWindowWidthView + xof +
01094                         GetSystemMetrics (SM_CXVSCROLL),
01095                         ScilabXgc->CWindowHeightView + yof +
01096                         GetSystemMetrics (SM_CYHSCROLL),
01097                         SWP_NOMOVE | SWP_NOZORDER);
01098         }
01099       else
01100         {
01101           SetWindowPos(ScilabXgc->hWndParent,HWND_TOP,0,0,
01102                        ScilabXgc->CWindowWidthView  + xof,
01103                        ScilabXgc->CWindowHeightView + yof,
01104                        SWP_NOMOVE | SWP_NOZORDER );
01105         }
01106       vertsi.nMax   = ScilabXgc->CWindowHeight;
01107       vertsi.nPage  = ScilabXgc->CWindowHeightView;
01108       horzsi.nMax   = ScilabXgc->CWindowWidth;
01109       horzsi.nPage  = ScilabXgc->CWindowWidthView;  
01110       sciSetScrollInfo(ScilabXgc,SB_VERT, &(vertsi), TRUE);
01111       sciSetScrollInfo(ScilabXgc,SB_HORZ, &(horzsi), TRUE);
01112       if ( sciGetwresize() == 0 ) 
01113         {
01114           /* need to force a rdraw in that case */
01115           if ( ScilabXgc->horzsi.nPos + ScilabXgc->CWindowWidthView < 
01116                ScilabXgc->CWindowWidth 
01117                &&  ScilabXgc->vertsi.nPos + ScilabXgc->CWindowHeightView < 
01118                ScilabXgc->CWindowHeight) 
01119             InvalidateRect(ScilabXgc->CWindow,NULL,FALSE);
01120         }
01121     }
01122 }

Here is the call graph for this function:

Here is the caller graph for this function:

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

to set the window upper-left point position on the screen

Definition at line 1026 of file periWin.c.

References ScilabXgc.

01031 {
01032   SetWindowPos(ScilabXgc->hWndParent,HWND_TOP,*x,*y,0,0,
01033                SWP_NOSIZE | SWP_NOZORDER );
01034 }

void SetWinhdc ( void   ) 

Definition at line 313 of file periWin.c.

References BCG::CWindow, hdc, sciGetPixmapStatus(), ScilabXgc, and TryToGetDC().

Referenced by dr(), I3dRotation(), initgraphic(), SwitchWindow(), and zoom_get_rectangle().

00314 {
00315   if ( ScilabXgc != (struct BCG *) 0 && ScilabXgc->CWindow != (HWND) 0)
00316     {
00317       if ( sciGetPixmapStatus() == 1) 
00318         hdc = ScilabXgc->hdcCompat;
00319       else
00320         hdc=TryToGetDC(ScilabXgc->CWindow);
00321     }
00322 }

Here is the call graph for this function:

Here is the caller graph for this function:

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

follow or dont follow the viewport resize

Definition at line 1985 of file periWin.c.

References C2F, count, BCG::CurResizeStatus, BCG::CWindow, BCG::CWindowHeightView, BCG::CWindowWidthView, FALSE, hdc, Max, Min, NULL, PI0, ScilabXgc, setwindowdim(), and wininfo().

01986 {
01987   integer num1= Min(Max(*num,0),1);
01988   integer xtmp=0;
01989   integer ytmp=0;
01990   if ( ScilabXgc->CurResizeStatus == num1 ) 
01991     {
01992       static int count=0; 
01993       wininfo(" ");
01994       return;
01995     }
01996   ScilabXgc->CurResizeStatus = num1; /* a faire avant setwindowdim */
01997   C2F(setwindowdim)((xtmp = ScilabXgc->CWindowWidthView, &xtmp),
01998                     (ytmp=ScilabXgc->CWindowHeightView,&ytmp), PI0, PI0);
01999   SetViewportOrgEx(hdc,-ScilabXgc->horzsi.nPos,-ScilabXgc->vertsi.nPos,NULL);
02000   InvalidateRect(ScilabXgc->CWindow,NULL,FALSE);
02001 }

Here is the call graph for this function:

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

Definition at line 478 of file periWin.c.

References BCG::CWindow, BCG::CWindowHeight, BCG::CWindowWidth, hdc1, RefreshGraphToolBar(), ScilabXgc, and TryToGetDC().

Referenced by clearwindow(), and setpixmapOn().

00479 {
00480   if ( ScilabXgc->hdcCompat)
00481     {
00482       HDC hdc1=TryToGetDC(ScilabXgc->CWindow);
00483       BitBlt (hdc1,0,0,ScilabXgc->CWindowWidth,ScilabXgc->CWindowHeight,
00484               ScilabXgc->hdcCompat,0,0,SRCCOPY);
00485       /* ScilabXgc->horzsi.nPos,ScilabXgc->vertsi.nPos,SRCCOPY); */
00486       ReleaseDC(ScilabXgc->CWindow,hdc1);
00487       RefreshGraphToolBar(ScilabXgc);
00488     }
00489 
00490 }

Here is the call graph for this function:

Here is the caller graph for this function:

int C2F() store_points ( integer  n,
integer vx,
integer vy,
integer  onemore 
)

Definition at line 4616 of file periWin.c.

References i, INT_2_16B, n1, and ReallocVector().

04617 { 
04618   integer i,n1;
04619   if ( onemore == 1) n1=n+1;
04620   else n1=n;
04621   if (ReallocVector(n1) == 1)
04622     {
04623       for (i = 0; i < n; i++){
04624         points[i].x = INT_2_16B( vx[i] ) ;
04625         points[i].y = INT_2_16B( vy[i] ) ;
04626       }
04627       if (onemore == 1) {
04628         points[n].x=(short) points[0].x;
04629         points[n].y=(short) points[0].y;
04630       }
04631       return(1);
04632     }
04633   else return(0);
04634 }

Here is the call graph for this function:

int SwitchWindow ( integer intnum  ) 

Definition at line 784 of file periX11.c.

References C2F, get_window_scale(), getWindowXgcNumber(), ierr, initgraphic(), NULL, PD0, PI0, ResetScilabXgc(), and ScilabXgc.

00785 {
00787   struct BCG *SXgc;
00788   integer ierr;
00789   SXgc = getWindowXgcNumber(*intnum);
00790   if ( SXgc != (struct BCG *) 0 ) 
00791     {
00793       ScilabXgc = SXgc ;
00794       ResetScilabXgc ();
00795       get_window_scale(*intnum,NULL);
00796     }
00797   else 
00798     {
00800       C2F(initgraphic)("",intnum,&ierr,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0);
00801     }
00802 }

Here is the call graph for this function:

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

unset clip zone

Definition at line 1327 of file periWin.c.

References BCG::ClipRegionSet, hdc, NULL, and ScilabXgc.

Referenced by InitMissileXgc(), and ResetScilabXgc().

01332 {
01333   ScilabXgc->ClipRegionSet = 0;
01334   SelectClipRgn(hdc,NULL);
01335 }

Here is the caller graph for this function:

void UpdateFileGraphNameMenu ( struct BCG ScilabGC  ) 

Definition at line 931 of file wgmenu.c.

Referenced by CreateGedMenus().

00932 {
00933 #define FILEGRAPHMENUFRENCH "wgscilabF.mnu"
00934 #define FILEGRAPHMENUENGLISH "wgscilabE.mnu"
00935   extern char ScilexWindowName[MAX_PATH];
00936   char *ScilabDirectory=NULL;
00937 
00938   HWND hWndTmpScilex=FindWindow(NULL,ScilexWindowName);
00939   int LangCode=0; /*English*/
00940 
00941   if (IsWindowInterface())
00942     {
00943       if (hWndTmpScilex)
00944         {
00945           LPTW lptw=GetTextWinScilab();
00946           LangCode=lptw->lpmw->CodeLanguage;
00947         }
00948       else LangCode=0;
00949     }
00950   else LangCode=0;
00951   ScilabGC->lpmw.CodeLanguage=LangCode;
00952 
00953   ScilabDirectory=GetScilabDirectory(FALSE);
00954         
00955   if (ScilabGC->lpgw->szMenuName!=NULL) FREE(ScilabGC->lpgw->szMenuName);
00956   ScilabGC->lpgw->szMenuName = (LPSTR) MALLOC (strlen (ScilabDirectory) +strlen("\\bin\\")+ strlen (FILEGRAPHMENUENGLISH) + 1);
00957         
00958   switch (LangCode)
00959   {
00960     case 1:
00961           wsprintf(ScilabGC->lpgw->szMenuName,"%s\\bin\\%s",ScilabDirectory, FILEGRAPHMENUFRENCH);
00962       break;
00963     default : case 0:
00964           wsprintf(ScilabGC->lpgw->szMenuName,"%s\\bin\\%s",ScilabDirectory, FILEGRAPHMENUENGLISH);
00965       break;
00966   }
00967 
00968   if (ScilabDirectory){FREE(ScilabDirectory);ScilabDirectory=NULL;}     
00969 }

Here is the caller graph for this function:

void C2F() usecolor ( integer num,
integer v1,
integer v2,
integer v3 
)

Definition at line 1843 of file periWin.c.

References C2F, BCG::CurColor, BCG::CurColorStatus, BCG::CurDashStyle, BCG::CurPattern, GREYNUMBER, i, BCG::IDLastPattern, Max, Min, BCG::Numcolors, PI0, ScilabXgc, setdash(), and setpattern().

Referenced by InitMissileXgc(), pal_setcolormap(), and setcolormapg().

01848 {
01849   integer i;
01850   i =  Min(Max(*num,0),1);
01851   if ( ScilabXgc->CurColorStatus != (int) i) 
01852     {
01853       if (ScilabXgc->CurColorStatus == 1) 
01854         {
01855           /* je passe de Couleur a n&b */
01856           /* remise des couleurs a vide */
01857           ScilabXgc->CurColorStatus = 1;
01858           C2F(setpattern)((i=1,&i),PI0,PI0,PI0);
01859           /* passage en n&b */
01860           ScilabXgc->CurColorStatus = 0;
01861           i= ScilabXgc->CurPattern + 1;
01862           C2F(setpattern)(&i,PI0,PI0,PI0);
01863           i= ScilabXgc->CurDashStyle + 1;
01864           C2F(setdash)(&i,PI0,PI0,PI0);
01865           ScilabXgc->IDLastPattern = GREYNUMBER - 1;
01866         }
01867       else 
01868         {
01869           /* je passe en couleur */
01870           /* remise a zero des patterns et dash */
01871           /* remise des couleurs a vide */
01872           ScilabXgc->CurColorStatus = 0;
01873           C2F(setpattern)((i=1,&i),PI0,PI0,PI0);
01874           C2F(setdash)((i=1,&i),PI0,PI0,PI0);
01875           /* passage en couleur  */
01876           ScilabXgc->CurColorStatus = 1;
01877           i= ScilabXgc->CurColor + 1;
01878           C2F(setpattern)(&i,PI0,PI0,PI0);
01879           ScilabXgc->IDLastPattern = ScilabXgc->Numcolors - 1;
01880         }
01881     }
01882 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wininfo ( char *  fmt,
  ... 
)

Definition at line 4008 of file periWin.c.

References args, buf, count, MAXPRINTF, and ScilabXgc.

04009 {
04010   int count;
04011   char buf[MAXPRINTF];
04012   va_list args;
04013   va_start(args,fmt);
04014   count = vsprintf(buf,fmt,args);
04015   if ( ScilabXgc != (struct BCG *) 0 && ScilabXgc->Statusbar != (HWND) 0)
04016     {
04017       (BOOL)SendMessage(ScilabXgc->Statusbar, SB_SETTEXT, (WPARAM) 0, 
04018                         (LPARAM) (LPSTR) buf);
04019     }
04020 }

LRESULT CALLBACK WndGraphProc ( HWND  hwnd,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)

Warning : the following code won't work if the win.a library is replaced by a dll. The way to find WndGraphProc should be changed

Warning : Potential loop It's dangerous to use sciprint in the following code if the argument string to sciprint contains a
because this will call the TextMessage function ( which will enter a message loop). One can enter an infinite loop if TexMessage is activated while inside WndGraphProc and all the following function can be called while inside WndGraphProc.

Definition at line 36 of file WndGraphProc.c.

Referenced by RegisterWindowGraphClass().

00037 {
00038         struct BCG *ScilabGC = (struct BCG *) NULL;
00039         ScilabGC = (struct BCG *) GetWindowLong (hwnd, 0);
00040         GetEventKeyboardAndMouse(message,wParam,lParam,ScilabGC);
00041 
00042         switch (message)
00043         {
00044                 HANDLE_MSG(hwnd,WM_COMMAND,ON_WND_GRAPH_WM_COMMAND);
00045                 HANDLE_MSG(hwnd,WM_KEYDOWN,ON_WND_GRAPH_WM_KEY);
00046                 HANDLE_MSG(hwnd,WM_CREATE,ON_WND_GRAPH_WM_CREATE);
00047                 HANDLE_MSG(hwnd,WM_PAINT,ON_WND_GRAPH_WM_PAINT);
00048                 HANDLE_MSG(hwnd,WM_SIZE,ON_WND_GRAPH_WM_SIZE);
00049                 HANDLE_MSG(hwnd,WM_HSCROLL,ON_WND_GRAPH_WM_HSCROLL);
00050                 HANDLE_MSG(hwnd,WM_VSCROLL,ON_WND_GRAPH_WM_VSCROLL);
00051                 HANDLE_MSG(hwnd,WM_DROPFILES,ON_WND_GRAPH_WM_DROPFILES);
00052                 HANDLE_MSG(hwnd,WM_DESTROY,ON_WND_GRAPH_WM_DESTROY);
00053                 HANDLE_MSG(hwnd,WM_CLOSE,ON_WND_GRAPH_WM_CLOSE);
00054         }
00055         return DefWindowProc (hwnd, message, wParam, lParam);
00056 }

Here is the caller graph for this function:

LRESULT CALLBACK WndParentGraphProc ( HWND  hwnd,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 29 of file WndParentGraphProc.c.

Referenced by RegisterParentWindowGraphClass().

00030 {
00031         switch (message)
00032         {
00033                 case WM_ENTERSIZEMOVE : ON_WND_PARENTGRAPH_WM_ENTERSIZEMOVE(hwnd);  break;
00034                 case WM_EXITSIZEMOVE  : ON_WND_PARENTGRAPH_WM_EXITSIZEMOVE(hwnd);  break;
00035                 case WM_SYSCOMMAND    : ON_WND_PARENTGRAPH_WM_SYSCOMMAND(hwnd,wParam,lParam); break;
00036 
00037                 HANDLE_MSG(hwnd,WM_SIZE,ON_WND_PARENTGRAPH_WM_SIZE);
00038                 HANDLE_MSG(hwnd,WM_COMMAND,ON_WND_PARENTGRAPH_WM_COMMAND);
00039                 HANDLE_MSG(hwnd,WM_DROPFILES,ON_WND_PARENTGRAPH_WM_DROPFILES);
00040                 HANDLE_MSG(hwnd,WM_PAINT,ON_WND_PARENTGRAPH_WM_PAINT);
00041                 HANDLE_MSG(hwnd,WM_CREATE,ON_WND_PARENTGRAPH_WM_CREATE);
00042                 HANDLE_MSG(hwnd,WM_DESTROY,ON_WND_PARENTGRAPH_WM_DESTROY);
00043                 HANDLE_MSG(hwnd,WM_CLOSE,ON_WND_PARENTGRAPH_WM_CLOSE);
00044                 HANDLE_MSG(hwnd,WM_GETMINMAXINFO,ON_WND_PARENTGRAPH_WM_GETMINMAXINFO);
00045                 HANDLE_MSG(hwnd,WM_CHAR,ON_WND_PARENTGRAPH_WM_CHAR);
00046                 HANDLE_MSG(hwnd,WM_KEYDOWN,ON_WND_PARENTGRAPH_WM_KEY);
00047                 HANDLE_MSG(hwnd,WM_SETFOCUS,ON_WND_PARENTGRAPH_WM_SETFOCUS);
00048                 HANDLE_MSG(hwnd,WM_KILLFOCUS,ON_WND_PARENTGRAPH_WM_KILLFOCUS);
00049         }
00050         return DefWindowProc (hwnd, message, wParam, lParam);
00051 }

Here is the caller graph for this function:

void C2F() xclick ( char *  str,
integer ibutton,
integer x1,
integer yy1,
integer iflag,
integer istr,
integer v7,
double *  dv1,
double *  dv2,
double *  dv3,
double *  dv4 
)

Definition at line 865 of file periWin.c.

References lstr, and SciClick().

00872 {
00873   integer lstr ;
00874   SciClick(ibutton,x1, yy1,iflag,0,0,*istr,str,&lstr);
00875   if ( *istr == 1) 
00876     {
00877       if (*ibutton == -2) 
00878         {
00879           /*sciprint("Menu activated %s %d",str,lstr);*/
00880           *istr = lstr;
00881         }
00882       else
00883         *istr = 0;
00884     }
00885 }

Here is the call graph for this function:

void C2F() xclick_any ( char *  str,
integer ibutton,
integer x1,
integer yy1,
integer iwin,
integer iflag,
integer istr,
double *  dv1,
double *  dv2,
double *  dv3,
double *  dv4 
)

Definition at line 708 of file periWin.c.

References C2F, CheckClickQueue(), ClearClickQueue(), deleted_win, getmen(), getWinsMaxId(), ismenu(), lstr, ok, set_event_select(), set_wait_click(), and sxevents().

00709 {
00710   integer win;
00711   integer wincount;
00712   integer lstr ;
00713   int motion,release,ok;
00714   // reinitialisation à -1
00715   // correction bg
00716   // plot2d();  => fermer la fenêtre du plot avec la croix.
00717   // plot2d();
00718   // [c_i,c_x,c_y,c_w,c_m]=xclick()
00719   // ==> xclick renvoie le code -100 pour le bouton ce qui correspond à une fermeture de fenêtre
00720   deleted_win = -1;
00721 
00722   wincount =  getWinsMaxId() + 1 ;
00723   if (wincount == 0) 
00724     {
00725       *x1=0;
00726       *yy1=0;
00727       *iwin=0;
00728       *ibutton = -100;
00729       *istr = 0;
00730       return;
00731     }
00732   
00733 
00734   if ( *iflag ==0 )  ClearClickQueue(-1); /*clear the queue if required*/
00735  
00737   set_wait_click(1); /*disable event handler if any */
00738   set_event_select(1+4); /* select press and release events*/
00739   while (1) 
00740     {
00741       win=-1;
00742       ok=0;
00743       while (CheckClickQueue(&win,x1,yy1,ibutton,&motion,&release) == 1) {
00744         if ((motion==0) && (release==0)) {
00745           *iwin = win ;
00746           ok=1;
00747           break;
00748         }
00749 
00750         win=-1;
00751       }
00752       if(ok) {*istr = 0;break;};
00753       /* get next event */
00754       C2F(sxevents)();
00755       Sleep(1);
00756 
00757       if ( deleted_win != -1 )
00758         {
00759           /* a graphic window was deleted we quit */
00760           *iwin = deleted_win;
00761           deleted_win = -1;
00762           *x1= 0;
00763           *yy1 = 0;
00764           *ibutton    = -100;
00765           set_wait_click(0);
00766           return ;
00767         }
00768 
00770       if ( *istr==1 && C2F(ismenu)()==1 ) 
00771         {
00772           int entry;
00773           C2F(getmen)(str,&lstr,&entry);
00774           *ibutton = -2;
00775           *istr=lstr;
00776           *x1=0;
00777           *yy1=0;
00778           *iwin=-1;
00779           break;
00780         }
00781 
00782     }
00783   set_wait_click(0);
00784 }

Here is the call graph for this function:

static void XDrawPoints ( HDC  lhdc,
POINT *  points,
integer  Npoints 
) [static]

Definition at line 3613 of file periWin.c.

References hdc, i, and NULL.

03617 {
03618   int i ;
03619   for ( i=0; i < Npoints;i++) 
03620     {
03622       MoveToEx(hdc,points[i].x,points[i].y,NULL);
03623       LineTo(hdc,points[i].x+1,points[i].y);
03624     }
03625 }

static void XDrawPoints (  )  [static]

Referenced by draw_it(), and drawpolymark().

Here is the caller graph for this function:

void C2F() xend ( char *  v1,
integer v2,
integer v3,
integer v4,
integer v5,
integer v6,
integer v7,
double *  dv1,
double *  dv2,
double *  dv3,
double *  dv4 
)

Definition at line 571 of file periWin.c.

00583 {
00585 }

void C2F() xendgraphic ( void   ) 

End of graphic (do nothing)

Definition at line 567 of file periWin.c.

00568 {
00569 } 

int XgcAllocColors ( struct BCG xgc,
int  m 
)

Allocating colors in BCG struct

Definition at line 405 of file periWin.c.

References COLORREF, FREE, MALLOC, and Scistring().

Referenced by pal_setcolormap(), set_default_colormap(), set_default_colormap1(), set_default_colormap3(), setcolormap1(), setcolormap3(), and setcolormapg().

00408 {
00409   int mm;
00410   /* don't forget black and white */
00411   mm = m + 2;
00412   if (!(xgc->Red = (float *) MALLOC(mm*sizeof(float)))) {
00413     Scistring("XgcAllocColors: unable to alloc\n");
00414     return 0;
00415   }
00416   if (!(xgc->Green = (float *) MALLOC(mm*sizeof(float)))) {
00417     Scistring("XgcAllocColors: unable to alloc\n");
00418     FREE(xgc->Red);
00419     return 0;
00420   }
00421   if (!(xgc->Blue = (float *) MALLOC(mm*sizeof(float)))) {
00422     Scistring("XgcAllocColors: unable to alloc\n");
00423     FREE(xgc->Red);
00424     FREE(xgc->Green);
00425     return 0;
00426   }
00427   if (!(xgc->Colors = (COLORREF *) MALLOC(mm*sizeof(COLORREF)))) {
00428     Scistring("XgcAllocColors: unable to alloc\n");
00429     FREE(xgc->Red);
00430     FREE(xgc->Green);
00431     FREE(xgc->Blue);
00432     return 0;
00433   }
00434   return 1;
00435 }

Here is the call graph for this function:

Here is the caller graph for this function:

int XgcFreeColors ( struct BCG xgc  ) 

Definition at line 437 of file periWin.c.

References COLORREF, and FREE.

Referenced by DeleteWindowToList(), set_default_colormap3(), and setcolormap3().

00439 {
00440   FREE(xgc->Red); xgc->Red = (float *) 0;
00441   FREE(xgc->Green);xgc->Green = (float  *) 0;
00442   FREE(xgc->Blue); xgc->Blue = (float *) 0;
00443   FREE(xgc->Colors); xgc->Colors = (COLORREF *) 0;
00444   return(0);
00445 }

Here is the caller graph for this function:

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

Definition at line 4325 of file periWin.c.

References BCG::FontId, BCG::FontSize, FontTab, ScilabXgc, sciprint(), and size_.

04326 {
04327   *nargs=2;
04328   font[0]= ScilabXgc->FontId ;
04329   font[1] =ScilabXgc->FontSize ;
04330   if (*verbose == 1) 
04331     {
04332       sciprint("\r\nFontId : %d ", ScilabXgc->FontId );
04333       sciprint("--> %s at size %s pts\r\n",
04334                (*FontTab)[ScilabXgc->FontId].fname,
04335                size_[ScilabXgc->FontSize]);
04336     }
04337 }

Here is the call graph for this function:

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

Definition at line 4354 of file periWin.c.

References BCG::CurHardSymb, BCG::CurHardSymbSize, ScilabXgc, sciprint(), and size_.

Referenced by drawpolylines().

04355 {
04356   *narg =2 ;
04357   symb[0] = ScilabXgc->CurHardSymb ;
04358   symb[1] = ScilabXgc->CurHardSymbSize ;
04359   if (*verbose == 1) 
04360     {
04361       sciprint("\nMark : %d ",ScilabXgc->CurHardSymb);
04362       sciprint("at size %s pts\r\n", size_[ScilabXgc->CurHardSymbSize]);
04363     }
04364 }

Here is the call graph for this function:

Here is the caller graph for this function:

void C2F() xgetmouse ( char *  str,
integer ibutton,
integer x1,
integer yy1,
integer iflag,
integer v6,
integer v7,
double *  dv1,
double *  dv2,
double *  dv3,
double *  dv4 
)

Definition at line 887 of file periWin.c.

References SciClick().

00894 {
00895   SciClick(ibutton,x1, yy1,iflag,v6[0],v6[1],0,(char *) 0,(integer *)0);
00896 }

Here is the call graph for this function:

void C2F() xinfo ( char *  message,
integer v2,
integer v3,
integer v4,
integer v5,
integer v6,
integer v7,
double *  dv1,
double*  dv2,
double*  dv3,
double*  dv4 
)

Definition at line 3993 of file periWin.c.

References ScilabXgc.

03997 {
03998   if ( ScilabXgc != (struct BCG *) 0 && ScilabXgc->Statusbar != (HWND) 0)
03999     {
04000       (BOOL)SendMessage(ScilabXgc->Statusbar, SB_SETTEXT, (WPARAM) 0, 
04001                         (LPARAM) (LPSTR) message );
04002     }
04003 }

int XorString ( integer  x,
integer  y,
char *  string,
int  fWidth,
int  fHeight 
)

Definition at line 2897 of file periWin.c.

References COLORREF, BCG::Colors, BCG::CurColor, BCG::CurDrawFunction, getcurfont(), GXxor, hdc, NULL, BCG::NumBackground, and ScilabXgc.

Referenced by displaystring(), and DrawMark().

02901 {
02902   COLORREF col ;
02905   HFONT hfont,hfontOld;
02906   HDC hdcMem;
02907   HBITMAP hbitmap, hbitmapOld;
02908   hfont=getcurfont();
02909   hdcMem = CreateCompatibleDC (hdc);
02910   if (hdcMem) {
02911     hbitmap = CreateCompatibleBitmap (hdc,fWidth,fHeight);
02912     if (hbitmap) {
02913       SetMapMode(hdcMem, MM_TEXT);
02914       SetBkMode(hdcMem,TRANSPARENT);
02915       SetTextAlign(hdcMem, TA_LEFT|TA_BOTTOM);
02916       hbitmapOld = SelectObject (hdcMem, hbitmap);
02917       BitBlt (hdcMem, 0, 0,fWidth,fHeight, NULL, 0, 0, WHITENESS);
02922       hfontOld=SelectObject(hdcMem,hfont);
02923       if (ScilabXgc->Colors != NULL) 
02924         {
02926           col = ScilabXgc->Colors[ScilabXgc->CurColor];
02927           if ( ScilabXgc->CurDrawFunction !=  GXxor )
02928             col = col ^ ScilabXgc->Colors[ScilabXgc->NumBackground];
02929           SetTextColor(hdcMem,col); 
02930         }
02931       if (TextOut (hdcMem,0,fHeight,string,strlen(string)))
02932         {
02934           BitBlt(hdc, x,y-fHeight,fWidth,fHeight,hdcMem,0,0,0x990066);
02935         } else {
02936           MessageBox (GetFocus(),
02937                       "Unable to perform TextOut", "DisplayGlyph", MB_OK);
02938         }
02939       SelectObject (hdcMem, hbitmapOld);
02942       SelectObject (hdcMem, hfontOld);
02943       DeleteObject (hbitmap);
02944     } else {
02945       MessageBox (GetFocus(), "Unable To create Bitmap", "DisplayGlyph", MB_OK);
02946     }
02947     DeleteDC (hdcMem);
02948   } else {
02949     MessageBox (GetFocus(), "Unable to create DC", "DisplayGlyph", MB_OK);
02950   }
02951   return 0;
02952 }

Here is the call graph for this function:

Here is the caller graph for this function:

void C2F() xselgraphic ( char *  v1,
integer v2,
integer v3,
integer v4,
integer v5,
integer v6,
integer v7,
double *  dv1,
double *  dv2,
double *  dv3,
double *  dv4 
)

If there's no graphic window then select creates one

Definition at line 545 of file periWin.c.

References C2F, BCG::CWindow, ierr, initgraphic(), NULL, PD0, PI0, ScilabXgc, and SW_SHOWNORMAL.

00557 { 
00558   integer ierr;
00559   if (ScilabXgc == (struct BCG *)0 || ScilabXgc->CWindow == (HWND) NULL) 
00560     C2F(initgraphic)("",PI0,&ierr,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0);
00561   if (IsIconic(ScilabXgc->hWndParent)) 
00562     ShowWindow(ScilabXgc->hWndParent, SW_SHOWNORMAL);
00563   BringWindowToTop(ScilabXgc->hWndParent);
00564 }

Here is the call graph for this function:

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

Definition at line 4292 of file periWin.c.

References FontAlias::alias, C2F, BCG::FontId, FONTMAXSIZE, FONTNUMBER, BCG::FontSize, fonttab, FontTab, hdc, i, loadfamily(), Max, Min, ok, PD0, PI0, ScilabXgc, sciprint(), and Scistring().

Referenced by drawpolymark(), InitMissileXgc(), and ResetScilabXgc().

04293 { 
04294   integer i,fsiz;
04295   i = Min(FONTNUMBER-1,Max(*fontid,0));
04296   fsiz = Min(FONTMAXSIZE-1,Max(*fontsize,0));
04297   if ( (*FontTab)[i].ok !=1 )
04298     { 
04299       // if (i != FONTNUMBER-1 ) F.Leray test here 26.02.04
04300       if (i != FONTNUMBER )
04301         {
04302           C2F(loadfamily)(fonttab[i].alias,&i,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0);
04303         }
04304       else 
04305         {
04306           sciprint(" The Font Id %d is not affected \r\n",(int)i);
04307           Scistring(" use xlfont to set it \n");
04308           return;
04309         }
04310     }
04311   ScilabXgc->FontId = i;
04312   ScilabXgc->FontSize = fsiz;
04313   SelectFont(hdc, (*FontTab)[i].hf[fsiz]);
04314 }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 4343 of file periWin.c.

References BCG::CurHardSymb, BCG::CurHardSymbSize, FONTMAXSIZE, Max, Min, ScilabXgc, and SYMBOLNUMBER.

Referenced by drawpolylines(), InitMissileXgc(), and ResetScilabXgc().

04344 { 
04345   ScilabXgc->CurHardSymb = Max(Min(SYMBOLNUMBER-1,*number),0);
04346   ScilabXgc->CurHardSymbSize = Max(Min(FONTMAXSIZE-1,*size),0);
04347 }

Here is the caller graph for this function:


Variable Documentation

struct alinfo AluStruc_[] [static]

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

Referenced by getalufunction(), idfromname(), setalufunction1(), xget_alufunction(), and xset_alufunction2().

integer DashTab[MAXDASH] = { PS_SOLID,PS_DASH,PS_DOT,PS_DASHDOT,PS_DASHDOTDOT} [static]

Definition at line 138 of file periWin.c.

unsigned short default_colors[]

Definition at line 98 of file periWin.c.

COLORREF DefaultBackground = RGB(255,255,255) [static]

Definition at line 158 of file periWin.c.

Referenced by cleararea(), clearwindow(), sci_pixmapclear_rect(), and setbackground().

COLORREF DefaultForeground = RGB(0,0,0) [static]

Definition at line 159 of file periWin.c.

Referenced by InitMissileXgc(), ResetScilabXgc(), setforeground(), and setthickness().

integer deleted_win = -1 [static]

Definition at line 168 of file periWin.c.

Referenced by DeleteWindowToList(), and xclick_any().

FontInfoT FontInfoTab [static]

Definition at line 2805 of file periWin.c.

Referenced by SciG_Font().

FontInfoT FontInfoTabPrinter [static]

for screen

Definition at line 2806 of file periWin.c.

Referenced by SciG_Font_Printer().

FontAlias fonttab[]

Initial value:

{
  {"CourR", "-adobe-courier-medium-r-normal--*-%s0-*-*-m-*-iso8859-1","Courier New"},
  {"Symb", "-adobe-symbol-medium-r-normal--*-%s0-*-*-p-*-adobe-fontspecific","Symbol"},
  {"TimR", "-adobe-times-medium-r-normal--*-%s0-*-*-p-*-iso8859-1","Times New Roman"},
  {"TimI", "-adobe-times-medium-i-normal--*-%s0-*-*-p-*-iso8859-1","Times New Roman Italic"},
  {"TimB", "-adobe-times-bold-r-normal--*-%s0-*-*-p-*-iso8859-1","Times New Roman Bold"},
  {"TimBI", "-adobe-times-bold-i-normal--*-%s0-*-*-p-*-iso8859-1","Times New Roman Bold Italic"},
  {"HelvR", "-adobe-helvetica-medium-r-normal--*-%s0-*-*-p-*-iso8859-1","Arial"},
  {"HelvO", "-adobe-helvetica-medium-o-normal--*-%s0-*-*-p-*-iso8859-1","Arial Italic"},
  {"HelvB", "-adobe-helvetica-bold-r-normal--*-%s0-*-*-p-*-iso8859-1", "Arial Bold"},
  {"HelvBO","-adobe-helvetica-bold-o-normal--*-%s0-*-*-p-*-iso8859-1", "Arial Bold Italic"},
  {(char *) NULL,( char *) NULL}
}
ce qui suit marche sur 75dpi ou 100dpi

Definition at line 2836 of file periWin.c.

FontInfoT* FontTab = &FontInfoTab [static]

for printer

Definition at line 2808 of file periWin.c.

Referenced by CleanFonts(), getcurfont(), loadfamily_n(), LoadSymbFonts(), queryfamily(), SciG_Font(), SciG_Font_Printer(), xgetfont(), and xsetfont().

GW graphwin

We need to provide a hdc for each graphic operation but hdc can be changed to be set to a window a printer a metafile etc... Thus hdc is kept as a global variable which will be set to what we need : see Xcall.c

Definition at line 8 of file GraphWindows.c.

Referenced by AddNewWindowToList(), Console_Main(), CreateButtonToolBar(), GetGraphWinScilab(), initgraphic(), InitWindowGraphDll(), RegisterParentWindowGraphClass(), RegisterWindowGraphClass(), and Windows_Main().

WORD grey0[GREYNUMBER][8] [static]

Initial value:

{
  {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
  {0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x44, 0x00},
  {0x00, 0x44, 0x00, 0x22, 0x08, 0x40, 0x01, 0x20},
  {0x00, 0x92, 0x00, 0x25, 0x00, 0x92, 0x00, 0xa4},
  {0x55, 0x00, 0xaa, 0x00, 0x55, 0x00, 0xaa, 0x00},
  {0xad, 0x00, 0x5b, 0x00, 0xda, 0x00, 0x6d, 0x00},
  {0x6d, 0x02, 0xda, 0x08, 0x6b, 0x10, 0xb6, 0x20},
  {0x6d, 0x22, 0xda, 0x0c, 0x6b, 0x18, 0xb6, 0x24},
  {0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa},
  {0x92, 0xdd, 0x25, 0xf3, 0x94, 0xe7, 0x49, 0xdb},
  {0x92, 0xfd, 0x25, 0xf7, 0x94, 0xef, 0x49, 0xdf},
  {0x52, 0xff, 0xa4, 0xff, 0x25, 0xff, 0x92, 0xff},
  {0xaa, 0xff, 0x55, 0xff, 0xaa, 0xff, 0x55, 0xff},
  {0xff, 0x6d, 0xff, 0xda, 0xff, 0x6d, 0xff, 0x5b},
  {0xff, 0xbb, 0xff, 0xdd, 0xf7, 0xbf, 0xfe, 0xdf},
  {0xff, 0xff, 0xbb, 0xff, 0xff, 0xff, 0xbb, 0xff},
  {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
}

Definition at line 1617 of file periWin.c.

HDC hdc = (HDC) 0 [static]

Definition at line 208 of file periWin.c.

Referenced by boundingbox(), cleararea(), clearwindow(), CopyToClipboardBitmap(), displaystring(), DispStringAngle(), DoMark(), drawarc(), drawarrows(), drawaxis(), drawline(), DrawMark(), drawpolyline(), drawpolymark(), drawrectangle(), drawsegments(), EvaluateSelection(), ExportBMP(), ExportEMF(), fill_grid_rectangles(), fill_grid_rectangles1(), fillarc(), fillpolyline(), fillrectangle(), ForbiddenToUseScilab(), GetScreenDPI(), GetScreenProperty(), GetTextFromClipboard(), HelpOn(), HwndToBmpFile(), initgraphic(), IsEmptyClipboard(), LoadMacros(), LoadSymbFonts(), MaybeSetWinhdc(), ON_WND_CONSOLE_WM_PAINT(), ON_WND_PARENTGRAPH_WM_PAINT(), ON_WND_TEXT_WM_CREATE(), ON_WND_TEXT_WM_PAINT(), OpenSelection(), pal_setcolormap(), PasteFunction(), PrintSelection(), PutTextInClipboard(), ReleaseWinHdc(), ScilabNoPaint(), ScilabPaint(), SciPalette(), set_c(), set_clip_after_scroll(), set_current_clip(), set_default_colormap(), setalufunction(), setalufunction1(), setcolormap(), setcolormapg(), setdash(), SetGHdc(), setpattern(), setpixmapOn(), setthickness(), SetWinhdc(), setwresize(), TextClearEOL(), TextCopyClip(), TextMakeFont(), TextSelectFont(), unsetclip(), UpdateText(), XDrawPoints(), XorString(), and xsetfont().

HDC hdc1 = (HDC) 0 [static]

Definition at line 209 of file periWin.c.

Referenced by sci_pixmap_resize(), ScilabGResize(), SetGHdc(), and show().

Offset ListOffset [static]

Definition at line 2818 of file periWin.c.

Referenced by SciG_Font().

Offset ListOffsetPrint [static]

Definition at line 2819 of file periWin.c.

Referenced by SciG_Font_Printer().

char Marks[] [static]

Initial value:

 {
  
  (char)46,(char)43,(char)180,(char)42, (char)168,(char)224,
  (char)196,(char)209,(char)167,(char)176,}

Definition at line 2822 of file periWin.c.

Referenced by DrawMark(), and LoadSymbFonts().

struct bgc MissileGCTab_[] [static]

Table in lexicographic order

Referenced by MissileGCGetorSet().

struct BCG MissileXgc

Structure to keep the graphic state

Definition at line 165 of file periWin.c.

unsigned nbpoints [static]

Definition at line 4613 of file periWin.c.

POINT* points [static]

Definition at line 4612 of file periWin.c.

Referenced by fillpolylinesGif(), main(), and SetPoints().

int scale_font_size = 1 [static]

Definition at line 2804 of file periWin.c.

Referenced by SciG_Font(), SciG_Font_Printer(), and SciMakeFont().

struct BCG* ScilabXgc = (struct BCG *) 0

Definition at line 169 of file periWin.c.

Referenced by AddNewWin(), bitmap(), boundingbox(), CheckColormap(), CheckScilabXgc(), cleararea(), clearwindow(), CPixmapResize(), CPixmapResize1(), CreatePopupWindow(), CurSymbXOffset(), CurSymbYOffset(), DeleteSGWin(), displaynumbers(), displaystring(), DispStringAngle(), DispStringAngleold(), drawarc(), drawarrows(), drawaxis(), drawline(), DrawMark(), drawpolymark(), drawrectangle(), drawsegments(), fill_grid_rectangles(), fill_grid_rectangles1(), fillarc(), fillarcs(), fillpolyline(), fillrectangle(), fontidscale(), get_b(), get_dash_or_color(), get_g(), get_pixel(), get_r(), getabsourel(), getalufunction(), getbackground(), getclip(), getcolormap(), getcurfont(), getcurwin(), getdash(), getforeground(), gethidden3d(), getlast(), getpattern(), getpopupdim(), getthickness(), getusecolor(), getviewport(), getwindowdim(), getwindowpos(), GPopupResize(), GViewportResize(), initgraphic(), InitMissileXgc(), IsPrivateCmap(), MaybeSetWinhdc(), pal_setcolormap(), PannerCallback(), pixmapclear(), ReleaseWinHdc(), ResetScilabXgc(), SciClick(), sciGetPixmapStatus(), sciGetwresize(), sciInitScrollBar(), SciMouseCapture(), SciPalette(), SciViewportClipGetSize(), SciViewportGet(), SciViewportMove(), set_c(), set_clip_after_scroll(), set_cmap(), set_current_clip(), set_dash_or_color(), set_default_colormap(), set_default_colormap1(), set_default_colormap3(), set_line_style(), setabsourel(), setalufunction(), setalufunction1(), setbackground(), setclip(), setcolormap(), setcolormap1(), setcolormapg(), setcurwin(), setdash(), setforeground(), SetGHdc(), sethidden3d(), setpattern(), setpixmapOn(), setpopupdim(), Setpopupname(), setthickness(), setviewport(), setwindowdim(), setwindowpos(), SetWinhdc(), setwresize(), show(), SwitchWindow(), unsetclip(), usecolor(), ViewportCallback(), wininfo(), WithBackingStore(), XDroutine(), xget_absourel(), xget_alufunction(), xget_background(), xget_clip(), xget_colormap(), xget_colormap_size(), xget_curwin(), xget_dash(), xget_dash_or_color(), xget_font(), xget_foreground(), xget_hidden3d(), xget_last(), xget_mark(), xget_pattern(), xget_pixmapOn(), xget_popupdim(), xget_scilabFigure(), xget_scilabxgc(), xget_thickness(), xget_usecolor(), xget_viewport(), xget_windowdim(), xget_windowpos(), xget_wresize(), xgetfont(), xgetmark(), xinfo(), XorString(), xselgraphic(), xset_absourel(), xset_alufunction(), xset_alufunction1(), xset_background(), xset_clip(), xset_colormap(), xset_curwin(), xset_dash(), xset_dash_or_color(), xset_dashstyle(), xset_font(), xset_foreground(), xset_hidden3d(), xset_line_style(), xset_mark(), xset_pattern(), xset_pixmapclear(), xset_pixmapOn(), xset_popupdim(), xset_scilabFigure(), xset_show(), xset_thickness(), xset_unclip(), xset_usecolor(), xset_viewport(), xset_windowdim(), xset_windowpos(), xset_wresize(), xsetfont(), and xsetmark().

int screencolor = 1 [static]

Definition at line 157 of file periWin.c.

Referenced by create_color_panel(), getcolordef(), initgraphic(), and setcolordef().

int set_default_colormap_flag = 1 [static]

Definition at line 2022 of file periWin.c.

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

Definition at line 2810 of file periWin.c.

Referenced by xgetfont(), and xgetmark().

int size_n_[] = {8,10,12,14,18,24} [static]

Definition at line 2811 of file periWin.c.

Referenced by loadfamily_n().

Offset* SymbOffset = &ListOffset [static]

Definition at line 2820 of file periWin.c.

Referenced by CurSymbXOffset(), CurSymbYOffset(), LoadSymbFonts(), SciG_Font(), and SciG_Font_Printer().

LPSTR szGraphClass = "wscilab_graph"

Definition at line 133 of file periWin.c.

Referenced by initgraphic(), and RegisterWindowGraphClass().

LPSTR szParentGraphClass = "wscilab_parent_graph"

Definition at line 134 of file periWin.c.

Referenced by initgraphic(), and RegisterParentWindowGraphClass().

HBRUSH Tabpix_[GREYNUMBER]

maybe not so useful ???? XXXX

Definition at line 1615 of file periWin.c.

TW textwin

keeps information for the current graphic window

Definition at line 8 of file TextWindows.c.

Referenced by AddMenu(), chmenu(), Console_Main(), DebugGW(), DebugGW1(), delbtn(), ExposeChooseWindow(), ExposeMessageWindow(), ExposeMessageWindow1(), GetFileWindow(), GetTextWinScilab(), InitWindowGraphDll(), mChoiceWindow(), mDialogWindow(), MyFGetS(), MyFPutS(), MyFRead(), MyFWrite(), MyGetCh(), MyPutCh(), ON_WND_PARENTGRAPH_WM_KILLFOCUS(), SciClick(), sciprint(), sciprint_l(), sciprint_nd(), Scistring(), SendCTRLandAKey(), setmen(), TextMessage1(), unsmen(), user_putc(), user_puts(), Windows_Main(), Write_Scilab_Window(), and xscimore().

double* vdouble = 0 [static]

Definition at line 93 of file periWin.c.

integer xleft [static]

XXXX a isoler des p'eripheriques car c'est utilis'e dans plot3d

Definition at line 4679 of file periWin.c.

integer xright [static]

Definition at line 4679 of file periWin.c.

integer ybot [static]

Definition at line 4679 of file periWin.c.

integer ytop [static]

Definition at line 4679 of file periWin.c.


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