forked from mirror/OpenTTD
(svn r6957) -Cleanup: comments, coding style
This commit is contained in:
12
gfx.c
12
gfx.c
@@ -1906,6 +1906,18 @@ void MarkWholeScreenDirty(void)
|
||||
SetDirtyBlocks(0, 0, _screen.width, _screen.height);
|
||||
}
|
||||
|
||||
/** Set up a clipping area for only drawing into a certain area. To do this,
|
||||
* Fill a DrawPixelInfo object with the supplied relative rectangle, backup
|
||||
* the original (calling) _cur_dpi and assign the just returned DrawPixelInfo
|
||||
* _cur_dpi. When you are done, give restore _cur_dpi's original value
|
||||
* @param *n the DrawPixelInfo that will be the clipping rectangle box allowed
|
||||
* for drawing
|
||||
* @param left,top,width,height the relative coordinates of the clipping
|
||||
* rectangle relative to the current _cur_dpi. This will most likely be the
|
||||
* offset from the calling window coordinates
|
||||
* @return return false if the requested rectangle is not possible with the
|
||||
* current dpi pointer. Only continue of the return value is true, or you'll
|
||||
* get some nasty results */
|
||||
bool FillDrawPixelInfo(DrawPixelInfo *n, int left, int top, int width, int height)
|
||||
{
|
||||
const DrawPixelInfo *o = _cur_dpi;
|
||||
|
Reference in New Issue
Block a user