Changeset 0e6e77f in mainline for uspace/lib/gfx/src/coord.c
- Timestamp:
- 2020-02-28T15:44:55Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a8eed5f
- Parents:
- 2a515dcd
- git-author:
- Jiri Svoboda <jiri@…> (2020-02-26 18:26:13)
- git-committer:
- Jiri Svoboda <jiri@…> (2020-02-28 15:44:55)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/gfx/src/coord.c
r2a515dcd r0e6e77f 235 235 } 236 236 237 /** Get rectangle dimensions. 238 * 239 * Get a vector containing the x, y dimensions of a rectangle. These are 240 * always nonnegative. 241 * 242 * @param rect Rectangle 243 * @param dims Place to store dimensions 244 */ 245 void gfx_rect_dims(gfx_rect_t *rect, gfx_coord2_t *dims) 246 { 247 gfx_rect_t srect; 248 249 gfx_rect_points_sort(rect, &srect); 250 gfx_coord2_subtract(&srect.p1, &srect.p0, dims); 251 } 252 237 253 /** Return true if pixel at coordinate @a coord lies within rectangle @a rect. */ 238 254 bool gfx_pix_inside_rect(gfx_coord2_t *coord, gfx_rect_t *rect)
Note:
See TracChangeset
for help on using the changeset viewer.