Page 1 of 1

Another ILI9341 bug?

Posted: Fri Jan 19, 2018 2:07 am
by keithh534
The 'Foreground Color' property has the R and B values transposed

Re: Another ILI9341 bug?

Posted: Fri Jan 19, 2018 10:00 am
by LeighM
Hi,
Thanks for your post.
I've had a look and cannot see a problem, perhaps I'm misunderstanding your post.
Here's the properties that I see in your project ...
colours.jpg
colours.jpg (77.15 KiB) Viewed 3480 times
I've added some additional output to your program to first display the text using the component property values.
Then there is a text output with transparency off, which demonstrates how the new background colour is drawn.
Any change to background colour is only visible on the next draw, the existing background pixels do not change until then.

Or are things different on the hardware??

Leigh

Re: Another ILI9341 bug?

Posted: Fri Jan 19, 2018 3:05 pm
by keithh534
That is indeed the foreground color I want, but if you look at the initial component foreground property, you'll see it displays that color (C0FF00) as 00FFC0 (R & B transposed). I've attached a simpler program to demonstrate what I'm talking about. Before executing the program review the initial component properties for foreground and background colors.

Re: Another ILI9341 bug?

Posted: Fri Jan 19, 2018 3:16 pm
by LeighM
Ah right.
I think you are assuming the meaning of the colour word 00FFC0.
The least significant bits represent red, not blue (i.e. BBGGRR)
If you click on that colour value and use the colour chart to pick a colour you will see the coding
edit: It did catch me out too when I first used this a few years ago, it's the way it was originally coded in V6 so we are stuck with it :wink:

Re: Another ILI9341 bug?

Posted: Fri Jan 19, 2018 3:41 pm
by keithh534
Thank you for the explanation. Albeit non-conventional, now that I'm aware of the anomaly, it's not a problem.
Now there's still the issue I'm experiencing with the background property (see separate post)