Code covered by the BSD License  

Highlights from
HTML Indexer

image thumbnail

HTML Indexer

by

 

16 Aug 2004 (Updated )

automated multi-language html index, index for print, batch image scaling

prjRefresh(FileList, Options)
function FileList = prjRefresh(FileList, Options)
% refresh info in FileList dupa ce umbli la resolutii, batch, smartscaling, etc.
% se presupune ca ai or_size, i.e. ca ai rulat initial : prjCheckFile
% 
% FileList = prjRefresh(FileList, Options)
%
% FileList  - o structura provenita din dir, filtrata pe tipuri grafice
% Dir       - directoarele in care lucrez
% Options   - contine html, resolutiile de iesire
%
% v.046    - 2004.04.09, new
% v. 0.46a  - 01.05.2004, Dir added - cancel

if nargin < 2 disp('prjRefresh: error, no Options passed'); end;

for i=1: size(FileList,2)    
    FileList(i).scalefactor_th = max(FileList(i).or_height, FileList(i).or_width)/Options.ThSize;
    FileList(i).scalefactor_gy = max(FileList(i).or_height, FileList(i).or_width)/Options.GySize;
    % aici check : daca e aproape de N, fa-l N
    if Options.smartscale % acum doar closest, aci mai tirziu smaller, larger
        FileList(i).scalefactor_th = round(FileList(i).scalefactor_th);
        FileList(i).scalefactor_gy = round(FileList(i).scalefactor_gy);
    end;
    
    if FileList(i).scalefactor_th < 1 FileList(i).scalefactor_th = 1; end;
    if FileList(i).scalefactor_gy < 1 FileList(i).scalefactor_gy = 1; end;         
    
    FileList(i).th_height = round(FileList(i).or_height/FileList(i).scalefactor_th);
    FileList(i).th_width = round(FileList(i).or_width/FileList(i).scalefactor_th);
    FileList(i).gy_height = round(FileList(i).or_height/FileList(i).scalefactor_gy);
    FileList(i).gy_width = round(FileList(i).or_width/FileList(i).scalefactor_gy);    
end;

% verifica Dir.Src, Dest, daca mai exista

Contact us