diff options
Diffstat (limited to 'nuttx')
-rw-r--r-- | nuttx/ChangeLog | 3 | ||||
-rw-r--r-- | nuttx/TODO | 12 | ||||
-rw-r--r-- | nuttx/graphics/nxglib/nxglib_nonintersecting.c | 45 |
3 files changed, 45 insertions, 15 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 25f86c225..70496acbe 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -1705,4 +1705,7 @@ OLED with Solomon Systech SD1305 LCD controller. * configs/lpcxpresso-lpc1668/nx: Add a NX graphics configuration for the LPCXPRESO board. + * graphics/nxglib/nxglib_nonintersecting.c: Fix some single bit errors in + calculation of non-intersecting regions. This was causing an anomoaly + in examples/nx in column 0. diff --git a/nuttx/TODO b/nuttx/TODO index ac485d505..24666fc92 100644 --- a/nuttx/TODO +++ b/nuttx/TODO @@ -1,4 +1,4 @@ -NuttX TODO List (Last updated April 12 2011) +NuttX TODO List (Last updated April 19 2011) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ nuttx/ @@ -477,16 +477,6 @@ o Graphics subystem (graphics/) Status: Open Priority: Medium - Description: The apps/examples/nx test using lcd/p14201.c and the configs/lm3s6965-ek - configuration shows two single pixel-wide anomalies. One along - column zero is clearly caused by the NX windowing logic. It is - not certain if these are consequences of the 4bpp logic or if these - are anomalies that have always been in NX, but are only visible - now at the low resolution of the p14201 LCD (128x96). - Update: Same defects in the LPCXpresso a 1bpp (96x64). - Status: Open - Priority: Low (unless you need the p13201 then it is certainly higher). - o Pascal Add-On (pcode/) ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/nuttx/graphics/nxglib/nxglib_nonintersecting.c b/nuttx/graphics/nxglib/nxglib_nonintersecting.c index dcfc2590f..0a77059a0 100644 --- a/nuttx/graphics/nxglib/nxglib_nonintersecting.c +++ b/nuttx/graphics/nxglib/nxglib_nonintersecting.c @@ -88,6 +88,43 @@ void nxgl_nonintersecting(FAR struct nxgl_rect_s result[4], /* Then return the four rectangles representing the regions NON included * in the intersection. Some of these rectangles may be invalid (zero * area), but those can be picked off using nxgl_nullrect() + * + * rect1.pt1 + * +-------------------------+ + * | rect2.pt1 | + * | int.pt1 | + * | +-------------------------+ + * | | | | + * | | | | + * +-------------------------+ | + * | rect1.pt2 | + * | int.pt2 | + * +-------------------------+ + * rect2.pt2 + * rect1.pt1 + * +-------------------------+ + * rect2.pt1 |int.pt1 | + * +---------+---------------+ | + * | | | | + * | | | | + * | | |int.pt2 | + * | +---------------+---------+ + * | | rect1.pt2 + * +-------------------------+ + * rect2.pt2 + * rect2.pt1 + * +-------------------------+ + * | rect1.pt1 | + * | int.pt1 | + * | +-------------------------+ + * | | | | + * | | | | + * | | | | + * +---------+---------------+ | + * | rect2.pt2 | + * | int.pt2 | + * +-------------------------+ + * rect1.pt2 */ result[NX_TOP_NDX].pt1.x = rect1->pt1.x; @@ -100,14 +137,14 @@ void nxgl_nonintersecting(FAR struct nxgl_rect_s result[4], result[NX_BOTTOM_NDX].pt2.x = rect1->pt2.x; result[NX_BOTTOM_NDX].pt2.y = rect1->pt2.y; - result[NX_LEFT_NDX].pt1.x = rect1->pt1.x + 1; + result[NX_LEFT_NDX].pt1.x = rect1->pt1.x; result[NX_LEFT_NDX].pt1.y = intersection.pt1.y; - result[NX_LEFT_NDX].pt2.x = intersection.pt1.x; + result[NX_LEFT_NDX].pt2.x = intersection.pt1.x - 1; result[NX_LEFT_NDX].pt2.y = intersection.pt2.y; - result[NX_RIGHT_NDX].pt1.x = intersection.pt2.x; + result[NX_RIGHT_NDX].pt1.x = intersection.pt2.x + 1; result[NX_RIGHT_NDX].pt1.y = intersection.pt1.y; - result[NX_RIGHT_NDX].pt2.x = rect1->pt2.x - 1; + result[NX_RIGHT_NDX].pt2.x = rect1->pt2.x; result[NX_RIGHT_NDX].pt2.y = intersection.pt2.y; } |