Next / Previous / Contents / Shipman's homepage

11. class MarginSet: Four margin sizes

See Section 4.5, “class MarginSet: Four margin dimensions”.

fohelpers.py
# - - - - -   c l a s s   M a r g i n S e t

class MarginSet(object):
    '''Represents a set of four margin sizes.

      Exports:
        MarginSet(top="0.0in", bot="0.0in", left="0.0in",
                  right="0.0in"):
          [ arguments are valid XSL-FO dimensions ->
              return a new MarginSet instance representing top
              margin (top), bottom margin (bot), left margin
              (left), and right margin (right) ]
        .top, .bot, .left, .right:  [ as passed to constructor ]
        .dict():
          [ return a dict whose keys are "margin-top", etc.,
            with corresponding values from self.top, etc. ]
        .__str__():    [ return self as a string ]
    '''