Quote:
Originally Posted by knc1
|
I hope this link starts to work from everywhere in the world.
Because not the linked to, next to last, example but the following, last, example is probably more of interest.
Code at:
http://java-gnome.sourceforge.net/do...inedPaper.html
There you'll see how the doodle of a tank (as a png) is overlayed on what is already written on the surface.
K2 devices don't have a lot of processing power, but for a clock, we can use pre-rendered textual parts (not unlike what matchbox-keyboard does for its keycaps).
See: loading-images.lua in the cairo archive above, examples directory.
We would need (rendered in desired font, saved as *.png files):
A 12 item array of month names -
A 7 item array of day names -
A 2 item array of day part name (AM, PM) -
A 10 element array of (properly kerned) digits -
A colon -
Ah, I think that is all that might be found on a clock face.
Oh, maybe a rendered background pattern.
clocktab site uses a table to align the parts -
We could use a pre-computed table (the only datatype that Lua has) of component coordinates -
call 'date' with a custom (easy to read) format string -
read the parts of the string -
lookup that part's coordinates and png -
read to pix buffer, set as those coordinates -
write the whole thing to a *.png in /tmp -
make an eps call to display the png -
go back to sleep.
I am thinking that even a K2 could do that every minute.