File: restore_scs_gc.sci

package info (click to toggle)
scilab 2.6-4
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 54,632 kB
  • ctags: 40,267
  • sloc: ansic: 267,851; fortran: 166,549; sh: 10,005; makefile: 4,119; tcl: 1,070; cpp: 233; csh: 143; asm: 135; perl: 130; java: 39
file content (21 lines) | stat: -rw-r--r-- 473 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function restore_scs_gc(scs_gc)
// restore the current scicos graphic context
// Copyright INRIA
xsetech(scs_gc(1)(1),scs_gc(1)(2))
driver(scs_gc(2))
for i=3:size(scs_gc)
  x=scs_gc(i)
  xx=x(2);
  select size(x(2),'*'),
  case 1 then 
    xset(x(1),xx);
  case 2 then 
    xset(x(1),xx(1),xx(2));
  case 3 then 
    xset(x(1),xx(1),xx(2),xx(3));
  case 4 then 
    xset(x(1),xx(1),xx(2),xx(3),xx(4));
  case 5 then 
    xset(x(1),xx(1),xx(2),xx(3),xx(4),xx(5));
  end
end