diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2008-11-27 23:31:37 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2008-11-27 23:31:37 +0000 |
commit | 2f38e9af2f7d9cc6419a3e5b7da46c718860f7bf (patch) | |
tree | 2029d26f3cab9fb67b8fbe2d0a9604f94ea9bcfc /nuttx/include | |
parent | fba977e7cbd18b64cd2ecfc07cb7c9be8e40f6c5 (diff) |
More graphic support routines
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@1321 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/include')
-rw-r--r-- | nuttx/include/nuttx/nxglib.h | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/nuttx/include/nuttx/nxglib.h b/nuttx/include/nuttx/nxglib.h index cc065ab6ab..28df97ab29 100644 --- a/nuttx/include/nuttx/nxglib.h +++ b/nuttx/include/nuttx/nxglib.h @@ -306,6 +306,89 @@ EXTERN void nxgl_copyrectangle_32bpp(FAR struct fb_planeinfo_s *pinfo, FAR const struct nxgl_point_s *origin, unsigned int srcstride); +/**************************************************************************** + * Name: nxgl_rectcopy + * + * Description: + * This is essentially memcpy for rectangles. We don't do structure + * assignements because some compilers are not good at that. + * + ****************************************************************************/ + +EXTERN void nxgl_rectcopy(FAR struct nxgl_rect_s *dest, + FAR const struct nxgl_rect_s *src); + +/**************************************************************************** + * Name: nxgl_rectoffset + * + * Description: + * Offset the rectangle position by the specified dx, dy values. + * + ****************************************************************************/ + +EXTERN void nxgl_rectoffset(FAR struct nxgl_rect_s *dest, + FAR const struct nxgl_rect_s *src, + nxgl_coord_t dx, nxgl_coord_t dy); + +/**************************************************************************** + * Name: nxgl_vectoradd + * + * Description: + * Add two 2x1 vectors and save the result to a third. + * + ****************************************************************************/ + +EXTERN void nxgl_vectoradd(FAR struct nxgl_point_s *dest, + FAR const struct nxgl_point_s *v1, + FAR const struct nxgl_point_s *v2); + +/**************************************************************************** + * Name: nxgl_rectintersect + * + * Description: + * Return the rectangle representing the intersection of the two rectangles. + * + ****************************************************************************/ + +EXTERN void nxgl_rectintersect(FAR struct nxgl_rect_s *dest, + FAR const struct nxgl_rect_s *src1, + FAR const struct nxgl_rect_s *src2); + +/**************************************************************************** + * Name: nxgl_nonintersecting + * + * Description: + * Return the regions of rectangle rect 1 that do not intersect with + * rect2. This may be up to founr rectangles some of which may be + * degenerate (and can be picked off with nxgl_nullrect) + * + ****************************************************************************/ + +EXTERN void nxgl_nonintersecting(FAR struct nxgl_rect_s result[4], + FAR const struct nxgl_rect_s *rect1, + FAR const struct nxgl_rect_s *rect2); + +/**************************************************************************** + * Name: nxgl_rectoverlap + * + * Description: + * Return TRUE if the two rectangles overlap + * + ****************************************************************************/ + +EXTERN boolean nxgl_rectoverlap(FAR struct nxgl_rect_s *rect1, + FAR struct nxgl_rect_s *rect2); + +/**************************************************************************** + * Name: nxgl_nullrect + * + * Description: + * Return TRUE if the area of the retangle is <= 0. + * + ****************************************************************************/ + +EXTERN boolean nxgl_nullrect(FAR const struct nxgl_rect_s *rect); + #undef EXTERN #if defined(__cplusplus) } |