Changeset fb420e48 in mainline for uspace/lib/gfx/src/coord.c
- Timestamp:
- 2019-12-16T13:47:33Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8e9781f
- Parents:
- c2250702
- git-author:
- Jiri Svoboda <jiri@…> (2019-12-15 13:47:28)
- git-committer:
- Jiri Svoboda <jiri@…> (2019-12-16 13:47:33)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/gfx/src/coord.c
rc2250702 rfb420e48 189 189 } 190 190 191 /** Return true if pixel at coordinate @a coord lies within rectangle @a rect. */ 192 bool gfx_pix_inside_rect(gfx_coord2_t *coord, gfx_rect_t *rect) 193 { 194 gfx_rect_t sr; 195 196 gfx_rect_points_sort(rect, &sr); 197 198 if (coord->x < sr.p0.x || coord->y < sr.p0.y) 199 return false; 200 201 if (coord->x >= sr.p1.x || coord->y >= sr.p1.y) 202 return false; 203 204 return true; 205 } 206 191 207 /** @} 192 208 */
Note:
See TracChangeset
for help on using the changeset viewer.