Menu

Units of measurement in PostScript saved file

Paulo Ney
2019-12-22
2019-12-25
  • Paulo Ney

    Paulo Ney - 2019-12-22

    When you open and Xfig window and position four letters N, S, E, W on the canvas and Export if to PS + LaTeX you get an EPS file that contains a pretty normal BoundingBox:

    %%BoundingBox: 0 0 825 666

    whose units are definitely measured in PS points... but the four letters are positioned with a set of coordinate units that look a bit different -- they are measured from the top-left corner down to the rest of the picture and the units have a range which is different than points. What are they?

    %
    % Fig objects follow
    %
    %
    % here starts figure with depth 50
    /Times-Roman ff 190.50 scf sf
    6210 315 m
    gs 1 -1 sc (N) col0 sh gr
    /Times-Roman ff 190.50 scf sf
    6300 10710 m
    gs 1 -1 sc (S) col0 sh gr
    /Times-Roman ff 190.50 scf sf
    13005 5040 m
    gs 1 -1 sc (E) col0 sh gr
    /Times-Roman ff 190.50 scf sf
    45 5310 m
    gs 1 -1 sc (W) col0 sh gr
    % here ends figure;

    where the two coordinates below the /Times-Roman line set the position. My question is: What is the unit being used. It is definitely NOT PostScript points -- the numbers are too large for that

     

    Last edit: Paulo Ney 2019-12-22
  • tkl

    tkl - 2019-12-22

    In imperial mode, these are 1200 units to the inch. In metric mode, 450 units to the cm. Figures drawn in metric mode are scaled to yield the correct 472 units to the cm. This scaling is the reasons why I would recommend to use imperial mode.

     
  • Paulo Ney

    Paulo Ney - 2019-12-23

    Thanks TKL, but I have a few other questions in sequence ....

    1- What is the name of this unit?
    2- Why is different from the unit used in the BoundingBox
    3- Any reference for this? I am looking at the PS BlueBook and finding nothing ...

     
  • tkl

    tkl - 2019-12-25

    No name, the user scaling is appropriately set up; Attached is the eps of a horizontal, one cm long line. Look at the /pageheader command, defined from line 53: The line 1 -1 sc, converts between the xfig-coordinate system (y pointing downwards) to the ps coordinate system. Then, after setting up the F2psDict, the line 0.06299 0.06299 sc, which scales the 450 units/cm to 72 units / inch. In imperial mode this line would be easier 0.06 0.06 sc, 1200 / inch times 0.06 yields 72 / inch.

    I believe, the above, viz., to set up an user scaling for the integers at what is deemed sufficient resolution for your drawing program, is not an uncommon idiom when generating ps-files.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.