BIOSCILAB
SCILAB 4.0 PAS-A-PAS
SCILAB 4.0 STEP-BY-STEP

Jacques-Deric Rouault

CNRS / INRIA

Volume 4   LE GRAPHISME
Volume 4   GRAPHISM
4.21 LE HANDLE FIGURE
4.21
THE HANDLE FIGURE

Version 4.0.19 du 23 Décembre 2005 / Version 4.0.19, December 23th 2005
Scilab 3.1 - Scilab 4.0 /  Windows - Linux

4.20       GESTION DES FENETRES  / MANAGING WINDOWS
ALLER A L'INDEX GENERAL / GO TO THE GENERAL INDEX
ALLER A LA TABLE GENERALE / GO TO THE GENERAL TABLE
 4.22       GESTION DES REPERES  / MANAGING THE SYSTEMS OF AXES

4.21.01   Présentation  / Presentation
4.21.02   Liste des champs  / Fields list
4.21.03   Parent et enfants  / Parent and children
4.21.04   Déclaration  / Declaration
4.21.05   La figure par défaut  / The default figure
4.21.10   figure_style
4.21.11   figure_position
4.21.12   figure_size
4.21.13   axes_size
4.21.14   auto_resize
4.21.15   figure_name
4.21.16   figure_id
4.21.17   color_map
4.21.18   background
4.21.19   immediate_drawing
4.21.20   pixmap
4.21.21   pixel_drawing_mode
4.21.30   user_data
4.21.50   visible
4.21.51   rotation_style
4.21.99   Zones d'ombre  / Shadowy areas
4.21.01   Présentation  / Presentation

Figure(Type handle)

Le handle Figure permet de gérer les fenetres graphiques sous Scilab.
The handle Figure manages the graphic windows under Scilab.

4.21.02   Liste des champs  / Fields list

Dans la version 3.1, le handle de catégorie Figure contient 15+1 champs.
In the version 3.1, the handle of category Figure has 15+1 fields.

Dans la version 4.0, le handle de catégorie Figure contient 16+1 champs.
In the version 4.0, the handle of category Figure has 16+1 fields.

//  Program Spas42102A
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.02A");
hf = scf (1),
delete (hf);

Télécharger le fichier / Download the file Spas42102A.sce



Dans la programmation Scilab, une fenetre est associé à une variable de type 9 ou handle.
In the Scilab programming, a window is associated to a variable of type 9 or handle.

Dans  version 4.0, Le handle Figure contient 16 champs.
In the  version 4.0, the handle Figure has 16 fields.





Le champ Figure.type n'est pas modifiable.

The field Figure.type cannot be modified.

//  Program Spas42102B
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.02B");
hf = scf (1);
hf.type,
delete (hf);


Télécharger le fichier / Download the file Spas42102B.sce



4.21.03   Parent et enfants  / Parent and children

Le handle Figure n'a pas de handle parent.
The handle Figure has no handle parent.

Le handle Figure a au moins un handle enfant de type Axes.
The handle Figure has at least one handle children type Axes.

La procédure subplot crée un ou plusieurs enfant au handle Figure.
The procedure subplot creates one or several children to the handle Figure.
4.22.10   Création de plusieurs repères  / Creating several systems of axes

La procédure newaxes crée un nouvel enfant au handle Figure.
The procedure newaxes creates a new children to the handle Figure.

4.21.04   Déclaration  / Declaration

scf

La fonction scf créé une nouvelle fenetre graphique et retourne son handle.
The function scf creates a new window and returns its handle.

//  Program Spas42104A
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.04A");
hf = scf (),
xpause (5000000);
delete (hf);

Télécharger le fichier / Download the file Spas42104A.sce

La fonction scf créé une nouvelle fenetre graphique de numéro donné et retourne son handle.
The function scf creates a new window with the given number and returns its handle.

//  Program Spas42104B
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.04B");
hf = scf (9),
xpause (5000000);
delete (hf);

Télécharger le fichier / Download the file Spas42104B.sce

L'appel de toute instruction graphique crée implicitement une fenetre graphique et le handle correspondant. If faut remonter par les champs parent pour arriver au handle de la fenetre.
The calling of any graphic instruction implicitely creates a graphic window and the corresponding handle. It is necessary to pass by the fields parent to get the handle of the window.

//  Program Spas42104C
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.04C");
lines (0);
plot2d ();
hg =  gce (),
ha = hg.parent,
hf = ha.parent,
xpause (5000000);
delete (hf);

Télécharger le fichier / Download the file Spas42104C.sce

4.21.05   La figure par défaut  / The default figure

Default figure
Figure par défaut
gdf
get ("default_figure")
sdf
set ("default_figure")
xset
("default")

La figure par défaut est une figure qui n'est jamais tracée et qui contient les valeurs par défaut.
The default figure is a figure which is never drawn and that contains the default values.
4.14.05   Schema général  / General scheme

La fonction gdf ou get ("default_figure") donne le handle de la figure par défaut.
The function gdf or get ("default_figure") gives the handle of the default figure.

La fonction sdf ou set ("default_figure") rétablit la figure par défaut à sa valeur par défaut initiale.

The function sdf or set ("default_figure") restaures the default figure at its initial default value.

//  Program Spas42105A
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.05A");
hfd = scf (),
xpause (5000000);
delete (hfd);

Télécharger le fichier / Download the file Spas42105A.sce

//  Program Spas42105B
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.05B");
sdf ();
hfd = gdf (),

Télécharger le fichier / Download the file Spas42105B.sce





La procédure xset ("default") rétablit la figure par défaut à sa valeur par défaut initiale.
The procedure xset ("default") restaures the default figure at its initial default value.

//  Program Spas42105C
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.05C");
xset ("default");
hfd = scf (),

Télécharger le fichier / Download the file Spas42105C.sce

4.21.10   figure_style

customized (figure_style handle figure)
figure_style (handle figure)
new (figure_style handle figure)
old (figure_style handle figure)


Le champ figure_style du handle se réfère à l'ancien "old" ou au nouveau "new" mode graphique. La valeur par défaut est "customized". Ce champ n'est pas modifiable.
The field figure_style of the handle refers to the old "old" or to the new "new" graphic mode. The default value is ''customized". This field cannot be modified.

//  Program Spas42110A
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.10A");
hf = scf (1);
disp (hf.figure_style);
delete (hf);

Télécharger le fichier / Download the file Spas42110A.sce



Nous travaillerons toujours avec la valeur "new".
We always work with the value "new".

4.21.11   figure_position

figure_position (Figure)
wpos (xget, xset)
xget ("wpos")
xset ("wpos")


Le champ figure_position du handle contient la position (en pixels) du coin supérieur gauche de la fenetre. Le coin supérieur gauche de l'écran correspond à la position [0, 0]. Par défaut, la fenetre est placée au point [200, 200].
The field figure_position of the handle contains the position (in pixels) or the upper left corner of the window. The upper left corner of the screen corresponds to the position [0, 0]. By default, the window is displayed at the position [200, 200].

//  Program Spas42111A
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.11A");
hf = scf (1);
hf.figure_position = [0,0];
hf.figure_name = "4.21.11A";
xpause (5000000);
delete (hf);

Télécharger le fichier / Download the file Spas42111A.sce

Quand plusieurs plusieurs fenetres sont créées, elles s'affichent toutes à la même place et se masquent si ce champ n'est pas modifié.
When several windows are created, they are all displayed at the same place and mask themselves if this field is not modified.

La fonction xget ("wpos") retourne la valeur du champ Figure.figure_position.

The function xget ("wpos") returns the value of the field Figure.figure_position.

Il vaut mieux ne pas utiliser cette procédure de l'ancien graphisme, qui est en voie d'obsolescence.
Please, avoid the use of this procedure of the old graphism, it is becoming obsolete.

//  Program Spas42111B
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.11B");
hf = scf (1);
hf.figure_name = "4.21.11B";
hf.figure_position = [10,20];
pos = xget ("wpos"),
delete (hf);

Télécharger le fichier / Download the file Spas42111B.sce





La procédure xset ("wpos") modifie la valeur du champ Figure.figure_position.
The procedure xset ("wpos") modifies the value of the field Figure.figure_position.

Il vaut mieux ne pas utiliser cette procédure de l'ancien graphisme, qui est en voie d'obsolescence.
Please, avoid the use of this procedure of the old graphism, it is becoming obsolete.

//  Program Spas42111C
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.11C");
hf = scf (1);
hf.figure_name = "4.21.11C";
hf.figure_position,
xset ("wpos",100,150);
hf.figure_position,
delete (hf);

Télécharger le fichier / Download the file Spas42111C.sce

 



4.21.12   figure_size

figure_size (Figure)
wdim (xget, xset)
xget ("wdim")
xset ("wdim")


Le champ figure_size du handle contient la taille (en pixels : largeur, hauteur) de la fenetre. Par défaut la fenetre mesure [610, 461].
The field figure_size of the handle contains the size (in pixels: width, height) of the window. By default, the windows measures [610, 461].

//  Program Spas42112A
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.12A");
hf = scf (1);
hf.figure_size = [500,100];
hf.figure_name = "4.21.12A";
xpause (5000000);
delete (hf);

Télécharger le fichier / Download the file Spas42112A.sce


Les dimensions correspondent à l'intérieur de la fenetre. A l'extérieur, la fenetre mesure 508x174 pixels pour 500x100 demandés sous Windows XP.
The dimensions correspond to the inner of the window. Outside, the window measures 508x174 pixels  for 500x100 requested under Windows XP.

Avec Scilab 3.1, les dimensions minimales d'une fenetre sont 145x50.
With Scilab 3.1, the minimal dimensions of a window are 145x50.

Avec Scilab 4.0, les dimensions minimales d'une fenetre sont 392*246.
With Scilab 4.0, the minimal dimensions of a window are 392*246.

//  Program Spas42112B
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.12B");
hf = scf (1);
hf.figure_size = [10,10];
hf.figure_size,
hf.figure_name = "4.21.12B";


Télécharger le fichier / Download the file Spas42112B.sce







La fonction xget ("wdim") retourne la valeur du champ Figure.figure_size.
The function xget ("wdim") returns the value of the field Figure.figure_size.

Il vaut mieux ne pas utiliser cette procédure de l'ancien graphisme, qui est en voie d'obsolescence.
Please, avoid the use of this procedure of the old graphism, it is becoming obsolete.

//  Program Spas42112C
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.12C");
hf = scf (1);
hf.figure_name = "4.21.12C";
hf.figure_size = [500,300];
v = xget ("wdim"),
delete (hf);

Télécharger le fichier / Download the file Spas42112C.sce





La procédure xset ("wdim") modifie la valeur du champ Figure.figure_size.

The procedure xset ("wdim") modifies the value of the field Figure.figure.size.

Il vaut mieux ne pas utiliser cette procédure de l'ancien graphisme, qui est en voie d'obsolescence.
Please, avoid the use of this procedure of the old graphism, it is becoming obsolete.

//  Program Spas42112D
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.12D");
hf = scf (1);
hf.figure_name = "4.21.12D";
hf.figure_size,
xset ("wdim",400,300);
hf.figure_size,
delete (hf);

Télécharger le fichier / Download the file Spas42112D.sce

 



4.21.13   axes_size

axes_size (Figure)

Le champ axes_size du handle contient la taille (en pixels : largeur, hauteur) de la partie visualisée à l'écran de l'image graphique. Par défaut, l'image graphique mesure [600, 400] pixels et correspond à la fenetre graphique.
The field axes_size of the handle contains the size (in pixels: width, height) of the screen visualized part of the graphic image.  By default, the graphic image mesures [600, 400] pixels and corresponds to the graphic window..

Le champ auto_resize doit être mis à "off", sinon les valeurs données dans axes_size sont sans effet.
The field auto_resize must be put at "off", else the values given in axes_size have no effect..

//  Program Spas42113A
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.13A");
hf = scf ();
hf.auto_resize = "off";
hf.axes_size = [800,900];
hf.figure_name = "4.21.13A";
ha = gca ();
ha.axes_visible = "on";

Télécharger le fichier / Download the file Spas42113A.sce





//  Program Spas42113B
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.13B");
hf = scf (1);
hf.auto_resize = "off";
hf.axes_size = [400,300];
hf.figure_name = "4.21.13B";
ha = gca ();
ha.axes_visible = "on";

Télécharger le fichier / Download the file Spas42113B.sce





Cette option permet d'afficher par morceaux une image plus grande que la fenetre ou même l'écran. Les ascenseurs situés sur les bords droits et inférieurs de la fenetre permettent de déplacer la partie visualisée.
This option allows a bit per bit display of an image greater than the window or the screen. The lifts located on the right and lower edges of the window allow to move the visible part.

4.21.14   auto_resize

auto_resize (Figure)
wresize (xget, xset)
xget ("wresize")
xset ("wresize")


Le champ auto_resize du handle Figure permet d'actionner (valeur "off") ou d'inhiber (valeur "on") le fonctionnement de l'option axes_size. Par défaut, auto_resize est à la valeur "off".
The field auto_resize of the handle Figure actionnates (value "off") or inhibits (value "on") the working of the option axes_size.  By default, auto_resize has the value "off".

//  Program Spas42114A
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.14A");
hf1  = scf (1);
hf1.figure_position = [0,0];
hf1.figure_size = [400,300];
hf1.auto_resize = "off";
hf1.axes_size = [600,600];
hf1.figure_name = "4.21.14A1";
ha1 = gca ();
ha1.axes_visible = "on";

hf2  = scf (2);
hf2.figure_position = [200,200];
hf2.figure_size = [400,300];
hf2.auto_resize = "on";
hf2.axes_size = [600,600];
hf2.figure_name = "4.21.14A2";
ha2 = gca ();
ha2.axes_visible = "on";

Télécharger le fichier / Download the file Spas42114A.sce





La fonction xget ("wresize") retourne la valeur (0=off, 1=on) du champ Figure.auto_resize.
The function xget ("wresize") returns the value (0=off, 1=on) of the field Figure.auto_resize.

Il vaut mieux ne pas utiliser cette procédure de l'ancien graphisme, qui est en voie d'obsolescence.
Please, avoid the use of this procedure of the old graphism, it is becoming obsolete.

//  Program Spas42114B
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.14B");
hf = scf (1);
hf.figure_name = "4.21.14B";
hf.auto_resize = "on";
v = xget ("wresize"),
hf.auto_resize = "off";
v = xget ("wresize"),

Télécharger le fichier / Download the file Spas42114B.sce



La procédure xset ("wresize") modifie la valeur
(0=off, 1=on) du champ Figure.auto_resize.
The procedure xset ("wresize") modifies the value (0=off, 1=on) of the field Figure.auto_resize.

Il vaut mieux ne pas utiliser cette procédure de l'ancien graphisme, qui est en voie d'obsolescence.
Please, avoid the use of this procedure of the old graphism, it is becoming obsolete.

//  Program Spas42114C
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.14C");
hf = scf (1);
hf.figure_name = "4.21.14C";
hf.auto_resize = "off";
hf.auto_resize,
xset ("wresize",1);
hf.auto_resize,

Télécharger le fichier / Download the file Spas42114C.sce



4.21.15   figure_name

figure_name (Figure)
Scilab Graphic (figure_name)

xname

Le champ figure_name du handle contient le nom de la fenetre, figuré dans le bandeau du haut de la fenetre. Par défaut, figure_name est à la valeur "Scilab Graphic".
The field figure_name of the handle contains the name of the window, figured at the top of the window.  By default, figure_name has the value "Scilab Graphic".

//  Program Spas42115A
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.15A");
hf = scf ();
hf.figure_name = "4.21.15A";

Télécharger le fichier / Download the file Spas42115A.sce





La procedure xname change le nom de la fenetre courante.
The procedure xname changes the name of the current window.

Il vaut mieux ne pas utiliser cette procédure de l'ancien graphisme, qui est en voie d'obsolescence.
Please, avoid the use of this procedure of the old graphism, it is becoming obsolete.

//  Program Spas42115B
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.15B");
hf = scf ();
hf.figure_name = "4.21.15B1";
xpause (5000000);
xname ("4.21.15B2");

Télécharger le fichier / Download the file Spas42115B.sce



La procedure xname modifie le nom de la fenetre graphique mais ne modifie pas le champ Figure.figure_name. BUG 1470
The procedure xname changes the name of the graphic window but does not modify the field Figure.figure_name. BUG 1470

//  Program Spas42115C
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.15C");
hf = scf ();
hf.figure_name = "4.21.15C1";
xname ("4.21.15C2");
hf.figure_name,

Télécharger le fichier / Download the file Spas42115C.sce



4.21.16   figure_id

figure_id (Figure)
window (xget, xset)
xget ("window")
xset ("window")


Avec Scilab 3.1, le champ figure_id du handle contient un nombre associé au nom par défaut de la fenetre, figuré en haut.
With Scilab 3.1, the field figure_id of the handle contains a number associated to the default name of the window, figured at the top. 

//  Program Spas42116A
//  Designed for Scilab 3.1
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.16A");
hf = scf (1);
hf.figure_id = 1;

Télécharger le fichier / Download the file Spas42116A.sce



Si la valeur de figure_id ne correspond pas au rang d'une fenetre ouverte, une nouvelle fenetre de rang figure_id est ouverte.
If the value of figure_id does not correspond to the rank of an open window, a new window of rank figure_id is open.

//  Program Spas42116B
//  Designed for Scilab 3.1
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.16B");
hf = scf (1);
hf.figure_id = 2;

Télécharger le fichier / Download the file Spas42116B.sce

Avec Scilab 4.0, la partie du texte %d dans le champ figure_name est remplacée par la valeur du champ figure_id.
With Scilab 4.0, the text part %d in the field figure_name is replaced by the value of the field figure_id.

//  Program Spas42116C
//  Designed for Scilab 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.16C");
hf = scf (3);
hf.figure_name = "Figure = %d";


Télécharger le fichier / Download the file Spas42116C.sce





La fonction xget ("window") retourne la valeur du champ Figure.figure_id.
The function xget ("window") returns the value of the field Figure.figure_id.

//  Program Spas42116D
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.16D");
hf = scf (4);
v = xget ("window"),
delete (hf);

Télécharger le fichier / Download the file Spas42116D.sce



La procédure xset ("window") modifie la valeur
du champ Figure.figure_id. Si elle existe, cette fenetre devient la fenetre courante, si elle n'existe pas, elle est crée.
The procedure xset ("window") modifies the value of the field Figure.figure_id. If this window exists, it begins the current window, if it does not exists, it is created.

Il vaut mieux ne pas utiliser cette procédure de l'ancien graphisme, qui est en voie d'obsolescence.
Please, avoid the use of this procedure of the old graphism, it is becoming obsolete.

//  Program Spas42116E
//  Designed for Scilab 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.16E");
hf1 = scf (1);
hf1.figure_name = "42116E / 1";
hf1.figure_position = [0,0];
hf2 = scf (2);
hf2.figure_name = "42116E / 2";
hf2.figure_position = [100,100];
xpause (5000000);

xset ("window",1),
xfrect (0, 1, 1, 1);
hr1 = gce ();
hr1.background = 5;
hr1.fill_mode = "on";
xpause (5000000);

xset ("window",3),
xpause (5000000);

ha3 = gce ();
hf3 = ha3.parent;
delete (hf1);
delete (hf2);
delete (hf3);

Télécharger le fichier / Download the file Spas42116E.sce

4.21.17   color_map

color_map (Figure)
colormap (xget, xset)
xget ("colormap")
xset ("colormap")


Le champ color_map du handle contient la gamme de couleur utilisée. Par défaut, color_map est une gamme de 32 couleurs.
The field color_map of the handle contains the scale of colors used.  By default, color_map is the 32-color scale.

//  Program Spas42117A
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.17A");
hf = scf ();
hf.background = 15;
hf.figure_name = "4.21.17A1";
xpause (5000000);

hf.color_map = hotcolormap (50);
hf.figure_name = "4.21.17A2";

Télécharger le fichier / Download the file Spas42117A.sce



La couleur de fond 15  correspond au vert de la palette par défaut et un rouge sombre dans la palette définie ensuire
The background color 15 gives a  green in the default palette, then a dark red in the new palette.

La fonction xget ("colormap") retourne la valeur du champ Figure.color_map.
The function xget ("colormap") returns the value of the field Figure.color_map.

Il vaut mieux ne pas utiliser cette procédure de l'ancien graphisme, qui est en voie d'obsolescence.
Please, avoid the use of this procedure of the old graphism, it is becoming obsolete.

//  Program Spas42117B
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.17B");
lines (0);
hf = scf (1);
v = xget ("colormap"),
delete (hf);

Télécharger le fichier / Download the file Spas42117B.sce



La procédure xset ("colormap") charge un nouveau
champ Figure.color_map.
The procedure xset ("colormap") loads a new field Figure.color_map.

Il vaut mieux ne pas utiliser cette procédure de l'ancien graphisme, qui est en voie d'obsolescence.
Please, avoid the use of this procedure of the old graphism, it is becoming obsolete.

//  Program Spas42117C
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.17C");
hf = scf (1);
hf.figure_name = "4.21.17C";
cmap = hotcolormap (50);
xset ("colormap", cmap),
hf.background = 40;

Télécharger le fichier / Download the file Spas42117C.sce



4.21.18   background

background (Figure)
background (xget, xset)
xget ("background")
xset ("background")


Le champ background du handle code la couleur de fond de la fenetre, en dehors de la zone controlée par le(s) répère(s). Cette couleur est codée par une valeur entière, dans la limite des valeurs définies par le champ color_map (32 par défaut). Par défaut, la valeur est -2 (blanc).
The field background of the handle codes the background color of the background of the window, outside the area controlled by the system(s) of axes. This color is coded as an integer value, in the limits of the values defined by the field color_map (by default 32). By default, the value is -2 (blanc).

//  Program Spas42118A
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.18A");
hf = scf ();
hf.background = 29;
hf.figure_name = "4.21.18A";

Télécharger le fichier / Download the file Spas42118A.sce



La fonction xget ("background") retourne la valeur du champ Figure.background.
The function xget ("background") returns the value of the field Figure.background.

Il vaut mieux ne pas utiliser cette procédure de l'ancien graphisme, qui est en voie d'obsolescence.
Please, avoid the use of this procedure of the old graphism, it is becoming obsolete.

//  Program Spas42118B
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.18B");
hf = scf ();
hf.background = 29;
v = xget ("background"),
delete (hf);

Télécharger le fichier / Download the file Spas42118B.sce



La procédure xset ("background") modifie la valeur
du champ Figure.background.
The procedure xset ("background") modifies the value of the field Figure.background.

Il vaut mieux ne pas utiliser cette procédure de l'ancien graphisme, qui est en voie d'obsolescence.
Please, avoid the use of this procedure of the old graphism, it is becoming obsolete.

//  Program Spas42118C
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.18C");
hf = scf ();
hf.figure_name = "4.21.18C1";
hf.background = 2;
xpause (5000000);

hf.figure_name = "4.21.18C2";
xset ("background",31);
hf.background,

Télécharger le fichier / Download the file Spas42118C.sce





NB : La procédure xset ("background") modifie la valeur
du champ Axes.background et non Figure.background
NOTE: The procedure xset ("background") modifies the value of the field Axes.background and not Figure.background.

4.21.19   immediate_drawing

drawlater
drawnow
immediate_drawing (Figure)


Le champ immediate_drawing du handle indique à l'environnement Scilab si la fenetre est à retracer à l'écran (valeur "on") ou si on doit attendre (valeur "off"). La valeur par défaut est "on".
The field immediate_drawing of the handle indicates to the Scilab environment if the window has to be displayed again at screen (value "on") ou if it has to wait (value "off") . By default, the value is "on".

//  Program Spas42119A
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.19A");
hf = scf ();
hf.figure_name = "4.21.19A1";
hf.immediate_drawing = "off";
hf.background = 15;
hf.figure_name = "4.21.19A2";
xpause (5000000);

hf.immediate_drawing = "on";
hf.figure_name = "4.21.19A3";

Télécharger le fichier / Download the file Spas42119A.sce





Les procédures drawlater et drawnow modifient la valeur de ce champ. Voir
4.16.03   Suspendre l'affichage  / Suspending the display
Theprocedures drawlater and drawnow modify the values of this field. See 4.16.03   Suspendre l'affichage  / Suspending the display

//  Program Spas42119B
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.19B");
hf = scf ();
hf.immediate_drawing,
drawlater;
hf.immediate_drawing,
drawnow;
hf.immediate_drawing,
delete (hf);

Télécharger le fichier / Download the file Spas42119B.sce



4.21.20   pixmap

pixmap (Figure)
pixmap (xget, xset)
show_pixmap
xget ("pixmap")
xset ("pixmap")


Le champ pixmap du handle code l'utilisation du mode pixmap. Par défaut, ce mode est inhibé (valeur "off").
The field pixmap of the handle codes the use ot the pixmap mode.  By default, this mode is inhibited (valeur "off").

En mode pixmap, les images ne sont pas immédiatement affichées et sont stockées dans une mémoire graphique. L'instruction show_pixmap provoque l'affichage, ce qui donne des animations plus lissées. Voir 4.16.05   Animations  / Animations
In pixmap mode, images are not immediatly displayed but are stored in a graphical memory. The instruction show_pixmap causes displaying, providing smooth animations.  See 4.16.05   Animations  / Animations

//  Program Spas42120A
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.20A");
hf = scf (1);
hf.pixmap = "on";
hf.figure_name = "4.21.20A";
hf.background = 10;
xpause (5000000);
show_pixmap ();

Télécharger le fichier / Download the file Spas42120A.sce

La fonction xget ("pixmap") retourne la valeur (0=off, 1=on) du champ Figure.pixmap.
The function xget ("pixmap") returns the value (0=off, 1=on) of the field Figure.pixmap.

Il vaut mieux ne pas utiliser cette procédure de l'ancien graphisme, qui est en voie d'obsolescence.
Please, avoid the use of this procedure of the old graphism, it is becoming obsolete.

//  Program Spas42120B
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.20B");
hf = scf (1);
hf.figure_name = "4.21.20B";
hf.pixmap = "on";
v = xget ("pixmap"),
hf.pixmap = "off";
v = xget ("pixmap"),

Télécharger le fichier / Download the file Spas42120B.sce



La procédure xset ("pixmap") modifie la valeur
(0=off, 1=on) du champ Figure.pixmap.
The procedure xset ("pixmap") modifies the value (0=off, 1=on) of the field Figure.pixmap.

Il vaut mieux ne pas utiliser cette procédure de l'ancien graphisme, qui est en voie d'obsolescence.
Please, avoid the use of this procedure of the old graphism, it is becoming obsolete.

//  Program Spas42120C
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.20C");
hf = scf (1);
hf.figure_name = "4.21.20C";
hf.pixmap = "off";
hf.pixmap,
xset ("pixmap",1);
hf.pixmap,

Télécharger le fichier / Download the file Spas42120C.sce



4.21.21   pixel_drawing_mode

alufunction (xget, xset)
and (pixel_drawing_mode)
andInverted (pixel_drawing_mode)
andReverse (pixel_drawing_mode)
clear (pixel_drawing_mode)
copy (pixel_drawing_mode)
copyInverted (pixel_drawing_mode)
equiv (pixel_drawing_mode)
invert (pixel_drawing_mode)
nand (pixel_drawing_mode)
noop (pixel_drawing_mode)
nor (pixel_drawing_mode)
or (pixel_drawing_mode)
orInverted (pixel_drawing_mode)
orReverse (pixel_drawing_mode)
pixel_drawing_mode (Figure)
set (pixel_drawing_mode)

xget ("alufunction")
xor (pixel_drawing_mode)
xset ("alufunction")


Le champ pixel_drawing_mode du handle code la façon dont les points élémentaires ou pixels sont figurés à l'écran, en fonction des deux valeurs du pixel à figurer et du pixel déjà figuré. Les 16 fonctions binaires sont prévues. Par défaut, ce mode est "copy".
The field pixel_frawing_mode of the handle codes the way elementary points or pixels are figured at screen, as a function of the two values of the pixel to be figured and of the pixel already figured.  The 16 boolean functions are implemented. By default, this mode is "copy".

A désigne l'état actuel de l'écran, B désigne l'état du pixel à afficher. L'opération unaire not consiste à prendre la couleur complémentaire.
A is the actual state of screen, B is the state of the pixel to be displayed. The monadic operation not consists in considering the complementary color.
A = dst, B = src


Opérateur/Operator Résultat/Result
Résultat/Result
0
clear
0
Noir / Black effacer/errase
1
and
A and B

2
andReverse
not A and B

3
copy
B
affichage (par défaut)
4
andInverted
A and not B

5
noop
A
inchangé, unchanged
6
xor
A xor B
animations
7
or
A or B

8
nor
not A and not B

9
equiv
A xor not B

10
invert
not A

11
orReverse
not A or B

12
copyInverted
not B
affichage inversé, inverted display
13
orInverted
A or not B

14
nand
not A or not B

15
set
1
Blanc / White

//  Program Spas42121A
//  Designed for Scilab 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.21A");
hf = scf (1);
hf.figure_name = "4.21.21A";
xfrect (0.1, 0.9, 0.8, 0.8);
hr1 = gce ();
hr1.background = 5;
hr1.fill_mode = "on";
xpause (5000000);
hf.pixel_drawing_mode = "invert";

Télécharger le fichier / Download the file Spas42121A.sce





La fonction xget ("alufunction") retourne la valeur du champ Figure.pixel_drawing_mode.
The function xget ("alufunction") returns the value of the field Figure.pixel_drawing_mode.

Il vaut mieux ne pas utiliser cette procédure de l'ancien graphisme, qui est en voie d'obsolescence.
Please, avoid the use of this procedure of the old graphism, it is becoming obsolete.

//  Program Spas42121B
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.21B");
hf = scf ();
hf.pixel_drawing_mode = "copyInverted";
v = xget ("alufunction"),
delete (hf);

Télécharger le fichier / Download the file Spas42121B.sce



La procédure xset ("alufunction") modifie la valeur
du champ Figure.pixel_drawing_mode.
The procedure xset ("alufunction") modifies the value of the field Figure.pixel_drawing_mode.

Il vaut mieux ne pas utiliser cette procédure de l'ancien graphisme, qui est en voie d'obsolescence.
Please, avoid the use of this procedure of the old graphism, it is becoming obsolete.

//  Program Spas42121C
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.21C");
hf = scf ();
xset ("alufunction",13),
hf.pixel_drawing_mode,
delete (hf);

Télécharger le fichier / Download the file Spas42121B.sce


 

4.21.30   user_data

user_data (Figure)

Valable uniquement à partir de Scilab 4.0

Only valid from Scilab 4.0

Le champ user_data du handle Figure est un vecteur qui contient des variables définies par l'utilisateur. Par défaut, ce champ est vide (valeur []).

The field user_data of the handle Figure is a vector containing variables defined by the user. By default, this field is empty (value []).

//  Program Spas42130A
//  Designed for Scilab 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.30A");
hf = scf (1);
hf.figure_name = "4.21.30A1";
xpause (5000000);

hf.figure_name = "4.21.30A2";
hf.user_data = hf.figure_position ;
hf.figure_position = [200,250];
hf.user_data,
xpause (5000000);

hf.figure_name = "4.21.30A3";
hf.figure_position  = hf.user_data ;
xpause (5000000);
delete (hf);

Télécharger le fichier / Download the file Spas42130A.sce

La position de la fenetre est mémorisée dans Figure.user_data, est déplacée puis est rétablie à partir de la valeur mise en mémoire.
The location of the window is memorized in Figure.user_data, is moved then is restaured from the value stored in memory.



4.21.50   visible

visible (Figure)

Le champ visible du handle Figure indique si les repères de la fenetre sont (valeur "on") ou ne sont pas (valeur "off") dessinés. Par défaut, la valeurs de ce champ est "on".
The field visible of the handle Figure indicates if the systems of axes of the window are (value "on") or aren not (value "off") drawn.  By default, the value of this fields is "on".

//  Program Spas42150A
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.50A");
hf = scf (1);
hf.figure_name = "4.21.50A1";
hf.background = 32;
ha = hf.children;
ha.axes_visible = "on";
ha.box = "on";
xpause (5000000);

hf.figure_name = "4.21.50A2";
hf.visible = "off";
xpause (5000000);

hf.figure_name = "4.21.50A3";
hf.visible = "on";
xpause (5000000);
delete (hf);

Télécharger le fichier / Download the file Spas42150A.sce




4.21.51   rotation_style

multiple (rotation_style)
rotation_style (Figure)
unary (rotation_style)


En présence de plusieurs repères tracés dans la même fenetre graphique, le champ rotation_style du handle Figure indique s'ils subissent la rotation 3D de façon synchrone (valeur "multiple") ou indépendante (valeur "unary"). Par défaut, la valeur de ce champ est "unary".
When several system of axes are drawn in the same graphic window, the field rotation_style of the handle Figure indicates if the 3D rotation acts synchroneouly (value "multiple")on then or independent (value "unary") . By default, the values of this fields is "unary".

disp ("4.21.51A");
hf = scf (1);
hf.figure_name = "4.21.51A";
hf.background = 32;
hf.rotation_style = "multiple";

subplot (1, 2, 1);
xfrect (0, 1, 1, 1);
hr1 = gce ();
hr1.background = 2;
hr1.fill_mode = "on";
ha1 = hr1.parent,

subplot (1, 2, 2);
xfrect (0, 1, 1, 1);
hr2 = gce ();
hr2.background = 3;
hr2.fill_mode = "on";

ha1.rotation_angles = [60,200];

Télécharger le fichier / Download the file Spas42151A.sce



//  Program Spas42151B
//  Designed for Scilab 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.21.51B");
hf = scf (1);
hf.figure_name = "4.21.51B";
hf.background = 32;
hf.rotation_style = "unary";

subplot (1, 2, 1);
xfrect (0, 1, 1, 1);
hr1 = gce ();
hr1.background = 2;
hr1.fill_mode = "on";
ha1 = hr1.parent,

subplot (1, 2, 2);
xfrect (0, 1, 1, 1);
hr2 = gce ();
hr2.background = 3;
hr2.fill_mode = "on";

ha1.rotation_angles = [60,200];

Télécharger le fichier / Download the file Spas42151B.sce



4.21.99   Zones d'ombre  / Shadowy areas


4.20       GESTION DES FENETRES  / MANAGING WINDOWS
ALLER A L'INDEX GENERAL / GO TO THE GENERAL INDEX
ALLER A LA TABLE GENERALE / GO TO THE GENERAL TABLE
 4.22       GESTION DES REPERES  / MANAGING THE SYSTEMS OF AXES