summaryrefslogtreecommitdiff
path: root/nuttx/graphics/nxglib/nxglib_runoffset.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-08-03 16:04:48 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-08-03 16:04:48 +0000
commit4a934b34d9f91e136d417551111a2c06b1f5c327 (patch)
tree63babfcb60345875f3ae20b676c94761eb47b30a /nuttx/graphics/nxglib/nxglib_runoffset.c
parent0597a9446b75ebcbd07d1503f5b70c50f8e36967 (diff)
downloadpx4-nuttx-4a934b34d9f91e136d417551111a2c06b1f5c327.tar.gz
px4-nuttx-4a934b34d9f91e136d417551111a2c06b1f5c327.tar.bz2
px4-nuttx-4a934b34d9f91e136d417551111a2c06b1f5c327.zip
Fix numerous errors in trapezoid rendering and wide line drawing algorithms
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3840 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/graphics/nxglib/nxglib_runoffset.c')
-rw-r--r--nuttx/graphics/nxglib/nxglib_runoffset.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/nuttx/graphics/nxglib/nxglib_runoffset.c b/nuttx/graphics/nxglib/nxglib_runoffset.c
index 31d0dd163..f66d73674 100644
--- a/nuttx/graphics/nxglib/nxglib_runoffset.c
+++ b/nuttx/graphics/nxglib/nxglib_runoffset.c
@@ -70,7 +70,7 @@
* Name: nxgl_runoffset
*
* Description:
- * Offset the run position by the specified dx, dy values.
+ * Offset the run position by the specified (integer) dx, dy values.
*
****************************************************************************/
@@ -79,7 +79,7 @@ void nxgl_runoffset(FAR struct nxgl_run_s *dest,
nxgl_coord_t dx, nxgl_coord_t dy)
{
b16_t b16dx = itob16(dx);
- dest->x1 += b16dx;
- dest->x2 += b16dx;
- dest->y += dy;
+ dest->x1 = src->x1 + b16dx;
+ dest->x2 = src->x2 + b16dx;
+ dest->y = src->y + dy;
}