![]() 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.16
CONTROLE
DE L'AFFICHAGE 4.16 CONTROLING DISPLAY |
Version 4.0.22 du 6 Janvier 2006 / Version 4.0.22, January 6th 2006 |
Scilab 3.1 - Scilab 4.0 / Windows - Linux |
ALLER A
L'INDEX GENERAL / GO TO
THE GENERAL INDEX |
ALLER A LA TABLE GENERALE / GO TO THE GENERAL TABLE |
4.17 LA SOURIS GRAPHIQUE / THE GRAPHIC MOUSE |
4.16.01 Introduction / Introduction |
4.16.02 Couches d'affichage / Display layers |
Superposing
graphic layers Superposition des couches graphiques |
/// Program Spas41602A
// Designed for Scilab 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.16.02A"); hf = scf (1); hf.figure_name = "4.16.02A1"; hf.background = 2; // bleu blue xclick; hf.figure_name = "4.16.02A2"; ha= gca (); ha.axes_visible="on"; ha.background = 3; // vert green xclick; hf.figure_name = "4.16.02A3"; xfrect (0.2, 0.8, 0.6, 0.6); hr1 = get ("hdl"); hr1.background = 4; // cyan xclick; hf.figure_name = "4.16.02A4"; xfrect (0.4, 0.6, 0.2, 0.2); hr2 = get ("hdl"); hr2.background = 5; // rouge red xclick; hf.figure_name = "4.16.02A5"; hr1.background = 6; // magenta xclick; delete (hf); |
4.16.03 Suspendre l'affichage / Suspending the display |
drawlater drawnow immediate_drawing (Figure, drawlater, drawnow) |
// Program Spas41603A
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.16.03A"); hf = scf (1); drawlater; hf.figure_name = "4.16.03A1"; hf.background = 2; // bleu blue ha = gca (); ha.axes_visible="on"; ha.background = 3; // vert green xfrect (0.2, 0.8, 0.6, 0.6); hr1 = get ("hdl"); hr1.background = 4; // cyan xfrect (0.4, 0.6, 0.2, 0.2); hr2 = get ("hdl"); hr2.background = 5; // rouge red hr1.background = 6; // magenta hr1.visible, xclick; drawnow; hf.figure_name = "4.16.03A2"; xclick; delete (hf); |
// Program Spas41603A
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.16.03B"); hf = scf (1); drawlater; hf.figure_name = "4.16.03B"; ha = hf.children; xfrect (0.2, 0.8, 0.6, 0.6); hr = gce (); hf.immediate_drawing, drawnow; hf.immediate_drawing, delete (hf); |
4.16.04 Controle temporel / Temporal control |
xclick xpause |
// Program Spas41604A
// Designed for Scilab 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.16.04A"); hf = scf (1); hf.figure_name = "4.16.04A1"; hf.background = 2; // bleu blue ha = gca (); ha.axes_visible="on"; ha.background = 3; // vert green xpause (2000000); xfrect (0.2, 0.8, 0.6, 0.6); hr1 = get ("hdl"); hr1.background = 4; // cyan hf.figure_name = "4.16.04A2"; xpause (2000000); xfrect (0.4, 0.6, 0.2, 0.2); hr2 = get ("hdl"); hr2.background = 5; // rouge red hf.figure_name = "4.16.04A3"; xpause (2000000); hr1.background = 6; // magenta hf.figure_name = "4.16.04A4"; |
// Program Spas41604B
// Designed for Scilab 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.16.04B"); hf = scf (1); hf.figure_name = "4.16.04B1"; hf.background = 2; // bleu blue ha = gca (); ha.axes_visible="on"; ha.background = 3; // vert green xclick; xfrect (0.2, 0.8, 0.6, 0.6); hr1 = get ("hdl"); hr1.background = 4; // cyan hf.figure_name = "4.16.04B2"; xclick; xfrect (0.4, 0.6, 0.2, 0.2); hr2 = get ("hdl"); hr2.background = 5; // rouge red hf.figure_name = "4.16.04B3"; xclick; hr1.background = 6; // magenta hf.figure_name = "4.16.04B4"; |
4.16.05
Animations / Animations |
clear_pixmap show_pixmap |
// Program Spas41605A
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.16.05A"); hf = scf (1); hf.figure_name = "4.16.05A"; ha = gca (); ha.data_bounds=[0 0; 10 10]; xrects([0;10;1;1],5); r1=gce (); xrects([0;1;1;1],13); r2=gce (); for k=1:1000 move(r1,[0.01,-0.01]); move(r2,[0.01,0.01]) end delete (hf); |
// Program Spas41605B
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.16.05B"); hf = scf (1); hf.figure_name = "4.16.05A"; hf.pixmap='on'; ha = gca (); ha.data_bounds=[0 0; 10 10]; xrects([0;10;1;1],5); r1=gce (); xrects([0;1;1;1],13); r2=gce (); for k=1:1000 move(r1,[0.01,-0.01]); move(r2,[0.01,0.01]) show_pixmap(); end; delete (hf); |
4.16.06
Clignotement / Flashing |
twinkle |
// Program Spas41606A
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.16.06A"); hf = scf (1); hf.figure_name = "4.16.06A"; ha = gca (); ha.axes_visible="on"; ha.foreground = 5; xfrect (0, 1, 1, 1); hr = gce (); twinkle (hf); twinkle (ha); twinkle (hr, 20); |
4.16.07
Recadrage / Reframing |
replot |
// Program Spas41607A
// Designed for Scilab 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.16.07A"); hf = scf (1); hf.figure_name = "4.16.07A1"; ha = gca (); ha.axes_visible="on"; xfrect (0, 1, 1, 1); hr = gce (); hr.background = 5; xpause (5000000); hf.figure_name = "4.16.07A2"; replot ([-1, -1, 2, 2]); |
4.16.08
Redessiner / Redraw |
xbasr |
// Program Spas41608A
// Designed for Scilab 3.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.16.08A"); hf = scf (1); hf.figure_name = "4.16.08A1"; ha = gca (); ha.axes_visible="on"; ha.background = 2; xfrect (0, 1, 1, 1); ha.foreground = 3; xfrect (0.1, 0.9, 0.8, 0.8); ha.foreground = 4; xfrect (0.2, 0.8, 0.6, 0.6); ha.foreground = 5; xfrect (0.3, 0.7, 0.4, 0.4); xpause (5000000); hf.figure_name = "4.16.08A2"; xbasr; |
4.16.09
Nettoyer une zone / Cleanning an area |
xclea |
// Program Spas41609A
// Designed for Scilab 3.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.16.09A"); hf = scf (1); hf.figure_name = "4.16.09A1"; ha = gca (); ha.axes_visible="on"; ha.foreground = 5; xfrect (0, 1, 1, 1); hr = gce (); xpause (5000000); hf.figure_name = "4.16.09A2"; xclea ([-0.1, 0.8, 0.6, 0.9]); |
// Program Spas41609B
// Designed for Scilab 3.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.16.09B"); hf = scf (1); hf.figure_name = "4.16.09B1"; ha = gca (); ha.axes_visible="on"; ha.foreground = 5; xfrect (0, 1, 1, 1); xpause (5000000); hf.figure_name = "4.16.09B2"; xclea ([-0.1, 0.8, 0.6, 0.9]); xpause (5000000); hf.figure_name = "4.16.09B3"; xfrect (0, 0.4, 0.4, 0.4); |
// Program Spas41609C
// Designed for Scilab 3.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.16.09C"); hf = scf (1); hf.figure_name = "4.16.09C1"; ha = gca (); ha.axes_visible="on"; ha.foreground = 5; xfrect (0, 1, 1, 1); xpause (5000000); hf.figure_name = "4.16.09C2"; xclea ([0.2, 0.8, 0.6, 0.6]); xpause (5000000); hf.figure_name = "4.16.09C3"; xfrect (0.3, 0.7, 0.4, 0.4); |
// Program Spas41609D
// Designed for Scilab 3.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.16.09D"); hf = scf (1); hf.figure_name = "4.16.09D1"; ha = gca (); ha.axes_visible="on"; ha.foreground = 5; xfrect (0, 1, 1, 1); xpause (5000000); hf.figure_name = "4.16.09D2"; xclea ([0.2, 0.8, 0.6, 0.6]); xpause (5000000); hf.figure_name = "4.16.09D3"; ha.foreground = 6; xfrect (0.3, 0.7, 0.4, 0.4); |
4.16.50
La zone de rognage / Area of clipping |
clip_box clip_status Clipping Rognage |
// Program Spas41650A
// Designed for Scilab 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.16.50A"); hf = scf (1); hf.figure_name = "4.16.50A1"; ha = gca (); ha.axes_visible="on"; xarc (0, 1, 1, 1, 0, 23040); hc = gce (); hc.background = 5; hc.fill_mode = "on"; hc.clip_state = "clipgrf"; hc.clip_box = [0.4, 0.6, 0.2, 0.6]; xpause (5000000); hf.figure_name = "4.16.50A2"; hc.clip_box = [0.3, 0.7, 0.4, 0.7]; xpause (5000000); hf.figure_name = "4.16.50A3"; hc.clip_box = [0.2, 0.8, 0.6, 0.8]; xpause (5000000); hf.figure_name = "4.16.50A4"; hc.clip_box = [0.1, 0.9, 0.8, 0.9]; xpause (5000000); hf.figure_name = "4.16.50A5"; hc.clip_box = [0, 1, 1, 1]; |
// Program Spas41650B
// Designed for Scilab 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.16.50B"); hf = scf (1); hf.figure_name = "4.16.50B1"; ha = gca (); ha.axes_visible="on"; xarc (0, 1, 1, 1, 0, 23040); hc = gce (); hc.background = 6; hc.fill_mode = "on"; hc.clip_state = "clipgrf"; hc.clip_box = [0.4, 0.6, 0.2, 0.6]; xpause (5000000); hf.figure_name = "4.16.50B2"; hc.clip_state = "off"; xpause (5000000); hf.figure_name = "4.16.50B3"; hc.clip_state = "on"; |
4.16.51
Procedure xclip |
clipgrf xclip |
// Program Spas41651A
// Designed for Scilab 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.16.51A"); hf = scf (1); hf.figure_name = "4.16.51A1"; ha = gca (); ha.axes_visible="on"; ha.box = "on"; xfrect ([0,1,1,1]); hr = gce (); hr.background = 3; hr.fill_mode = "on"; xpause (5000000); hf.figure_name = "4.16.51A2"; xclip ([-0.1, 0.5, 0.6, 0.6]); xpause (5000000); hf.figure_name = "4.16.51A3"; xarc (0, 1, 1, 1, 0, 23040); hc = gce (); hc.background = 5; hc.fill_mode = "on"; xpause (5000000); hf.figure_name = "4.16.51A4"; xclip ("clipgrf"); |
4.16.52
xget ("clipping") xset
("clipping") |
clipping (xget, xset) clipoff (xset) xget ("clipping") xset ("clipping") xset ("clipoff") |
// Program Spas41652A
// Designed for Scilab 3.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.16.52A"); hf = scf (1); hf.figure_name = "4.16.52A"; ha = gca (); ha.axes_visible="on"; ha.box = "on"; xfrect ([0,1,1,1]); hr = gce (); hr.foreground = 3; hr.fill_mode = "on"; xclip ([-0.1, 0.5, 0.6, 0.6]); v = xget ("clipping"), |
// Program Spas41652B
// Designed for Scilab 3.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.16.52B"); hf = scf (1); hf.figure_name = "4.16.52B"; ha = gca (); ha.axes_visible="on"; ha.box = "on"; xfrect ([0,1,1,1]); hr = gce (); hr.foreground = 3; hr.fill_mode = "on"; xset ("clipping",-0.1, 0.5, 0.6, 0.6); v = xget ("clipping"), |
// Program Spas41652C
// Designed for Scilab 3.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.16.52C"); hf = scf (1); hf.figure_name = "4.16.52C1"; ha = gca (); ha.axes_visible="on"; ha.box = "on"; xfrect ([0,1,1,1]); hr = gce (); hr.foreground = 4; hr.fill_mode = "on"; xset ("clipping",-0.1, 0.5, 0.6, 0.6); xpause (5000000); hf.figure_name = "4.16.52C2"; xset ("clipoff"); |
ALLER A
L'INDEX GENERAL / GO TO
THE GENERAL INDEX |
ALLER A LA TABLE GENERALE / GO TO THE GENERAL TABLE |
4.17 LA SOURIS GRAPHIQUE / THE GRAPHIC MOUSE |