Hello
I am trying to use the color keying feature of the K70 LCDC without success. I am using the tower system, I can display things on the LCD (our own) without any issues, using the graphics window and background.
What I have is a graphics window of 100 lines with a group of red lines in the middle, from my understanding if I enable color keying correctly these red lines should become transparent... is this correct? If so then below is the code I am using to enable color keying:
// set LCD graphic window control
LCDC_LGWCR =
LCDC_LGWCR_GWAV(0x9f) | // alpha-transparent value (0xFF is opaque)
LCDC_LGWCR_GWE_MASK |
LCDC_LGWCR_GWCKE_MASK | // Colour Keying enable
LCDC_LGWCR_GWCKR(0x3f) | // Red colour keying
LCDC_LGWCR_GWCKG(0) |
LCDC_LGWCR_GWCKB(0);
If anybody has used color keying successfully I would appreciate any help or ideas as to why mine doesn't. Apologies if I have missed any information that may help.
Best Regards
Anthony
If you want to remove the Red component and display the Green and Blue components you would have to set the color keying as follows:
Red color keying Green color keying Blue color keying
LCDC_LGWCR_GWCKR(0x00) | LCDC_LGWCR_GWCKG(0xFF) | LCDC_LGWCR_GWCKB(0xFF);
a 0x00 in any of the color keying fields will render it completely transparent whilst a 0xFF value will render it completely visible.
Thanks for the explanation.
Unfortunately it still doesn't work for me, so I must be missing something else. I shall have another look when I get chance.
When you enable color keying all the selected color component in the graphic window will become transparent, not only those pixels with a 100% red color component.