mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-02 06:20:14 +01:00
add two out params giving number of cols and rows
This commit is contained in:
parent
d72526ff84
commit
26f5a0b269
2 changed files with 7 additions and 2 deletions
|
@ -1458,7 +1458,8 @@ board_invalRect( BoardCtxt* board, XP_Rect* rect )
|
||||||
|
|
||||||
#ifdef XWFEATURE_ACTIVERECT
|
#ifdef XWFEATURE_ACTIVERECT
|
||||||
XP_Bool
|
XP_Bool
|
||||||
board_getActiveRect( const BoardCtxt* board, XP_Rect* rect )
|
board_getActiveRect( const BoardCtxt* board, XP_Rect* rect,
|
||||||
|
XP_U16* nColsP, XP_U16* nRowsP )
|
||||||
{
|
{
|
||||||
XP_Bool found = XP_FALSE;
|
XP_Bool found = XP_FALSE;
|
||||||
XP_USE( rect );
|
XP_USE( rect );
|
||||||
|
@ -1506,6 +1507,9 @@ board_getActiveRect( const BoardCtxt* board, XP_Rect* rect )
|
||||||
rect->width = (lowerRight.left + lowerRight.width) - upperLeft.left;
|
rect->width = (lowerRight.left + lowerRight.width) - upperLeft.left;
|
||||||
rect->height = (lowerRight.top + lowerRight.height) - upperLeft.top;
|
rect->height = (lowerRight.top + lowerRight.height) - upperLeft.top;
|
||||||
|
|
||||||
|
*nColsP = maxCol - minCol + 1;
|
||||||
|
*nRowsP = maxRow - minRow + 1;
|
||||||
|
|
||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -97,7 +97,8 @@ void board_setTimerLoc( BoardCtxt* board,
|
||||||
void board_invalAll( BoardCtxt* board );
|
void board_invalAll( BoardCtxt* board );
|
||||||
void board_invalRect( BoardCtxt* board, XP_Rect* rect );
|
void board_invalRect( BoardCtxt* board, XP_Rect* rect );
|
||||||
#ifdef XWFEATURE_ACTIVERECT
|
#ifdef XWFEATURE_ACTIVERECT
|
||||||
XP_Bool board_getActiveRect( const BoardCtxt* board, XP_Rect* rect );
|
XP_Bool board_getActiveRect( const BoardCtxt* board, XP_Rect* rect,
|
||||||
|
XP_U16* nCols, XP_U16* nRows );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
XP_Bool board_draw( BoardCtxt* board );
|
XP_Bool board_draw( BoardCtxt* board );
|
||||||
|
|
Loading…
Reference in a new issue