Scicos: fix the "" + [] and 1 + []
[scilab.git] / scilab / modules / scicos / macros / scicos_scicos / scicos_graphics.sci
1 //  Scicos
2 //
3 //  Copyright (C) INRIA - METALAU Project <scicos@inria.fr>
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 //
19 // See the file ../license.txt
20 //
21
22 function graphics=scicos_graphics(v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,...
23     v11,v12,v13,v14,v15,v16,v17,v18,v19,v20)
24     //initialisation de graphics scicos_new
25     if exists("orig","local")==0 then orig=[0 0],end
26     if exists("sz","local")==0 then sz=[20 20],end
27     if exists("flip","local")==0 then flip=%t,end
28     if exists("theta","local")==0 then theta=0,end
29     if exists("exprs","local")==0 then exprs=[],end
30     if exists("pin","local")==0 then pin=[],end
31     if exists("pout","local")==0 then pout=[],end
32     if exists("pein","local")==0 then pein=[],end
33     if exists("peout","local")==0 then peout=[],end
34     if exists("gr_i","local")==0 then gr_i=[],end
35     if exists("id","local")==0 then id="",end
36     if exists("in_implicit","local")==0 then
37         I="E";
38         in_implicit=I(ones(pin(:)));
39     end
40     if exists("out_implicit","local")==0 then
41         I="E";
42         out_implicit=I(ones(pout(:)));
43     end
44     if exists("in_style","local")==0 then
45         in_style=emptystr(pin);
46     end
47     if exists("out_style","local")==0 then
48         out_style=emptystr(pout);
49     end
50     if exists("in_label","local")==0 then
51         in_label=emptystr(pin);
52     end
53     if exists("out_label","local")==0 then
54         out_label=emptystr(pout);
55     end
56     if exists("style","local")==0 then style="", end
57
58     graphics=scicos_new(["graphics","orig","sz","flip","theta","exprs","pin",..
59     "pout","pein","peout","gr_i","id","in_implicit","out_implicit","in_style","out_style","in_label","out_label","style"],..
60     orig,sz,flip,theta,exprs,pin,pout,pein,peout,gr_i,id,in_implicit,out_implicit,in_style,out_style,in_label,out_label,style)
61 endfunction