ColourTrans_ReturnFontColours ?
Rick Murray (539) 13840 posts |
Can anybody confirm that this SWI is broken? On my Pi, homebrew RISC OS 5.21 dating from around November 2014, the Surely this is the job of the SWI
Update: On proper release of RISC OS 5.23 dated 5th July (with ZeroPain) – same behaviour. |
Jeffrey Lee (213) 6048 posts |
This is one of those nasty situations where the OS doesn’t really deal with 256 colour (let alone true colour) properly. The PRM entry for Font_SetFontColour reveals what’s going on – in >= 256 colour modes, the colour values given in R1 and R2 are indices from 0-15 into the palette that’s set by Font_SetPalette. So the only way that ColourTrans_ReturnFontColours/ColourTrans_SetFontColours can work for true colour values is if it also modifies the font manager’s 16 entry palette. Looking at the code, ColourTrans will use the lower 4 bits of R1 and R2 to work out which font manager palette indices to use – so if you use non-zero values for them then you should be able to get ColourTrans_ReturnFontColours to work with up to 16 different colours at a time. |