Changeset afcf704 in mainline for uspace/lib/gfx/src/coord.c
- Timestamp:
- 2020-06-14T22:23:34Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c45d8696
- Parents:
- 28f8f6f2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/gfx/src/coord.c
r28f8f6f2 rafcf704 255 255 } 256 256 257 /** Return true if rectangle @a a is contained in rectangle @a b. 258 * 259 * @param a Inside rectangle 260 * @param b Outside rectangle 261 * @return @c true iff @a a is (non-strictly) inside @a b 262 */ 263 bool gfx_rect_is_inside(gfx_rect_t *a, gfx_rect_t *b) 264 { 265 gfx_rect_t sa; 266 gfx_rect_t sb; 267 268 gfx_rect_points_sort(a, &sa); 269 gfx_rect_points_sort(b, &sb); 270 271 if (sa.p0.x < sb.p0.x || sa.p0.y < sb.p0.y) 272 return false; 273 274 if (sa.p1.x > sb.p1.x || sa.p1.y > sb.p1.y) 275 return false; 276 277 return true; 278 } 279 257 280 /** Get rectangle dimensions. 258 281 *
Note:
See TracChangeset
for help on using the changeset viewer.