File: SPLIT_f.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 (39 lines) | stat: -rw-r--r-- 892 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
function [x,y,typ]=SPLIT_f(job,arg1,arg2)
// Copyright INRIA
x=[];y=[],typ=[];

select job
case 'plot' then
  graphics=arg1(2); [orig,sz,orient]=graphics(1:3)
  thick=xget('thickness');xset('thickness',2)
  pat=xget('pattern');xset('pattern',default_color(1))
  sz=10*sz;
  p=1 //pixel sizes ratio
  rx=sz(1)*p/2
  ry=sz(2)/2
  xfarc(orig(1)-rx,orig(2)+ry,sz(1)*p,sz(2),0,360*64)
  xset('thickness',thick)
  xset('pattern',pat)
case 'getinputs' then
  graphics=arg1(2); orig=graphics(1)
  x=orig(1)
  y=orig(2)
  typ=ones(x)
case 'getoutputs' then
  graphics=arg1(2); orig=graphics(1)
  x=[1 1]*orig(1)
  y=[1 1]*orig(2)
  typ=ones(x)
case 'getorigin' then
  [x,y]=standard_origin(arg1)
case 'set' then
  x=arg1;
  x(3)(11)=[] //compatibility
case 'define' then
  model=list('lsplit',-1,[-1;-1;-1],[],[],[],[],[],[],'c',[],[%t %f],' ',list())
  x=standard_define([1 1]/3,model,[],[])
end