Re: Proposed widget type: image
Markus Dolze <[email protected]> Thu, 06 Mar 2014 07:26:07 +0100
| Newsgroups | gmane.comp.sysutils.lcdproc |
|---|---|
| Message-ID | <[email protected]> |
Hi
Short story:
I thought about using custom characters. But that did not work well.
Long story:
First my idea was to create a new widget. Call it 'cchar' for now. It
will have a position (X/Y in characters) and its 'content' is the pixel
data.
Upon rendering, LCDd first use set_char() to set the pixel data, then
use chr() to display the character.
For standard text displays (HD44780) usually 5x8 pixels are needed (8
bytes a 5 bits). So we could simply shift binary data by one or two bits
and are save.
Clients are told the character dimensions in response to 'hello', so
they can split their image into 'cchar'.
Some questions remain, e.g.: How does the LCDd assign the address in
CGRAM dynamically? And how is it released again for some other cchar?
Then I turned to the graphics driver and the above turned out to not
work any longer:
* First it does not handle custom characters (it has no set_char). It
would need to implement some 'CGRAM' .
* More important it can use any cell size other than 6x8, e.g. 14 x 18.
If we agree on some pixel format for cell size other than 6x8,
set_char() API must be changed, to let drivers know the number of bytes
within the data pointer (right now they assume 8 or cell-height). This
means all drivers implementing set_char() have to be touched.
Summary:
I am stuck on the custom character route. Next will be some real 'image'
widget.
Regards,
Markus