| 2096 | } |
| 2097 | |
| 2098 | void GuiCanvas::addUpdateRegion(Point2I pos, Point2I ext) |
| 2099 | { |
| 2100 | if(mCurUpdateRect.extent.x == 0) |
| 2101 | { |
| 2102 | mCurUpdateRect.point = pos; |
| 2103 | mCurUpdateRect.extent = ext; |
| 2104 | } |
| 2105 | else |
| 2106 | { |
| 2107 | Point2I upperL; |
| 2108 | upperL.x = getMin(mCurUpdateRect.point.x, pos.x); |
| 2109 | upperL.y = getMin(mCurUpdateRect.point.y, pos.y); |
| 2110 | Point2I lowerR; |
| 2111 | lowerR.x = getMax(mCurUpdateRect.point.x + mCurUpdateRect.extent.x, pos.x + ext.x); |
| 2112 | lowerR.y = getMax(mCurUpdateRect.point.y + mCurUpdateRect.extent.y, pos.y + ext.y); |
| 2113 | mCurUpdateRect.point = upperL; |
| 2114 | mCurUpdateRect.extent = lowerR - upperL; |
| 2115 | } |
| 2116 | } |
| 2117 | |
| 2118 | void GuiCanvas::resetUpdateRegions() |
| 2119 | { |
no test coverage detected