Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Faxual II for CA-Clipper - <b>rip functions</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 RIP Functions
 Overview
------------------------------------------------------------------------------

    RIP stands for Raster Image Processor.  A RIP is the processor that runs
    a printer.  The Faxual II RIP performs the same function.  It is a
    software RIP that produces fax files.

    Faxual II fax files are stored in TIFF-F format.  TIFF, or Tagged Image
    File Format, is a format for binary bitmap images.  TIFF-F is a version
    of TIFF designed for fax images.  It stores multiple-page images in the
    same compressed data format that fax machines use.

    To create a fax file, first initialize the RIP with RipBegin().  Then
    draw text and graphics on the page with other RIP functions.  When you
    are finished with a page, call RipEject() to write the page to the file
    and start a new page.  When the file is complete, call RipEnd() to close
    the file.

    The RIP lets you draw on the page in any order, like a laser printer.
    You do not have to work from top to bottom, or left to right.

    The Faxual II RIP can also create fax files in DCX format.  DCX files
    are used by CAS modems, like the Intel SatisFAXtion.  Faxual II cannot
    use DCX files itself, but can create them for use by these other modems.
    Use RipBeginDCX() instead of RipBegin() to create a DCX file.

 X/Y Coordinates

    Positions on the page are expressed in X/Y coordinates.  X is the
    horizontal coordinate, measured from the left edge of the page, and Y is
    the vertical coordinate, measured from the top edge.  (You can change
    where the measurements start by moving the RIP origin.)  This may seem
    backwards from the usual Clipper scheme, where the vertical (row)
    position comes first and the horizontal (column) comes second.

    Since Faxual II allows multiple font sizes and variable character widths
    (proportional spacing), the measurement unit must be smaller than the
    character size.  The default unit is 1/200 of an inch, which is the size
    of one pixel on a fax machine in high resolution.  In low resolution,
    there are 200 pixels per inch horizontally, but only 100 vertically.
    (But we still measure in 200ths of an inch both ways.)  If you prefer
    other units, like inches, points, or centimeters, you can change scales
    with RipUnit().

    X/Y Coordinate Functions
    ----------------------------------------------------------------------
    Function        Purpose
    ----------------------------------------------------------------------
    RipUnit         Change size of RIP unit.
    RipOrigin       Move X/Y origin.
    RipXOrigin      Get/set origin X position.
    RipYOrigin      Get/set origin Y position.
    RipCurX         Get/set current X position.
    RipCurY         Get/set current Y position.
    RipMoveTo       Set current position.
    RipMoveRel      Move current position.
    ----------------------------------------------------------------------

 Row/Column Coordinates

    If you prefer to use Clipper-style positioning, there are RIP functions
    that take row/column coordinates instead of X/Y.  These are convenient
    for converting programs intended for a normal printer.  They work best
    when used with a single fixed-pitch font.

    When using row/column positioning, be sure to set the origin correctly.
    Faxual II positions text by the baseline, not the top of the character,
    so if you leave the origin at the default position (the top left corner
    of the page) and try to write on row zero, most of the characters will
    be cut off, off the top of the page.

    Row/Column Coordinate Functions
    ----------------------------------------------------------------------
    Function        Purpose
    ----------------------------------------------------------------------
    RipCol          Get/set current column.
    RipColUnit      Get/set column width.
    RipPos          Set current position.
    RipRCUnits      Set row height and column width.
    RipRow          Get/set current row.
    RipRowUnit      Get/set row height.
    ----------------------------------------------------------------------

 Drawing Text

    Text is drawn using the current font set by RipFont().  RipTextOp() sets
    the text operator, which allows special effects like underlining and
    white-on-black text.

    Text Output Functions
    ----------------------------------------------------------------------
    Function        Purpose
    ----------------------------------------------------------------------
    RipCJust        Center a line of text (X/Y).
    RipFont         Get/set current font.
    RipLJust        Left-justify a line of text (X/Y).
    RipRCCJust      Center a line of text (row/column).
    RipRCLJust      Left-justify a line of text (row/column).
    RipRCRJust      Right-justify a line of text (row/column).
    RipRJust        Right-justify a line of text (X/Y).
    RipTextOp       Get/set text operator.
    RipTextSize     Get size of text.
    RipWrite        Write text at current position.
    ----------------------------------------------------------------------

 Other Drawing Functions

    Other Drawing Functions
    ----------------------------------------------------------------------
    Function        Purpose
    ----------------------------------------------------------------------
    RipDrawRect     Draw rectangular outline.
    RipFillRect     Fill rectangle with gray.
    ----------------------------------------------------------------------

    RipFillRect() can also be used to draw horizontal or vertical lines.

 A Confession

    Although we claim that fax pixels are 1/200 of an inch, the truth is
    more complicated.  In fact, they are a bit under 1/204" horizontally,
    and a bit over 1/196" vertically (or 1/98" low-resolution).

    We use the 200-per-inch figure everywhere in the documentation (except
    here).  The error is only about two percent in each direction, and it
    makes calculations much easier.  Also, many plain-paper fax machines,
    and most fax software programs, actually print at 200 DPI.

    This error means that faxes sent to some machines will end up printed
    slightly taller and narrower than you expect.  The width should not be a
    problem, but the extra height (about 1/4" on an 11" page) could result
    in some text being lost from the bottom of a full page.

    Also remember that Faxual II adds a header, about 3/16" tall, to the top
    of each page.  This can push even more text off the page.  Leaving a
    border of at least 1/2" at the bottom of an 11" page should prevent any
    such problems.

See Also:

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson