Fix case where rectangle is moved horizonatlly
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2832 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
37b25cfaaa
commit
a4f78f5ad0
@ -192,7 +192,7 @@ void NXGL_FUNCNAME(nxgl_moverectangle,NXGLIB_SUFFIX)
|
|||||||
* postion below (or to the right) in the source in framebuffer memory.
|
* postion below (or to the right) in the source in framebuffer memory.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (offset->y < 0)
|
if (offset->y < 0 || (offset->y == 0 && offset->x <= 0))
|
||||||
{
|
{
|
||||||
/* Yes.. Copy the rectangle from top down (i.e., adding the stride
|
/* Yes.. Copy the rectangle from top down (i.e., adding the stride
|
||||||
* to move to the next, lower row) */
|
* to move to the next, lower row) */
|
||||||
@ -228,7 +228,8 @@ void NXGL_FUNCNAME(nxgl_moverectangle,NXGLIB_SUFFIX)
|
|||||||
dline += hoffset;
|
dline += hoffset;
|
||||||
|
|
||||||
/* Copy the rectangle from the bottom up (i.e., subtracting stride
|
/* Copy the rectangle from the bottom up (i.e., subtracting stride
|
||||||
* to re-position to the previous, higher row) */
|
* to re-position to the previous, higher row)
|
||||||
|
*/
|
||||||
|
|
||||||
while (rows--)
|
while (rows--)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user