In character mode lines and boxes take up a complete row and /or column. With a GUI like Windows or a Web Browser, these objects need to utilize only a few pixels. As a result, lines and boxes may not line up as they did with a character mode screen.
By default Vermont Views for Windows draws boxes around the OUTSIDE of the cell and draws lines in the CENTER of the cell. While this will work fine in most situations, it is possible to change the default behavior by setting the following options when calling v_line(), bg_linedef() or bg_boxdef()
| The following new flags can be applied with the 'dir' argument of v_line() or bg_linedef(), IE
RIGHT | X_TOP | X_OUTSIDE. They can also be applied to the new 'flags' member of the bg structure. IE.BG_LINEPTR bgLinep->flags |= X_BOTTOM | X_CENTER; BG_BOXTR bgBoxp->flags |= X_BOTTOM | X_CENTER; |
|
| New flags in Vermont Views for Windows that affect line / box drawing | |
| X_TOP | v_line() draws horizontal line at top of cell
v_line() draws vertical from top of top cell to top of bottom cell bg_boxdef() draws a box at the top edge of the top cell X_CENTER | X_TOP v_line() draws vertical from top edge of top cell to center of bottom cell bg_boxdef() draws a box centered at the top edge of the top cell |
| X_BOTTOM | v_line() draws horizontal line at bottom of cell
v_line() draws vertical from bottom of bottom cell to bottom of top cell bg_boxdef() draws a box at the bottom edge of the bottom cell X_CENTER | X_BOTTOM v_line() draws vertical line from center of top cell to bottom edge of bottom cell bg_boxdef() draws a box centered at the bottom edge of the bottom cell |
| X_CENTER | v_line() default
bg_boxdef() draws a box centered in the cell |
| X_RIGHT | v_line() draws vertical line at right of cell
bg_boxdef() draws a box at the right edge of the right cell |
| X_CENTER | X_RIGHT
v_line() draws horizontal line from center of left cell to right edge of right cell bg_boxdef() draws a box centered at the right edge of the right cell |
|
| X_LEFT | v_line() draws vertical line at left of cell
bg_boxdef() draws a box at the left edge of the left cell |
| X_CENTER | X_LEFT
v_line() draws horizontal line from left edge of left cell to center of right cell bg_boxdef() draws a box centered at the left edge of the left cell |
|
| X_FILL | v_line() draws a line and maintains it's size relationship when window resizes
* Depends on line direction: RIGHT - from rb to end of row LEFT - from rb to beginning of row DOWN - from cb to bottom of column RIGHT - from cb to top of column bg_boxdef() N/A |
| X_OUTSIDE | bg_boxdef() default (same as X_EDGE)
vline()/bg_linedef() * Depends on line direction: RIGHT - outside cells horizontally LEFT - outside cells horizontally DOWN - outside cells vertically UP - outside cells vertically |
| X_EDGE | vline()/bg_linedef() N/A
bg_boxdef() default (same as X_OUTSIDE) |
* See the tutorial program lineForm.c in the \vvwin\Samples\BoxLineDraw directory for an example of v_line(), bg_linedef() options. See 3dDraw.c in same directory for an example of bg_boxdef() options.