Annotation of pmsdk/samples/fatpel/readme, revision 1.1.1.1

1.1       root        1: Comments about FATPEL
                      2: 
                      3: 
                      4: Note:
                      5: -----
                      6: 
                      7: You must run "make opendlg" and include the ..\dll directory in your
                      8: libpath before attempting to make or execute this application.
                      9: 
                     10: 
                     11: Description:
                     12: ------------
                     13: 
                     14: FatPels displays a "magnified" coordinate space with some object
                     15: rendered into it.
                     16: 
                     17: This program illustrates the diamond metric, which is:
                     18: 
                     19:     1) Round control points to the nearest integer.
                     20:     2) Draw the mathematical object onto an imaginary grid where a diamond
                     21:        surrounds each pel, the tips of which exactly touch the tips of
                     22:        similar diamonds around each surrounding pel.
                     23:     3) If the object drawn enters the diamond of a pel, turn on the pel.
                     24:     4) In the case of a tie between pels, turn on the lower one
                     25:        (in whichever dimension has the tie).
                     26: 
                     27: Gpi actually restricts this rule by requiring that the object
                     28: touch the cross drawn between opposing vertices of the diamond.
                     29: 
                     30: To see the effect of rendering different objects, click in the window
                     31: to add control points, or select a different output primitive from the
                     32: Primitive menu.  You can add points by clicking with the left button,
                     33: remove them by clicking on them with the right.  If you click on a point
                     34: and hold the button down, you can drag the point around the window, with
                     35: the mathematical and rendered curves following you.  You can insert
                     36: points into a line segment by clicking on the line.
                     37: 
                     38: To see the effect of rendering at different scales, resize the
                     39: pels (menu command: PelSize Set pel size and shape ...).
                     40: The dimensions of the target coordinate space are determined by how
                     41: many pels of the given size will fit in the program's window.  The
                     42: sample control points follow the corners of the target space.
                     43: Resizing the window will cause a reevaluation of how many pels will fit.
                     44: 
                     45: You can "touch up" a rendered object by entering "edit color" mode, by
                     46: selecting "Colors Edit pel colors".  The cursor shape changes to a
                     47: hollow diamond to let you know that mouse clicks will affect pel color
                     48: rather than control point positions.  Click on the left button to set a
                     49: pel to the foreground color (i.e. color of rendered object), or the
                     50: right button for the background (i.e. field) color.
                     51: 
                     52: You can see the true (subject to the resolution of your monitor)
                     53: "mathematical" object by disabling rounding of control points.
                     54: The control points must be rounded for the object to correspond to
                     55: the rendered pels, according to rule (1), but it might interest you
                     56: to see how your intended object is distorted.
                     57: 
                     58: Note:  I repaint the window by drawing one pel into the lower left
                     59:        corner, then calling GpiBitBlt to copy it up a column, then
                     60:        copy the column across to the right.  If the lower left corner
                     61:        is clipped, then whatever happens to be covering it will get
                     62:        copied all over the window. This "feature" is for speeding
                     63:        up the repaint. To clean it up, bring the window to the top
                     64:        and issue a redraw command.
                     65: 
                     66: 
                     67: Program commands:
                     68: -----------------
                     69: 
                     70: File
                     71:     Save bitmap ...
                     72:        Allow current "fatpel" screen to be saved as a BMP format file.
                     73:        Note:  this command reads the bits that are on the screen, so
                     74:        if there's garbage in the window, it will be saved.
                     75: 
                     76:     About ...
                     77:        Show the credits and version number.
                     78: 
                     79: Display
                     80:     Rendered object
                     81:        Display the mathematical object rendered into the small bitmap,
                     82:        as fat pels.
                     83: 
                     84:     Mathematical object
                     85:        Display the "mathematical" object, i.e. drawn to the original
                     86:        coordinates in the window, rather than the transformed down
                     87:        coordinates in the small bitmap.
                     88: 
                     89:     Control points
                     90:        Display markers for the control points.
                     91: 
                     92:     Crosshairs
                     93:        Display the crosshairs in the center of each pel.
                     94: 
                     95:     Pel borders
                     96:        Draw a border (in the crosshair color) around each pel.
                     97: 
                     98:     Rounded control points
                     99:        Round the control points before drawing, to mimic the way
                    100:        Gpi does it.  To see whether the curve follows the
                    101:        diamond metric correctly, the mathematical object must be
                    102:        drawn with its control points rounded to the nearest pel.
                    103:        Note: Selecting control points is difficult with this option on,
                    104:        because they are not displayed at their true locations.
                    105: 
                    106:     Auto redraw after changes
                    107:        Automatically redraw the image after any changes.
                    108: 
                    109: Primitive
                    110:     None
                    111:        Don't draw anything on the grid.
                    112: 
                    113:     GpiPolyline
                    114:     GpiPolyFillet
                    115:     GpiPolySpline
                    116:     GpiPointArc
                    117:        Draw with the given primitive.  In the case of primitives which
                    118:        require points in groups of a given size (e.g. GpiPolySpline),
                    119:        some points may be truncated when calling GPI.
                    120: 
                    121: Colors
                    122:     Set colors ...
                    123:        Allows various colors used by the program to be changed.
                    124:        In RGB mode, the color values are presented in hexadecimal
                    125:        notation, since it's easier to see the different color
                    126:        components that way.  You can still type in decimal numbers.
                    127:        In RGB mode, dithering is allowed.  Note that when going
                    128:        from RGB to non-RGB (default color index table) mode, the
                    129:        values are mapped to their nearest equivalents on your
                    130:        display device.
                    131: 
                    132:     Edit pel colors
                    133:        Sets the mouse pointer mode to "edit color".  The pointer shape
                    134:        will change to a hollow diamond.  Click with the left button to
                    135:        change a fat pel to the rendered object's color.  Click with the
                    136:        right button to set a pel to the field color.  Select this command
                    137:        again to return to "edit control point" pointer mode.
                    138: 
                    139: PelSize
                    140:     Set pel size and shape ...
                    141:        Set the pel size to whatever is desired.
                    142: 
                    143:     Drag pel size
                    144:        Allows the pel size to be specified by dragging a rectangle on the
                    145:        window.  The rectangle must be dragged from lower left to upper
                    146:        right.  The cursor will change when a button is held down, and
                    147:        a tracking rectangle will appear.  Clicking in the window with
                    148:        this option on will cause the pel to be resized to 1 by 1.
                    149: 
                    150: Redraw
                    151:        Redraw the screen with the current selections.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.