PalmOS 3.5 8-bit Colour Palette

2008-05-28 Thread Bob Whiteman
The PalmOS Programmer's Companion indicates that the named HTML colour gray
(0x808080) is a member of the PalmOS palette. I checked on a device, and the
emulator, and this colour is not present.

However, the Programmer's Companion writes that only the first 231 entries
in the palette and the last entry are defined.

Summing the total number of colours up:
 216 Web-safe colours
  10 greys, giving us all posible values of grey.
+  6 named HTML colours

 232

Which seems to be consistent. However, entries 0xE6 and 0xFF are both black
in my tests. Is this an error in documentation? Or is this an error in
implementation?

If it is an error in implementation, will it be corrected in future
revisions? Will index 0xE6 become 0x808080?

 Thanks in advance,
-Bob


-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Colour bitmap in Alert

2008-05-28 Thread John Cundall
Hi,

Should a colour bitmap in an alert draw in colour on a colour device ? I
perhaps naively assumed I could create a Form in CodeWarrior's
Constructor (1.5b1), pop in a 256-colour bit map and just use
FrmDoDialog() to show the form as an alert (having checked the screen
mode of course) - when I do this, the bitmap draws in glorious ..uhmmm..
black and white (in POSE with the IIIc ROM and also on a real IIIc). So
my question is, what do I have to do to get a colour bitmap to draw in
colour *in a dialog* ?

John Cundall
<[EMAIL PROTECTED]>


-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Colour bitmap in Alert

2008-05-28 Thread John Cundall
Thanks Richard - using a Bitmap Family was the answer. For future 
reference, here's what I did in Constructor:
1) Delete the original Form Bitmap from the Form and save the project
   (I had some weird Constructor effects until I did this).
2) Create 3 bitmaps, at 1-, 2- and 8-bit depth, with resource IDs xxx1,
   xxx2 and xxx8 (1101, 1102 and 1108 in my case)
3) Create a bitmap family and add 3 family items to refer to the 3 
   bitmaps created in (2). The Bitmap Family's resource ID has no
   relationship to the Bitmap resource IDs; I used 1000.
4) Add a Form Bitmap to the form, and set the Form Bitmap's resource ID
   to the Bitmap Family created in (3), 1000 in my case.
That's it - the form now shows the right bitmap automagically (i.e. the
system sorts out 1/2/8-bit depth).

So, two supplemental questions:
1) why does the PalmOS sample code use 1/2/8-bit icon/bitmaps but not
   4-bit ? Because no device has a 4-bit display ?
2) What Palm device has a 2-bit display ?

John.

Richard Burmeister wrote:
> 
> From: "John Cundall" <[EMAIL PROTECTED]>
> Subject: Colour bitmap in Alert
> 
> > my question is, what do I have to do to get a colour bitmap to draw in
> > colour *in a dialog* ?
> 
> That shouldn't cause any problems.  Are you using a Bitmap Family for the
> bitmap?  If so, you don't have to check the screen mode; the OS takes care
> of selecting the proper bitmap for the current screen depth.
> 
> Here's code I use to display a modal dialog box, given the id of a form:
> 
> static UInt16 ShowModalDialog( UInt16 frmID )
> {
> FormPtr prevForm, thisForm;
> UInt16 btn;
> 
> prevForm = FrmGetActiveForm();
> thisForm = FrmInitForm( frmID );
> FrmSetActiveForm( thisForm );
> btn = FrmDoDialog( thisForm );
> if ( prevForm )
> FrmSetActiveForm( prevForm );
> FrmDeleteForm( thisForm );
> return btn;
> } // ShowModalDialog


-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Colour bitmap in Alert

2008-05-28 Thread Richard M. Hartman


Tom Zerucha wrote in message <[EMAIL PROTECTED]>...
>
...
>Since I am doing imaging I do use 4 bit.  So do most other imaging
>programs that run on something other than the IIIc.
>

Really?  Most serious imaging apps I know of take 8bpp (palette
of 256 colors)  as their LOW end.  4bpp is a palette of 16 colors.
This is essentially the original DOS color mode ... not really suited
for imaging.  What sort of imaging are you doing with color depth
that low?

--
-Richard M. Hartman
[EMAIL PROTECTED]

186,000 mi/sec: not just a good idea, it's the LAW!






-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


16-bit Colour & Prism/Future PalmOS

2008-05-28 Thread Francis
I've got a few questions about the 16 bit colour on the prism, and the
future of PalmOS. Perhaps someone knows the answers?

- On the new visor prism devices, what is the gain of using a Direct Colour
bitmap? Is the only feature of using a direct colour bitmap the ability to
specify a transparent colour index?
- Suppose you specify a 16-bit colour bitmap, without using direct colour.
Will the OS assume that you are using a 5:6:5 rgb bit distribution in all
future PalmOSs? (It behaves this way on the Visor Prism)





-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Printing CW source code in colour

2006-06-10 Thread Ben Combee

On 6/9/06, Greg <[EMAIL PROTECTED]> wrote:

I have a really great plugin for VB for printing my source code from Visual 
Studio.
http://www.starprint2000.com/vbprint_features.html

Is there anything similiar for CodeWarrior?

I would like to be able to print my code in colour to match the way I have CW 
setup. I find it makes the code easier to read.

I have tried both a regular printer and using Adobe Acrobat Writer but both 
don't do anything even close to how nice my VB code can print.


In the CW IDE, when you print a file, check the "use syntax
highlighting" box at the bottom of the Print dialog.

--
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/


Printing CW source code in colour

2006-06-09 Thread Greg
I have a really great plugin for VB for printing my source code from Visual 
Studio.
http://www.starprint2000.com/vbprint_features.html

Is there anything similiar for CodeWarrior?

I would like to be able to print my code in colour to match the way I have CW 
setup. I find it makes the code easier to read.

I have tried both a regular printer and using Adobe Acrobat Writer but both 
don't do anything even close to how nice my VB code can print.

I guess I am just spoiled but I find nicely formatted code alot easier to read.

Thanks to anyone who might know of a plugin.

Greg
-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/


Re: greyscale in rgb565 colour format

2006-04-25 Thread Michal Seliga
for 5:6:5 just get average as you are used to (your n) and use only higher 5 (or
6) bits of it for each color


[EMAIL PROTECTED] wrote:
> Hello,
> From theory I am assuming that in order to convert an image to its greyscale 
> values we get the red green and blue pixel values and find the average and 
> set red, green and blue components to this average value.  When using rgb565 
> format images where pixel values can only go from 0-31 red, 0-63 green and 
> 0-31 blue i am having trouble converting these to greyscale which should be 
> (n,n,n) where n is between 0-255.  I know that 31, 63, 31 produces white, but 
> am unable to get any other combination that produces grey as i thought it had 
> to be (n,n,n) ie 31,31,31 to do so but this is not the case.  Do i need to 
> change the screen density to 4bpp??? I actually need to convert colour images 
> captured from the onboard pda camera to greyscale for processing.
> Any help would be greatly appreciated,
> Cheers.
> 

-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/


RE: greyscale in rgb565 colour format

2006-04-25 Thread Navin Dabhi
Hi,

I think value is 153, 153, 153 for gray color.

Thanks,
Navin

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Tuesday, April 25, 2006 6:18 PM
To: Palm Developer Forum
Subject: greyscale in rgb565 colour format

Hello,
>From theory I am assuming that in order to convert an image to its greyscale
values we get the red green and blue pixel values and find the average and
set red, green and blue components to this average value.  When using rgb565
format images where pixel values can only go from 0-31 red, 0-63 green and
0-31 blue i am having trouble converting these to greyscale which should be
(n,n,n) where n is between 0-255.  I know that 31, 63, 31 produces white,
but am unable to get any other combination that produces grey as i thought
it had to be (n,n,n) ie 31,31,31 to do so but this is not the case.  Do i
need to change the screen density to 4bpp??? I actually need to convert
colour images captured from the onboard pda camera to greyscale for
processing.
Any help would be greatly appreciated,
Cheers.
-- 
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/


-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/


greyscale in rgb565 colour format

2006-04-25 Thread becksticles
Hello,
>From theory I am assuming that in order to convert an image to its greyscale 
>values we get the red green and blue pixel values and find the average and set 
>red, green and blue components to this average value.  When using rgb565 
>format images where pixel values can only go from 0-31 red, 0-63 green and 
>0-31 blue i am having trouble converting these to greyscale which should be 
>(n,n,n) where n is between 0-255.  I know that 31, 63, 31 produces white, but 
>am unable to get any other combination that produces grey as i thought it had 
>to be (n,n,n) ie 31,31,31 to do so but this is not the case.  Do i need to 
>change the screen density to 4bpp??? I actually need to convert colour images 
>captured from the onboard pda camera to greyscale for processing.
Any help would be greatly appreciated,
Cheers.
-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/


Button Control text colour

2005-11-02 Thread Trevor MacPhail
Is there a way to set the text colour of button controls overriding the 
current colour theme? I tried to set the text colour using 
WinSetTextColor and then calling CtlDrawControl but I still ended up 
with the regular text colour in the button.


--
Trevor MacPhail

--
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/


Re: Insertion point - changing its colour?

2004-01-29 Thread Fangorn
This might work (not tested).

RGBColorType rgb;
rgb.r = 0;
rgb.g = 0;
rgb.b = 255;
UIColorSetTableEntry(UIFieldCaret, &rgb);
This should make the caret blue.

Regards
-Laurens
Wonderful, thanks! That did the job.

Fangorn

--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: Insertion point - changing its colour?

2004-01-29 Thread Laurens

<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> I've used the various Insertion point functions InsPtSetLocation
> InsPtEnable etc and they work great to move the Insertion point about
> but is it possible to change its colour?
>
> When displayed on a black screen it disappears, I thought it would
> have XORed with the screen but it doesn't. I'm not using the Insertion
> point in a standard field.

This might work (not tested).

RGBColorType rgb;
rgb.r = 0;
rgb.g = 0;
rgb.b = 255;
UIColorSetTableEntry(UIFieldCaret, &rgb);

This should make the caret blue.


Regards
-Laurens



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Insertion point - changing its colour?

2004-01-29 Thread fangorn68
I've used the various Insertion point functions InsPtSetLocation
InsPtEnable etc and they work great to move the Insertion point about
but is it possible to change its colour?

When displayed on a black screen it disappears, I thought it would
have XORed with the screen but it doesn't. I'm not using the Insertion
point in a standard field.


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Fw: 4 Bit Grey? or 4 bit colour? Zire 21/Tungsten T3

2004-01-28 Thread Antonio Argentieri
Hi all,
Already posted this once but didn't get any replies... :-(
could anyone point me in the right direction?

Thanks

Antonio

- Original Message - 
From: "Antonio Argentieri" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Saturday, January 24, 2004 10:49 AM
Subject: 4 Bit Grey? or 4 bit colour? Zire 21/Tungsten T3


> Hi All,
>
> Quick question one of you may be able to help me with...
>
> I've just been trying to differentiate between a screen that support 16
> shades of grey(Zire21) as opposed to something that supports 16 colours.
(T3
> in this case). I've been using WinScreenMode with parameter
> winScreenModeGetDefaults to get the colour enabled value.
>
> Unfortunately using this function both emulators indicate that they
support
> colour. Does anyone know if this is a fault with the zire21 emulator?, a
fault with
> my method? or is any machine that supports > 2 bit screendepths classed as
'colour' for
> OS compatibility purposes.. if so does anyone know how to detect the
difference between 16 shades of
> grey and 16 colours!
>
> Thanks in advance,
>
> Antonio Argentieri.
>
>
>
>
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


4 Bit Grey? or 4 bit colour? Zire 21/Tungsten T3

2004-01-24 Thread Antonio Argentieri
Hi All,

Quick question one of you may be able to help me with...

I've just been trying to differentiate between a screen that support 16
shades of grey(Zire21) as opposed to something that supports 16 colours. (T3
in this case). I've been using WinScreenMode with parameter
winScreenModeGetDefaults to get the colour enabled value.

Unfortunately using this function both emulators indicate that they support
colour.
Does anyone know if this is a fault with the zire21 emulator?, a fault with
my method?
or is any machine that supports > 2 bit screendepths classed as 'colour' for
OS compatibility purposes..?
if so does anyone know how to detect the difference between 16 shades of
grey and 16 colours!

Thanks in advance,

Antonio Argentieri.




-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: Changing the colour of the title of a form.

2003-08-11 Thread Alan Ingleby
"Alan Ingleby" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Form Titles are always blue... I want a different colour for the form
title
> on certain forms in my app. can this be done, or is it a roll-your own
> affair?
> I'd also prefer if the solution would be OS3.5 compatible...

Spoke too soon... It's actually quite easy... Here's a nice code snippet for
others who might find it useful.

Call Reddify(true) to make to form title Red, Reddify(false) to restore it.
The code is smart enough to detect whether or not it should be attempting
these colour changes based on # device colours, and OS version.

//

static RGBColorType colOrig;

static void Reddify(Boolean bRed) {

 RGBColorType  colOld;
 RGBColorType  colNew;
 UInt32romVersion;
 UInt32iDepth;

 FtrGet(sysFtrCreator, sysFtrNumROMVersion, &romVersion);

 if (romVersion >= sysMakeROMVersion(3,5,0,sysROMStageRelease,0)) {

  if (!WinScreenMode(winScreenModeGet, NULL, NULL, &iDepth, NULL)) {
   if (iDepth >= 8) {
UIColorGetTableEntryRGB(UIFormFrame, &colOld);
MemMove(&colNew, &colOld, sizeof(RGBColorType));
colNew.r = 200;
colNew.g = 0;
colNew.b = 0;
UIColorSetTableEntry(UIFormFrame, &colNew);
UIColorGetTableEntryRGB(UIFormFrame, &colNew);

if (MemCmp(&colNew, &colOld, sizeof(RGBColorType))) {
 colOrig = colOld;
}

UIColorSetTableEntry(UIFormFrame, bRed?&colNew:&colOrig);
   }
  }
 }
}



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Changing the colour of the title of a form.

2003-08-05 Thread Alan Ingleby
Form Titles are always blue... I want a different colour for the form title
on certain forms in my app. can this be done, or is it a roll-your own
affair?

I'd also prefer if the solution would be OS3.5 compatible...

Alan



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: Colour

2003-07-19 Thread Paul Johnson
Thanks Scott - this has given me a good start.

When you say a system alert will be mapped to my colours, do you mean mapped
as in it picks the best colour from my palette that it should be in, or it
simply uses a palette entry that it expects to be grey but is in fact now
bright pink iyswim ?


Regards,
Paul Johnson
Applewood House
www.applewoodhouse.com


- Original Message -
From: "Paul Johnson" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Saturday, July 19, 2003 1:05 PM
Subject: Colour


> Hi.
>
> I've decided my app is gonna have to use 256 colour images and there will
be
> quite a few of them blitted about, some of which using operations not
> available through the OS so I need to make my own blitting routines. I
have
> a few questions if I may.
>
> 1)Is there a way to force a device to using 256 colours, or fail in
the
> attempt if it can't manage it ?  I'm thinking more about newer machines
> which *may* have 16 bit colour support. Can I then reliably make an
> offscreen window that will server as my canvas that I can fill up then
copy
> to the viewing screen in one go when finished ?
>
> 2)I won't be using *any* of the OS gui functions so I'm assuming I can
> nuke the entire palette with my custom colours as long as I put em back
when
> my app quits. Is this doable ?
>
> 3)Is their a definitive reference on this subject ? I saw one once a
> long time ago, but since coming back into the palm world I can't find
> anything that covers the specific topics I'm looking for
>
> Many thanks in advance...
>
>
> Regards,
> Paul Johnson
> Applewood House
> www.applewoodhouse.com
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
>


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Colour

2003-07-19 Thread Paul Johnson
Hi.

I've decided my app is gonna have to use 256 colour images and there will be
quite a few of them blitted about, some of which using operations not
available through the OS so I need to make my own blitting routines. I have
a few questions if I may.

1)Is there a way to force a device to using 256 colours, or fail in the
attempt if it can't manage it ?  I'm thinking more about newer machines
which *may* have 16 bit colour support. Can I then reliably make an
offscreen window that will server as my canvas that I can fill up then copy
to the viewing screen in one go when finished ?

2)I won't be using *any* of the OS gui functions so I'm assuming I can
nuke the entire palette with my custom colours as long as I put em back when
my app quits. Is this doable ?

3)Is their a definitive reference on this subject ? I saw one once a
long time ago, but since coming back into the palm world I can't find
anything that covers the specific topics I'm looking for

Many thanks in advance...


Regards,
Paul Johnson
Applewood House
www.applewoodhouse.com



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


RGB Value of Standard Palm Blue (menu bar colour) ?

2002-11-08 Thread Richard . Anderson
Hi,

Does anyone know the RGB values for the blue used in the menu bars etc on
the m515 ???

Thanks,

Richard Anderson
Software Engineer
Radiodetection - An SPX company


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/



12-bit colour

2002-09-18 Thread Idries Hamadi

Hi all,

I remember a thread about 12-bit colour on the Treo. I've had a look through
the archives but there only seem to be questions there, not answers. Has
anyone worked with this now? The reason that I ask is that I'm working on a
similar thing (non-Palm) and I need to generate/convert art assets into 
i.e. 4-bit alpha, 4-bit red, 4-bit green, 4-bit blue. 

Shifting down from 888 or 565 or 555 or whatever is not a problem, but it
means that the artists will be working in a higher colour depth than the
finished product. Has anyone devised a process for working in this format? I
don't intend to use the alpha channel, so for my purposes 444 is as good as
. Are there any tools out there for doing this?

Cheers,
Idries

Idries Hamadi
Programmer

for and on behalf of
IG
Email:  [EMAIL PROTECTED] 
Internet:
Phone   +44 (0) 20 7386 3000 
IG House, Palliser Road
London, W14 9EN, UK
This email may contain confidential information and is only for the intended
recipient. Unauthorised review or use of any confidential information in
this message is prohibited. If you received this in error, please contact
the sender and delete it from any computer.




-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/



Setting background colour for a pressed push button.

2001-12-11 Thread Michael Glickman

Hello

How to set a background colour for
a pressed (value > 0) push button in 3.5+ ?

Tried
UIColorSetTableEntry(UIObjectSelectedFill, &rgb);

doesn't seem to produce the desired effect.

Cheers,
M-

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



RE: Back to launcher colour scheme in dbg and prod ROMs.

2001-12-07 Thread Peter Epstein

You can use applications such as Chrome to change the UI colors. This can be
useful for debugging. Also note that the Mac simulator also uses debug
colors, just like the debug ROMs.
-- 
Peter Epstein

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



RE: Back to launcher colour scheme in dbg and prod ROMs.

2001-12-06 Thread Michael Glickman



-Original Message-
From: Ben Combee [mailto:[EMAIL PROTECTED]]
Sent: Friday, 7 December 2001 3:51 PM
To: Palm Developer Forum
Subject: Re: Back to launcher colour scheme in dbg and prod ROMs.


> -Original Message-
> From: Ben Combee [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 7 December 2001 3:08 PM
> To: Palm Developer Forum
> Subject: Re: Back to launcher colour scheme in dbg and prod ROMs.

> While not documented (and therefore not supported), inspection of the
> Palm OS source shows that the system does look in the Saved Preference
> database for a pref of type sysFileCSystem with ID
> sysResIDPrefUIColorTableBase + depth.  If this pref is found, it reloads
> the color table from there.  Otherwise, it uses a hardcoded system
> resource.

Thanks Ben

This is exactly what I was doing also.

Actually for the debugging the depth is incremented by 1, so we have
(sysResIDPrefUIColorTableBase + depth) for production version and
(sysResIDPrefUIColorTableBase + depth + 1) for debugging.

Keeping this in mind, I wouldn't be surprised to find that the debug
version keeps both colour schemes, therefore we can just switch from one
to another (another dirty trick of course) :-)

A really amazing. Everything is ready, only the front end is missing!

Michael




-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



Re: Back to launcher colour scheme in dbg and prod ROMs.

2001-12-06 Thread Ben Combee

> -Original Message-
> From: Ben Combee [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 7 December 2001 3:08 PM
> To: Palm Developer Forum
> Subject: Re: Back to launcher colour scheme in dbg and prod ROMs.
>
> > Modifying the color tables is done through the
> > UIColorGetTableEntryIndex, UIColorGetTableEntryRGB, and
> > UIColorSetTableEntry APIs.
>
> This does not affect launcher colour scheme.
> When I return back to launcher, everything
> gets back to default. What I was referring to,
> was a standard PalmOS application to set
> auncher (default) colours.
> It is a good idea to have it.

The system reloads the color table when it switches applications.  This
is why your modifications don't affect the launcher.

While not documented (and therefore not supported), inspection of the
Palm OS source shows that the system does look in the Saved Preference
database for a pref of type sysFileCSystem with ID
sysResIDPrefUIColorTableBase + depth.  If this pref is found, it reloads
the color table from there.  Otherwise, it uses a hardcoded system
resource.

The table is just an array of color table entries, one for each possible
setting in the system.  If the table in the prefs has too few or too
many entries, it is ignored.

This only applies to current systems.  Since this isn't documented
knowledge, it can and likely will change in the future.  You only safely
can modify your own application's color table -- setting up this
preference is "high mojo".



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



RE: Back to launcher colour scheme in dbg and prod ROMs.

2001-12-06 Thread Michael Glickman



-Original Message-
From: Ben Combee [mailto:[EMAIL PROTECTED]]
Sent: Friday, 7 December 2001 3:08 PM
To: Palm Developer Forum
Subject: Re: Back to launcher colour scheme in dbg and prod ROMs.

> Modifying the color tables is done through the
> UIColorGetTableEntryIndex, UIColorGetTableEntryRGB, and
> UIColorSetTableEntry APIs. 

This does not affect launcher colour scheme.
When I return back to launcher, everything
gets back to default. What I was referring to,
was a standard PalmOS application to set 
auncher (default) colours.
It is a good idea to have it.

Regards, M

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



Re: Back to launcher colour scheme in dbg and prod ROMs.

2001-12-06 Thread Ben Combee

"Michael Glickman" <[EMAIL PROTECTED]> wrote in message
news:70460@palm-dev-forum...
>
> This is the third question posted this morning.
>
> I was unlucky with previous two, hopefully
> I am going to get an asnwer this time.
>
> A launcher colour scheme is different for
> dbg and non-dbg ROMs. As it was mentioned,
> it might be a hint that we can't rely on
> standard launcher colour scheme. Is there
> any thing else behind that ?

The debug scheme is designed so you can make sure your application
correctly follows the system colors.  On a release device, some system
colors have the same value, even though they are logically distinct.
The debug ROMs put different colors into all the values so you can tell
when you're using the right one.

> And I really couldn't find a way to modify
> launcher colours.

Modifying the color tables is done through the
UIColorGetTableEntryIndex, UIColorGetTableEntryRGB, and
UIColorSetTableEntry APIs.  If you're drawing something that should
match the standard UI, you should get your drawing colors using these
calls.

> If I knew where the launcher keeps its colour
> preferences, I could make a colour scheme
> editor (a few-hour work), and this will be
> really cool !

There already are some color scheme editors.  Chrome
(http://www.twinkletwinkle.com/) is probably the best known.



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



Back to launcher colour scheme in dbg and prod ROMs.

2001-12-06 Thread Michael Glickman

This is the third question posted this morning.

I was unlucky with previous two, hopefully
I am going to get an asnwer this time.

A launcher colour scheme is different for
dbg and non-dbg ROMs. As it was mentioned,
it might be a hint that we can't rely on
standard launcher colour scheme. Is there 
any thing else behind that ?

And I really couldn't find a way to modify
launcher colours.

Is this one of Palm's future plans ?
A concern regarding third part launcher ?
An application being called from another app
   with custom palette ?

If I knew where the launcher keeps its colour 
preferences, I could make a colour scheme
editor (a few-hour work), and this will be
really cool ! 

Michael

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



RE: displaying a colour bitmap on the Palm ..

2001-10-30 Thread Stringer

>Subject: displaying a colour bitmap on the Palm ..
>From: "Essell" <[EMAIL PROTECTED]>
>Date: Mon, 29 Oct 2001 19:19:43 -0800
>
>I have an application in which I have to display colour bitmaps. I'm using
>Codewarrior .. I manage to do this using a Bitmap Family. The problem is
>...

(ignore my previous accidental post)

Color was really introduced with OS3.5, as was the good support
of grayscale, although it was possible to do grayscale with earlier
releases with some interesting coding.

Unles you have good reason to want to support grayscale on
devices prior to OS3.5, then I recommend you use bitmap
families and have a monochrome bit image for older releases
as well as grayscale and color images for OS3.5 and forward
releases.

This also plays into what OS releases you are interested in supporting.

Roger Stringer
Marietta Systems, Inc.


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



displaying a colour bitmap on the Palm ..

2001-10-30 Thread Stringer

Subject: displaying a colour bitmap on the Palm ..
From: "Essell" <[EMAIL PROTECTED]>
Date: Mon, 29 Oct 2001 19:19:43 -0800
X-Message-Number: 15

Hi guys ..

I have an application in which I have to display colour bitmaps. I'm using
Codewarrior .. I manage to do this using a Bitmap Family. The problem is
Roger Stringer
Marietta Systems, Inc., PO Box 71506, Marietta, Georgia 30007
Phone: (770) 565-1560 FAX: (770) 565-4421
"RF-TP" and "Marietta PDE" are the trademarks of Marietta Systems, Inc.
Visit our web site for company and product information: 
http://www.MariettaSystems.com
==


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



Re: displaying a colour bitmap on the Palm ..

2001-10-29 Thread Ben Combee

"Essell" <[EMAIL PROTECTED]> wrote in message
news:66227@palm-dev-forum...
>
> Hi guys ..
>
> I have an application in which I have to display colour bitmaps. I'm
using
> Codewarrior .. I manage to do this using a Bitmap Family. The problem
is
> that Bitmap Family is not supported on OS versions prior to Palm OS
3.5 & so
> if I run this application on any older OS version , the application
crashes.
> If I don't use a bitmap family .. and I use just a normal Bitmap
resource,
> the bitmap is displayed in black & white. This happens across OS
versions,
> whether or not the OS/device supports colour.

Bitmap families are just concatenated bitmaps of different color
resolutions, using a previous unused field in the BitmapType header to
chain the bitmaps together.

They were designed to be backwards compatible.  If you always have a
1-bit bitmap as the first member of the family, then you can show that
bitmap on code running on previous OS versions.

OS 3.5 was the first version to really support non-B/W modes.  OS 3.3
added some support for 2-bit work, but it was done separately.  I think
its reasonable to only support 1-bit mode for devices that aren't
running Palm OS 3.5 or later.



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



displaying a colour bitmap on the Palm ..

2001-10-29 Thread Essell

Hi guys ..

I have an application in which I have to display colour bitmaps. I'm using
Codewarrior .. I manage to do this using a Bitmap Family. The problem is
that Bitmap Family is not supported on OS versions prior to Palm OS 3.5 & so
if I run this application on any older OS version , the application crashes.
If I don't use a bitmap family .. and I use just a normal Bitmap resource,
the bitmap is displayed in black & white. This happens across OS versions,
whether or not the OS/device supports colour.

One way I could overcome this is determine the version of the OS on the
device & use a Bitmap family or Bitmap resource accordingly. Is there any
other way I could do this, perhaps use some generic resource that would be
supported on any version of the OS ? Or am I missing something altogether ?

Any suggestions/commencts would be greatly appreciated ..

Thanks a million ..





-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



RE: Colour support

2001-01-17 Thread esanborn



look at the color deal sample cod ein the knowledge base to handle setting text
color, background color, etc.

-Ezekiel



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



RE: Colour support

2001-01-17 Thread Heather KML Tufts

> If I want to write a program on PalmOS 3.5 which can support 
> all couour
> scheme, i.e B/W, 4 gray level, and 256 colours, what should I 
> do? Is there
> any special code I should write to handle it?

Use Bitmap Families (http://oasis.palm.com/dev/kb/faq/1817.cfm is for
creating App Icon Families, but the same principles apply).

-hkmlt


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



Colour support

2001-01-16 Thread Oscar Lee

Dear All,
If I want to write a program on PalmOS 3.5 which can support all couour
scheme, i.e B/W, 4 gray level, and 256 colours, what should I do? Is there
any special code I should write to handle it?
Oscar


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



Speeding up the redraw on a Colour display.

2001-01-02 Thread Darren Lee Ang

I have two forms the I interchange, depending on what the user selects.
These forms share a 'common' toolbar as well as the title.

On the Visor/Visor Deluxe, the functionality is very fast, and the re-draw
is not quite perceptible.

However, on the Prism, the re-draw is very noticeable.
Especially when the Titlebar is being redrawn.

Is there a method to make it less obvious?
Or should I drop back to the idea of just hiding/showing the controls, which
I did not do
since I felt the hiding and showing of controls would be more noticeable
than switching forms.
Will showing/hiding controls have the same perceived slowness on the Prism?

I have not tried it yet on the colour Palm.  Does it have the same problems?
Thanks.

-- Darren Lee Ang



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



16-bit Colour & Prism/Future PalmOS

2000-10-24 Thread Francis

I've got a few questions about the 16 bit colour on the prism, and the
future of PalmOS. Perhaps someone knows the answers?

- On the new visor prism devices, what is the gain of using a Direct Colour
bitmap? Is the only feature of using a direct colour bitmap the ability to
specify a transparent colour index?
- Suppose you specify a 16-bit colour bitmap, without using direct colour.
Will the OS assume that you are using a 5:6:5 rgb bit distribution in all
future PalmOSs? (It behaves this way on the Visor Prism)



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



Re: Colour bitmap in Alert

2000-09-26 Thread Tom Zerucha

On Mon, Sep 25, 2000 at 05:28:33PM -0700, Richard M. Hartman wrote:
> 
> 
> Tom Zerucha wrote in message <25316@palm-dev-forum>...
> >
> ...
> >Since I am doing imaging I do use 4 bit.  So do most other imaging
> >programs that run on something other than the IIIc.
> >
> 
> Really?  Most serious imaging apps I know of take 8bpp (palette
> of 256 colors)  as their LOW end.  4bpp is a palette of 16 colors.
> This is essentially the original DOS color mode ... not really suited
> for imaging.  What sort of imaging are you doing with color depth
> that low?

On the IIIc, it displays 8 bit with a custom color palette.

But On every other Palm device with an "EZ" processor I use 4 bit.

Tell me, how do you get 8 bit depth on a Palm V, III[ex], Visor, m100
or (noncolor) Clie?

(Basically I am simply displaying GIFs and PNGs on the palm for now,
but I still have to do some "imaging" to squeeze the images).

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



Re: Colour bitmap in Alert

2000-09-26 Thread Aaron Ardiri

> ok,  well,  i wrote an app for a IIIc with bitmap buttons,  and gave the
> button a bitmap family.  but for some reason running it on a spt 1740 the
> button appears, but with ascii type symbols. i'm using cw6.  could this be
> because the structs aren't the same in the differant os's for the buttons?
> if so,  how can this be done compatibly? with minimul changes?

  you see, this is one of the reasons i was lagging on supporting 3.5
  controls in PilRC (its in now, 2.6 will be released soon). what it
  sounds like you are doing is that you are using a resource object
  that ONLY exists in palmos 3.5 and greater.

  is the symbol running palmos 3.5? :)

  standard way to do "image button" on pre-3.5? is like this (PilRC)

---
BUTTON "" ID globalFormHelpButton AT (133 1 12 12) NOFRAME
FORMBITMAP AT (PrevLeft PrevTop) BITMAP bitmapHelp

BITMAP bitmapHelp  "images/help1bpp.bmp" COMPRESS
---

  of course, the "bitmap" definition could use a bitmap family if
  needed.. in my case, i didn't need it :)

  cheers

// az
[EMAIL PROTECTED]
http://www.ardiri.com/<--- free games!


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



Re: Colour bitmap in Alert

2000-09-26 Thread Charles Rezsonya

ok,  well,  i wrote an app for a IIIc with bitmap buttons,  and gave the
button a bitmap family.  but for some reason running it on a spt 1740 the
button appears, but with ascii type symbols. i'm using cw6.  could this be
because the structs aren't the same in the differant os's for the buttons?
if so,  how can this be done compatibly? with minimul changes?
-Original Message-
From: Aaron Ardiri <[EMAIL PROTECTED]>
To: Palm Developer Forum <[EMAIL PROTECTED]>
Date: Monday, September 25, 2000 9:26 AM
Subject: Re: Colour bitmap in Alert


>> oh so if the os takes care of the screen mode then os3.5 apps with bitmap
>> families won't work properly on a 3.1 device, eh?
>
>  bitmap families work way back :) just be careful of the bitmap version
>  bitmap families generated with pilrc will work back to palmos 1.0
>  - it will only show 1bpp tho :P
>
>// az
>[EMAIL PROTECTED]
>http://www.ardiri.com/<--- free games!
>
>
>--
>For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
>


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



Re: Colour bitmap in Alert

2000-09-25 Thread Richard M. Hartman



Tom Zerucha wrote in message <25316@palm-dev-forum>...
>
...
>Since I am doing imaging I do use 4 bit.  So do most other imaging
>programs that run on something other than the IIIc.
>

Really?  Most serious imaging apps I know of take 8bpp (palette
of 256 colors)  as their LOW end.  4bpp is a palette of 16 colors.
This is essentially the original DOS color mode ... not really suited
for imaging.  What sort of imaging are you doing with color depth
that low?

--
-Richard M. Hartman
[EMAIL PROTECTED]

186,000 mi/sec: not just a good idea, it's the LAW!




-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



Re: Colour bitmap in Alert

2000-09-25 Thread Tom Zerucha

On Mon, Sep 25, 2000 at 10:21:37AM -0700, David Fedor wrote:
> >So, two supplemental questions:
> >1) why does the PalmOS sample code use 1/2/8-bit icon/bitmaps but not
> >   4-bit ? Because no device has a 4-bit display ?
> 
> Well, nothing really uses 4-bit right now, though the Palm IIIc devices can
> certainly run in that mode if an app switches it to them.  And if you're in
> 4-bit mode the system will use the 2-bit family member, which is usually
> what you'd want anyway.  So we saved rom space and skipped that depth for
> now.

I wish you saved rom space by making some of the default apps optional
instead :).

Since I am doing imaging I do use 4 bit.  So do most other imaging
programs that run on something other than the IIIc.

> >2) What Palm device has a 2-bit display ?
> 
> Every device ever shipped so far actually can display in 2-bit mode, but
> the OS support for doing that only started in Palm OS 3.0.  And out of the
> box, everything runs in 1-bit mode except for the Palm IIIc (which defaults
> to 8 bits) and Web Clipping always switches the system to 2-bit mode.
> Other than those two exceptions, everything I know of just uses the default
> depth, so usually you're in 1-bit mode.

To add one detail, you need PalmOS 3.3 or greater for the set display
mode calls to set 4 bit mode.  So OS 3.1 devices (e.g. Handspring
Visors) can display 4 bit, but you can't do it with PalmOS calls.

This creates lots of fun code trying to display a 4bpp image on every
PalmOS device in the highest possible depth.

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



Re: Colour bitmap in Alert

2000-09-25 Thread David Fedor

>So, two supplemental questions:
>1) why does the PalmOS sample code use 1/2/8-bit icon/bitmaps but not
>   4-bit ? Because no device has a 4-bit display ?

Well, nothing really uses 4-bit right now, though the Palm IIIc devices can
certainly run in that mode if an app switches it to them.  And if you're in
4-bit mode the system will use the 2-bit family member, which is usually
what you'd want anyway.  So we saved rom space and skipped that depth for
now.


>2) What Palm device has a 2-bit display ?

Every device ever shipped so far actually can display in 2-bit mode, but
the OS support for doing that only started in Palm OS 3.0.  And out of the
box, everything runs in 1-bit mode except for the Palm IIIc (which defaults
to 8 bits) and Web Clipping always switches the system to 2-bit mode.
Other than those two exceptions, everything I know of just uses the default
depth, so usually you're in 1-bit mode.

-David Fedor
Palm Developer Support

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



Re: Colour bitmap in Alert

2000-09-25 Thread Aaron Ardiri

> oh so if the os takes care of the screen mode then os3.5 apps with bitmap
> families won't work properly on a 3.1 device, eh?

  bitmap families work way back :) just be careful of the bitmap version
  bitmap families generated with pilrc will work back to palmos 1.0
  - it will only show 1bpp tho :P

// az
[EMAIL PROTECTED]
http://www.ardiri.com/<--- free games!


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



Re: Colour bitmap in Alert

2000-09-25 Thread Charles Rezsonya

oh so if the os takes care of the screen mode then os3.5 apps with bitmap
families won't work properly on a 3.1 device, eh?

-Original Message-
From: Richard Burmeister <[EMAIL PROTECTED]>
To: Palm Developer Forum <[EMAIL PROTECTED]>
Date: Friday, September 22, 2000 3:41 PM
Subject: Re: Colour bitmap in Alert


>From: "John Cundall" <[EMAIL PROTECTED]>
>Subject: Colour bitmap in Alert
>
>
>> my question is, what do I have to do to get a colour bitmap to draw in
>> colour *in a dialog* ?
>
>That shouldn't cause any problems.  Are you using a Bitmap Family for the
>bitmap?  If so, you don't have to check the screen mode; the OS takes care
>of selecting the proper bitmap for the current screen depth.
>
>Here's code I use to display a modal dialog box, given the id of a form:
>
>static UInt16 ShowModalDialog( UInt16 frmID )
>{
>FormPtr prevForm, thisForm;
>UInt16 btn;
>
>prevForm = FrmGetActiveForm();
>thisForm = FrmInitForm( frmID );
>FrmSetActiveForm( thisForm );
>btn = FrmDoDialog( thisForm );
>if ( prevForm )
>FrmSetActiveForm( prevForm );
>FrmDeleteForm( thisForm );
>return btn;
>} // ShowModalDialog
>
>
>
>--
>For information on using the Palm Developer Forums, or to unsubscribe,

please see http://www.palmos.com/dev/tech/support/forums/
>


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



Re: Colour bitmap in Alert

2000-09-25 Thread John Cundall

Thanks Richard - using a Bitmap Family was the answer. For future 
reference, here's what I did in Constructor:
1) Delete the original Form Bitmap from the Form and save the project
   (I had some weird Constructor effects until I did this).
2) Create 3 bitmaps, at 1-, 2- and 8-bit depth, with resource IDs xxx1,
   xxx2 and xxx8 (1101, 1102 and 1108 in my case)
3) Create a bitmap family and add 3 family items to refer to the 3 
   bitmaps created in (2). The Bitmap Family's resource ID has no
   relationship to the Bitmap resource IDs; I used 1000.
4) Add a Form Bitmap to the form, and set the Form Bitmap's resource ID
   to the Bitmap Family created in (3), 1000 in my case.
That's it - the form now shows the right bitmap automagically (i.e. the
system sorts out 1/2/8-bit depth).

So, two supplemental questions:
1) why does the PalmOS sample code use 1/2/8-bit icon/bitmaps but not
   4-bit ? Because no device has a 4-bit display ?
2) What Palm device has a 2-bit display ?

John.

Richard Burmeister wrote:
> 
> From: "John Cundall" <[EMAIL PROTECTED]>
> Subject: Colour bitmap in Alert
> 
> > my question is, what do I have to do to get a colour bitmap to draw in
> > colour *in a dialog* ?
> 
> That shouldn't cause any problems.  Are you using a Bitmap Family for the
> bitmap?  If so, you don't have to check the screen mode; the OS takes care
> of selecting the proper bitmap for the current screen depth.
> 
> Here's code I use to display a modal dialog box, given the id of a form:
> 
> static UInt16 ShowModalDialog( UInt16 frmID )
> {
> FormPtr prevForm, thisForm;
> UInt16 btn;
> 
> prevForm = FrmGetActiveForm();
> thisForm = FrmInitForm( frmID );
> FrmSetActiveForm( thisForm );
> btn = FrmDoDialog( thisForm );
> if ( prevForm )
> FrmSetActiveForm( prevForm );
> FrmDeleteForm( thisForm );
> return btn;
> } // ShowModalDialog

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



Re: Colour bitmap in Alert

2000-09-22 Thread Richard Burmeister

From: "John Cundall" <[EMAIL PROTECTED]>
Subject: Colour bitmap in Alert


> my question is, what do I have to do to get a colour bitmap to draw in
> colour *in a dialog* ?

That shouldn't cause any problems.  Are you using a Bitmap Family for the
bitmap?  If so, you don't have to check the screen mode; the OS takes care
of selecting the proper bitmap for the current screen depth.

Here's code I use to display a modal dialog box, given the id of a form:

static UInt16 ShowModalDialog( UInt16 frmID )
{
FormPtr prevForm, thisForm;
UInt16 btn;

prevForm = FrmGetActiveForm();
thisForm = FrmInitForm( frmID );
FrmSetActiveForm( thisForm );
btn = FrmDoDialog( thisForm );
if ( prevForm )
FrmSetActiveForm( prevForm );
FrmDeleteForm( thisForm );
return btn;
} // ShowModalDialog



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



Colour bitmap in Alert

2000-09-22 Thread John Cundall

Hi,

Should a colour bitmap in an alert draw in colour on a colour device ? I
perhaps naively assumed I could create a Form in CodeWarrior's
Constructor (1.5b1), pop in a 256-colour bit map and just use
FrmDoDialog() to show the form as an alert (having checked the screen
mode of course) - when I do this, the bitmap draws in glorious ..uhmmm..
black and white (in POSE with the IIIc ROM and also on a real IIIc). So
my question is, what do I have to do to get a colour bitmap to draw in
colour *in a dialog* ?

John Cundall
<[EMAIL PROTECTED]>

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



bitmap colour fam's

2000-09-18 Thread Charles Rezsonya

recently i aquired a IIIc and am now playing around with the colour stuff.
i managed to figure out how to get colour buttons on the app running,  so i
tried creating a 1bpp bmp for the app and see if it ran it on a symbol spt
(which uses 1bpp).  but when the app is ran the button has a wierd couple
symbols in it and not the image i dictiate?

is it 'cause i'm using graphic buttons for it?  is it have anything to do
with the os version to utilize families?  or any other ideas  if i can't
use families then i can't really use the button up pic and button down pic
type thing,  right?

tia,
Charles Rezsonya
Palm Developer
ICQ 6470210
[EMAIL PROTECTED]


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



Re: PalmOS 3.5 8-bit Colour Palette

2000-09-14 Thread Tom Zerucha

On Wed, Sep 13, 2000 at 06:03:08PM -0700, Bill Janssen wrote:
> Tom Zerucha wrote:
> > IT isn't quite that consistent.  First you have the 6x6x6 color cube,
> > except the black isn't quite (I think it is 0x10 instead of 0).  You
> > do have 0x0 blacks, but I think the 255th entry is "transparent" black
> > which should be used if you want a transparent color.  There are four
> > colors not in the cube, and the other greys not in the cube.
> 
> Here's what the documentation says
> (http://www.palmos.com/dev/tech/docs/palmos/UserInterface.html#942638):
> 
>   Aa8-bit: 216 color "Web-safe" palette, which includes all
>   combinations of red, green, and blue at these levels: 0x00, 0x33,
>   0x66, 0x99, 0xCC, and 0xFF.  Also, it includes all 16 gray shades at
>   these levels: 0x00, 0x11, 0x22, ...  0xFF.  Finally, it includes these
>   extra named HTML colors: 0xC0C0C0 (silver), 0x808080 (gray), 0x80
>   (maroon), 0x800080 (purple), 0x008000 (green), and 0x008080 (teal).
>   The remaining 24 entries (indexes 0xE7 through 0xFE) are unspecified
>   and filled with black. (On debug ROMs they are filled with random
>   colors to help developers notice if they use an invalid value.) These
>   entries may be defined by an application.
> 
> So the documentation is wrong?
> 
> Bill

I don't know that the documentation is wrong, per se, only that the
IIIc has 4 bit A/Ds to generate the colors.  I've seen some duplicates
and those are probably it.

In effect it can only generate 16 discrete levels of gray.

00
11
22
...
77
808080
88
99

BB
C0C0C0
CC
DD
EE
FF

would be 18 levels.  C0x3 is probably BBx3, but might be CCx3.

(And the excerpt above doesn't mention 0xff).


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



Re: PalmOS 3.5 8-bit Colour Palette

2000-09-13 Thread Bill Janssen

Tom Zerucha wrote:
> IT isn't quite that consistent.  First you have the 6x6x6 color cube,
> except the black isn't quite (I think it is 0x10 instead of 0).  You
> do have 0x0 blacks, but I think the 255th entry is "transparent" black
> which should be used if you want a transparent color.  There are four
> colors not in the cube, and the other greys not in the cube.

Here's what the documentation says
(http://www.palmos.com/dev/tech/docs/palmos/UserInterface.html#942638):

  Aa8-bit: 216 color "Web-safe" palette, which includes all
  combinations of red, green, and blue at these levels: 0x00, 0x33,
  0x66, 0x99, 0xCC, and 0xFF.  Also, it includes all 16 gray shades at
  these levels: 0x00, 0x11, 0x22, ...  0xFF.  Finally, it includes these
  extra named HTML colors: 0xC0C0C0 (silver), 0x808080 (gray), 0x80
  (maroon), 0x800080 (purple), 0x008000 (green), and 0x008080 (teal).
  The remaining 24 entries (indexes 0xE7 through 0xFE) are unspecified
  and filled with black. (On debug ROMs they are filled with random
  colors to help developers notice if they use an invalid value.) These
  entries may be defined by an application.

So the documentation is wrong?

Bill

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



Re: PalmOS 3.5 8-bit Colour Palette

2000-09-12 Thread Tom Zerucha

On Tue, Sep 12, 2000 at 03:35:35PM -0700, Bob Whiteman wrote:
> The PalmOS Programmer's Companion indicates that the named HTML colour gray
> (0x808080) is a member of the PalmOS palette. I checked on a device, and the
> emulator, and this colour is not present.

This is probably a misprint.  The hardware is only capable of 4 bit
deep color, so each R, G, or B can only be 0, 0x11, 0x22,
0x33... 0xff.  0x77 is probably used for this.

> However, the Programmer's Companion writes that only the first 231 entries
> in the palette and the last entry are defined.
> 
> Summing the total number of colours up:
>  216 Web-safe colours
>   10 greys, giving us all posible values of grey.
> +  6 named HTML colours
> 
>  232

IT isn't quite that consistent.  First you have the 6x6x6 color cube,
except the black isn't quite (I think it is 0x10 instead of 0).  You
do have 0x0 blacks, but I think the 255th entry is "transparent" black
which should be used if you want a transparent color.  There are four
colors not in the cube, and the other greys not in the cube.

Also note the palette is programmable to any 256 of the possible 4096
colors, but your forms will look funny if you don't adjust them.  So
the "Standard" pallete is as noted there, but in reality you can
assign the remainder or even the entire 256.

(PiNGer, part of ZBoxZ uses the palette specified in the image file if
you want to see an example)

(Is there going to be colored cases, so you can have a gestalt so the
Palm will know the case color and map it's form color to match like
the iBook and iMac?...).

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



PalmOS 3.5 8-bit Colour Palette

2000-09-12 Thread Bob Whiteman

The PalmOS Programmer's Companion indicates that the named HTML colour gray
(0x808080) is a member of the PalmOS palette. I checked on a device, and the
emulator, and this colour is not present.

However, the Programmer's Companion writes that only the first 231 entries
in the palette and the last entry are defined.

Summing the total number of colours up:
 216 Web-safe colours
  10 greys, giving us all posible values of grey.
+  6 named HTML colours

 232

Which seems to be consistent. However, entries 0xE6 and 0xFF are both black
in my tests. Is this an error in documentation? Or is this an error in
implementation?

If it is an error in implementation, will it be corrected in future
revisions? Will index 0xE6 become 0x808080?

 Thanks in advance,
-Bob

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



Code example of colour buttons

2000-08-01 Thread Chris Olufson


I have been looking for code examples and/or documentation of how to
display buttons on a Palm form in colour.  After an extensive search of
the palm sites and the web in general, I have not been able to find what
I need.

So far the best idea I have is use a coloured bitmap on a graphic button
and draw the text pixel-by-pixel.  I would welcome a better idea or a
pointer to some examples.



Regards

Chris

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/