home *** CD-ROM | disk | FTP | other *** search
- /*
- winpaint.c 1/26/88
-
- % functions that paint from a window to the display given win char coords.
- Ted.
-
- OWL 1.1
- Copyright (c) 1988, by Oakland Group, Inc.
- ALL RIGHTS RESERVED.
-
- Revision History:
- -----------------
- 6/30/88 Ted Changed from cmwin_Paint funcs to win_PaintBox funcs.
- 10/30/88 Ted Relocated scroll and clear functions.
-
- 5/24/89 jmd prettified up some things...
- */
- /* -------------------------------------------------------------------------- */
- #include "oakhead.h"
- #include "disppriv.h"
-
- /* -------------------------------------------------------------------------- */
- void win_PaintRow(win, row, col, length)
- win_type win;
- int row, col, length;
- /*
- Repaint the a portion of window 'win' at 'row', 'col', length 'length'
- (For use when the window above has been removed.)
- */
- {
- ocbox cbox; /* Painting char coords relative to win */
-
- if (win != NULL && length != 0) {
- if (length < 0) {
- length = - length;
- col -= length;
- }
-
- cbox.toprow = row;
- cbox.leftcol = col;
- cbox.botrow = row;
- cbox.rightcol = col + length - 1;
-
- win_PaintBox(win, &cbox);
- }
- }
- /* -------------------------------------------------------------------------- */
- void win_PaintCol(win, row, col, length)
- win_type win;
- int row, col, length;
- /*
- Repaint the a portion of window 'win' at 'row', 'col', length 'length'
- (For use when the window above has been removed.)
- */
- {
- ocbox cbox; /* Painting char coords relative to win */
-
- if (win != NULL && length != 0) {
- if (length < 0) {
- length = - length;
- row -= length;
- }
-
- cbox.toprow = row;
- cbox.leftcol = col;
- cbox.botrow = row + length - 1;
- cbox.rightcol = col;
-
- win_PaintBox(win, &cbox);
- }
- }
- /* -------------------------------------------------------------------------- */
- void win_PaintBox(win, cboxp)
- win_type win;
- ocbox *cboxp; /* Clipping coords relative to win */
- /*
- Paints part of a window's image to the display.
- */
- {
- opbox box; /* display coords */
-
- if (win != NULL) {
- ocbox_pixcoords(cboxp, win_GetFont(win), &box);
-
- win_PaintPixBox(win, &box);
- }
- }
- /* -------------------------------------------------------------------------- */
-
-