Home
Developer Resources
QNX RTOS v4
QNX RTOS v4 Knowledge Base

QNX RTOS v4 Knowledge Base

Foundry27
Foundry27
QNX RTOS v4 project
Resources

QNX RTOS v4 Knowledge Base

Title Forcing a photon app to give up color index of 255
Ref. No. QNX.000009937
Category(ies) Development, Configuration
Issue When we attempt to force a photon appl to give up color index 255 for use as a color key value, several applications (pterm, pwm) seem to disregard the changes that we make. Could you confirm this behaviour and suggest a solution for it?
Solution It is impossible to force pterm to give up colour index 255 because pterm does not use color indexes. The RGB values that pterm uses do not get converted to palette entries until they reach the graphics driver. If you are running a direct color driver or a 16 color driver, there is no such thing as color index 255 -- and pterm does not care what kind of driver is run.

For its cursor, pterm uses the XOR drawing mode:
x09PgSetDrawMode(Pg_DRAWMODE_XOR);
x09PgSetFillXORColor(fg, bg);
x09PgDrawRect(&rect, Pg_DRAW_FILL);

Fg and bg are the RGB values that were used for drawing the character under the cursor. This is not supposed to generate any color indexes other than the two used for fg and bg -- and if it does, it is a bug in the graphics driver.