diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-08-04 01:25:58 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-08-04 01:25:58 +0000 |
commit | f831ee4825edac31395b26876023e792cda23281 (patch) | |
tree | b556eca4adad8a8639d858c8a8d40a93ad5609f4 /nuttx/graphics/nxglib | |
parent | 2dbf43396ef13cf1f6870631edbe399b12d5d07a (diff) | |
download | px4-nuttx-f831ee4825edac31395b26876023e792cda23281.tar.gz px4-nuttx-f831ee4825edac31395b26876023e792cda23281.tar.bz2 px4-nuttx-f831ee4825edac31395b26876023e792cda23281.zip |
Completes test of line/trapezoid drawing routines
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3842 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/graphics/nxglib')
-rw-r--r-- | nuttx/graphics/nxglib/fb/nxglib_filltrapezoid.c | 2 | ||||
-rw-r--r-- | nuttx/graphics/nxglib/lcd/nxglib_filltrapezoid.c | 9 |
2 files changed, 2 insertions, 9 deletions
diff --git a/nuttx/graphics/nxglib/fb/nxglib_filltrapezoid.c b/nuttx/graphics/nxglib/fb/nxglib_filltrapezoid.c index 4f0c2f072..ddaa0f9bf 100644 --- a/nuttx/graphics/nxglib/fb/nxglib_filltrapezoid.c +++ b/nuttx/graphics/nxglib/fb/nxglib_filltrapezoid.c @@ -201,7 +201,7 @@ void NXGL_FUNCNAME(nxgl_filltrapezoid,NXGLIB_SUFFIX)( * always draw at least one pixel. */ - if (x1 > x2 || ix2 < bounds->pt1.x || ix1 > bounds->pt2.x) + if (x1 <= x2 && ix2 >= bounds->pt1.x && ix1 <= bounds->pt2.x) { /* Get a clipped copies of the starting and ending X positions. This * clipped truncates "down" and gives the quantized pixel holding the diff --git a/nuttx/graphics/nxglib/lcd/nxglib_filltrapezoid.c b/nuttx/graphics/nxglib/lcd/nxglib_filltrapezoid.c index faeebbec7..0653da413 100644 --- a/nuttx/graphics/nxglib/lcd/nxglib_filltrapezoid.c +++ b/nuttx/graphics/nxglib/lcd/nxglib_filltrapezoid.c @@ -93,7 +93,6 @@ void NXGL_FUNCNAME(nxgl_filltrapezoid,NXGLIB_SUFFIX) NXGL_PIXEL_T color) { unsigned int ncols; - unsigned int dy; unsigned int topy; unsigned int boty; unsigned int row; @@ -104,6 +103,7 @@ void NXGL_FUNCNAME(nxgl_filltrapezoid,NXGLIB_SUFFIX) b16_t botx2; b16_t dx1dy; b16_t dx2dy; + int dy; int ix1; int ix2; @@ -174,13 +174,6 @@ void NXGL_FUNCNAME(nxgl_filltrapezoid,NXGLIB_SUFFIX) boty = bounds->pt2.y; } - /* Break out now if it was completely clipped */ - - if (topy > boty) - { - return; - } - /* Handle the special case where the sides cross (as in an hourglass) */ if (botx1 > botx2) |