RISC OS Open
A fast and easily customised operating system for ARM devices
ROOL
Home | News | Software | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

ColourTrans_ReturnFontColours

Programmer's Reference Manuals
» Part 8 - Non-kernel input/output
» ColourTrans
» SWI Calls
» ColourTrans_ReturnFontColours

ColourTrans_ ReturnFontColours

(SWI &4074E)
Entry
R0 Font handle, or 0 for current font
R1 Background palette entry
R2 Foreground palette entry
R3 Maximum foreground colour offset (0-14)
Exit
R0 Preserved
R1 Background logical colour (preserved if in 256 colour mode)
R2 Foreground logical colour
R3 Maximum sensible colour offset (up to R3 on entry)

Use

This purpose of this call is to return the maximum range of colour than can be sensibly used, given the background, foreground and number of anti-aliasing colour desired.

Notes

For any given palette entries passed in R1 and R2, it finds the best fit in the current palette, and then inspects the other available colours to deduce the maximum possible amount of anti-aliasing up to the limit passed in R3.

If anti-aliasing is desirable, R3 should equal 14 on entry, otherwise set to 0 for monochrome.

The values in R – R3 on exit are suitable for passing to Font_SetFontColours, or including in a font string in a command (18) sequence.

In 256 colour modes only 16 colours can be set before previously returned information becomes invalid – this is the source of the 16 colour change limitation in Font_Paint.

The 24-bit palette entries are in the &BBGGRR00 format.

See also

  • ColourTrans_ReturnColourNumber
  • ColourTrans_ReturnColourNumberForMode
  • ColourTrans_ReturnGCOL
  • ColourTrans_ReturnGCOLForMode
  • ColourTrans_SetFontColours
Created on September 27, 2009 14:22:26 by Alan Robertson (52)? (127.0.0.1)
Edit | Views: Print | Source | Linked from: ColourTrans SWI Calls, ColourTrans Miscellaneous, ColourTrans_ReturnColourNumber, ColourTrans_ReturnColourNumberForMode, ColourTrans_ReturnGCOL, ColourTrans_ReturnGCOLForMode, ColourTrans_SetFontColours, ColourTrans_SetGCOL, Colour Vector SWI Numbers

Search the Wiki

Commercial use

For commercial enquiries, please contact the owners of RISC OS, Castle Technology Ltd.

ROOL Store

The official C/C++ Development kit and more here.

Donate! Why?

Help ROOL make things happen – please consider donating!

Navigation

  • Home Page
  • All Pages
  • Recently Revised
  • Authors
  • Feeds
Site design © RISC OS Open Limited 2011 except where indicated
The RISC OS Open Instiki theme is based on Insitki's default layout

Valid XHTML 1.0  |  Valid CSS

Instiki 0.19.1(MML+)
This site runs on Rails

Hosted by Arachsys