Fonction Scilab
eng - fr


dessin_block - exporte la figure d'un bloc dans un fichier eps

Librairie

Séquence d'appel

dessin_block(name,flag)

Paramètres

Description

Add here a paragraph of the function description. Other paragraph can be added

Add here a paragraph of the function description

Exemple

Add here scilab instructions and comments

Contenu du fichier


//dessin_block
//fonction qui charge une structure graphique
//d'un block scicos dans une liste scs_m et qui
//exporte les données graphiques en fichier eps
//grâce à la fonction mdo_export
//Entrée : nom de la fonction d'interface du block
//         flag 'html' ou 'guide'
//         lblock [] ou autre chose (renseigne sur le type de block)
function dessin_block(name,flag,lblock)
  //vérifie présence lblock
  if rsh<3 then
    lblock=[];
  end

  //load scicos variable and library
  bak=get('figure_style');
  set("figure_style","old");
  olds=get('old_style');
  set('old_style','on');

  //load scicos variable and library
  load SCI/macros/scicos/lib
  exec(loadpallibs,-1)
  %scicos_prob=%f;
  alreadyran=%f
  needcompile=4
  %zoom=1.8;
  colmap=xget('colormap');

  scs_m=scicos_diagram()
  ierror=execstr('blk='+name+'(''define'')','errcatch')
  if ierror <>0 then
    x_message(['Error in GUI function';lasterror()] )
    disp('define'+name)
    fct=[]
    return
  end
  blk.graphics.sz=20*blk.graphics.sz;
  scs_m.objs(1)=blk
  if flag=='html' then
     if lblock<>[] then
       newflag='html_lblock'
     else
       newflag='html_block'
     end
  else 
     if lblock<>[] then
       newflag='guide_lblock'
     else 
       newflag=flag
     end
  end 
  mdo_export(scs_m,name,newflag)
  //restore figure_style  
  gg=xget('window')  // for bug in figure_style and winsid
  xset('window',0) // for bug in figure_style and winsid
  set('figure_style',bak)
  set('old_style',stripblanks(olds));
  xset('window',gg) // for bug in figure_style and winsid  
endfunction

Fonction(s) utilisée(s)

Add here the used function name and references

Auteurs

enter here the author name Add here the author references