Changeset 19414 for trunk/Mars/mbase


Ignore:
Timestamp:
12/04/18 20:06:36 (6 years ago)
Author:
tbretz
Message:
There was a bug in the order, that's why the first page sometimes was not properly scaled.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mbase/MStatusDisplay.cc

    r19407 r19414  
    28742874
    28752875        //
     2876        // 28 is used here to scale the canvas into a height of 28,
     2877        // such that the page title can be set above the canvas...
     2878        //
     2879        Float_t psw = 28.0; // A4 - width  (29.7)
     2880        Float_t psh = 21.0; // A4 - height (21.0)
     2881
     2882        const Float_t cw = c->GetWw();
     2883        const Float_t ch = c->GetWh();
     2884
     2885        if (psw/psh>cw/ch)
     2886            psw = cw/ch*psh;
     2887        else
     2888            psh = ch/cw*psw;
     2889
     2890        PSToolsRange(*ps, psw, psh);
     2891
     2892        //
    28762893        // Init page and page size, make sure, that the canvas in the file
    28772894        // has the same Aspect Ratio than on the screen.
     
    28792896        if (type==1 || i>from)
    28802897            ps->NewPage();
    2881 
    2882         //
    2883         // 28 is used here to scale the canvas into a height of 28,
    2884         // such that the page title can be set above the canvas...
    2885         //
    2886         Float_t psw = 28.0; // A4 - width  (29.7)
    2887         Float_t psh = 21.0; // A4 - height (21.0)
    2888 
    2889         const Float_t cw = c->GetWw();
    2890         const Float_t ch = c->GetWh();
    2891 
    2892         if (psw/psh>cw/ch)
    2893             psw = cw/ch*psh;
    2894         else
    2895             psh = ch/cw*psw;
    2896 
    2897         PSToolsRange(*ps, psw, psh);
    28982898
    28992899        //
Note: See TracChangeset for help on using the changeset viewer.