Next / Previous / Contents / Shipman's homepage

12. class PageDim: Page layout

An instance of this class represents a general page layout; see Section 4.6, “class PageDim: Page layout”.

fohelpers.py
# - - - - -   c l a s s   P a g e D i m

class PageDim(object):
    '''Represents a page layout.

      Exports:
        PageDim(pageBox, pageMargins=None, frameMargins=None,
                bodyMargins=None):
          [ (pageBox is the paper size as a Box instance) and
            (pageMargins represents the page margins as a MarginSet
            instance, defaulting to no margins) and
            (frameMargins represents the header and footer
            heights as a MarginSet instance, defaulting to zero) and
            (bodyMargins represents the margin above and below
            the body as a MarginSet instance, defaulting to zero) ->
              return a new PageDim instance representing
              that layout ]
        .pageBox:      [ as passed to constructor ]
        .pageMargins:  [ as passed to constructor ]
        .frameMargins: [ as passed to constructor ]
        .bodyMargins:  [ as passed to constructor ]

      Invariants:
        .pageMargins, .frameMargins, and .bodyMargins always
        contain a MarginSet instance.
    '''