From: Arthur H. <art...@fr...> - 2005-04-26 15:21:04
|
Hello, I noticed an error in the documentation of Allegro. The documentation states about set_clip_rect() : [---] Pass the coordinates of the top-left and bottom-right corners of the clipping rectangle in this order; these are both inclusive, i.e. set_clip_rect(bitmap, 16, 16, 32, 32) will allow drawing to (16, 16) and (32, 32), but not to (15, 15) and (33, 33). [---] This doesn't explain anything about the inclusive-ness : should the coordinates of the corners be inclusive or exclusive, they will never allow drawing to (15, 15) and (33, 33) since those are clearly out of the rectangle. The difference between inclusive and exclusive will be noticed by drawing to (16, 16) and (32, 32) : inclusive will allow, exclusive will refuse. So here is my change : i.e. set_clip_rect(bitmap, 16, 16, 32, 32) will allow drawing to (17, 17) and (31, 31), as well as (16, 16) and (32, 32). You may find the patch attached. -- Greetings, A.H. |