lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Understanding the eps bounding box (rounding)


From: karl
Subject: Re: Understanding the eps bounding box (rounding)
Date: Fri, 2 Mar 2018 01:25:07 +0100 (CET)

In my

 PostScript Language
 Document Structuring
 Conventions Specification
 Adobe Developer Support
 Version 3.0
 25 September 1992

possible downloadable from
 https://archive.org/details/ps-doc-struc-conv-3

it says:

%%BoundingBox: { <llx> <lly> <urx> <ury> } | (atend)
               <llx> ::= <int>                       (Lower left x coordinate)
               <lly> ::= <int>                       (Lower left y coordinate)
               <urx> ::= <int>                       (Upper right x coordinate)
               <ury> ::= <int>                       (Upper right y coordinate)
               This comment specifies the bounding box that encloses all marks 
painted
               on all pages of a document. That is, it must be a "high water 
mark" in all
               directions for marks made on any page. The four arguments 
correspond to
               the lower left (llx, lly) and upper right corners (urx, ury) of 
the bounding box
               in the default user coordinate system (PostScript units). See 
also the
               %%PageBoundingBox: comment.

I.e., according to spec, the numbers describe a box that encloses 
everything. It doesn't say it must the smallest such box.
Same thing for PageBoundingBox.

That is in contrast to:

PostScript language reference manual, 3rd ed, TABLE 5.3:

FontBBox array (Required) An array of four numbers in the glyph coordinate 
system giving
               the left, bottom, right, and top coordinates, respectively, of 
the font bounding
               box. The font bounding box is the smallest rectangle enclosing 
the shape that
               would result if all of the glyphs of the font were placed with 
their origins co-
               incident, and then painted. This information is used in making 
decisions
               about glyph caching and clipping. If all four values are 0, the 
PostScript inter-
               preter makes no assumptions based on the font bounding box.

where they specify the smallest one, but for fonts and other
parts of pages, not whole pages.

...
> Does the -80 mean:
> 
>   * any value between -79 and -80
>   * any value between -79.5 and -80.4999999
...

So, if the leftmost painted things is at e.g. -79.1 then llx <= -80,
since llx >= -79 wouldn't do.

Regards,
/Karl Hammar

-----------------------------------------------------------------------
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57





reply via email to

[Prev in Thread] Current Thread [Next in Thread]