From: Chris Healy <cphealy@gmail.com>
To: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>, barebox@lists.infradead.org
Subject: Re: [PATCH 1/3] 2d-primitives: fix missing pixel in gu_draw_line()
Date: Thu, 12 Oct 2017 11:30:11 -0700 [thread overview]
Message-ID: <CAFXsbZr9Td2HwJ+Ki7965O9feG7cYvfj+ca40juxmUgUeHDKXg@mail.gmail.com> (raw)
In-Reply-To: <20171012175228.16710-1-nikita.yoush@cogentembedded.com>
Full series is:
Tested-by: Chris Healy <cphealy@gmail.com>
Was tested on sandbox with various resolutions between 320x200 up to 1280x768.
On Thu, Oct 12, 2017 at 10:52 AM, Nikita Yushchenko
<nikita.yoush@cogentembedded.com> wrote:
> When drawing line from (x1, y1) to (x2, y2), pixel at (x2, y2) should
> be included.
>
> Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
> ---
> lib/gui/2d-primitives.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/gui/2d-primitives.c b/lib/gui/2d-primitives.c
> index 0f29b32ba..89acc092d 100644
> --- a/lib/gui/2d-primitives.c
> +++ b/lib/gui/2d-primitives.c
> @@ -61,7 +61,7 @@ static void draw_simple_line(struct screen *sc,
> swap(y1, y2);
> }
>
> - for (x = x1; x < x2 - 1; x++) {
> + for (x = x1; x <= x2; x++) {
> if (!dash ||
> (++pixel % (2 * dash)) < dash)
> illuminate(sc->info,
> @@ -137,7 +137,7 @@ void gu_draw_line(struct screen *sc,
> j = y1;
> eps = dy - dx;
>
> - for (i = x1; i <= x2 - 1; i++) {
> + for (i = x1; i <= x2; i++) {
> if (!dash ||
> (++pixel % (2 * dash)) > dash) {
> illuminate(sc->info,
> --
> 2.11.0
>
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2017-10-12 18:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-12 17:52 Nikita Yushchenko
2017-10-12 17:52 ` [PATCH 2/3] fbtest: add solid pattern Nikita Yushchenko
2017-10-12 17:52 ` [PATCH 3/3] fbtest: add gradients pattern Nikita Yushchenko
2017-10-13 13:20 ` Sam Ravnborg
2017-10-16 7:20 ` Sascha Hauer
2017-10-12 18:30 ` Chris Healy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFXsbZr9Td2HwJ+Ki7965O9feG7cYvfj+ca40juxmUgUeHDKXg@mail.gmail.com \
--to=cphealy@gmail.com \
--cc=andrew.smirnov@gmail.com \
--cc=barebox@lists.infradead.org \
--cc=nikita.yoush@cogentembedded.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox