gfx.c
changeset 4958 aaa8a92059bf
parent 4954 d773d01b35f5
child 5108 dc67d70b5a45
--- a/gfx.c	Fri Oct 27 11:08:17 2006 +0000
+++ b/gfx.c	Fri Oct 27 11:09:24 2006 +0000
@@ -1906,6 +1906,18 @@
 	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;