About that ninerpad background color preference... It seemed like an easy-to-do feature request at first. People asked for a way to set note backgrounds to a color other than white and I was going to give it to them.
(this post courtesy of Palm OS 5's non-support of alpha channels by the way)
ninerpad works in 8 bit screen depth mode. This means that you only have 256 colors to play with, upside being that the drawings take a lot less room to store, and can thus be commensurately larger or numerous. Good for note taking, that.
Now, to store a drawing, I need to give every pixel a value. I mean, there is no such thing as a non-value. So, 4 months ago, at version 1 design time, the answer came easily: fill blank drawing data with zeroes, one for each pixel (compressed data actually, hence fewer bits, but that discussion is for later).
And therein it lies: zero happens to be the only index for the color "white" in the Palm system palette. No other color well in that palette gives us that.
So, if I want to let users draw in white over, say red, I have a problem. I can let them draw in color zero (white) over red, sure, but what about those other empty pixels then, those that they did not draw over and yet that need a storage value?
The answer lies at the bottom of the ninerpad's BG color selector (inside Preferences). You will notice that one of the color wells down there is also set to white. That well, #254, is a cheat. It was reconfigured from its default color, black, to white.
Now, when you draw in white, you are actually setting those pixels you draw over to hold color value 254, instead of 0. When I read back the data, I overlay non-zero-index data over the BG color and presto, you can now even draw in white over white, if that strikes you as shiny. The drawn data will still be there.
Somewhere a bug lies in ambush, waiting for that right moment. I know this. And when it does, it will likely appear as some kind of display glitch, i.e., something appears in white that should have been some other color.
ninerpad restores the system palette to its default values when it exits, so other apps are safe. But if some 3rd party application pops something up over ninerpad while the later is active, the bug may show its ugly (white) head.
Waiting for that day, and asking: must every shortcut come at a price?
Subscribe to:
Post Comments (Atom)
Niner* Links
About Me
- Alexandre Rousseau
- Montreal expat living in China. I started a new project in 2011: iOS uni-post-grads training, and production of apps and games. Interns are now in place, working in groups of 2 or 3. The machine is turning. First app on the way. More info at gamecubate dot com.
Followers
Resonant
- Groundhog Day
- Serenity
- Spartan
- The Lost (Jonathan Aycliffe)
- Unforgiven
No comments:
Post a Comment