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

Font_ScanString

Programmer's Reference Manuals
» Part 8 - Non-kernel input/output
» The Font Manager
» SWI Calls
» Font_ScanString

Font_ScanString

(SWI &400A1)
Entry
R0 Initial font handle, or 0 for current
R1 Pointer to string
R2 Flags
R3 X co-ordinate of mouse click, or width of string
R4 Y co-ordinate of mouse click, or height of string
R5 Pointer to block
R6 Pointer to Font Transformation Matrix
R7 Length of string
Exit
R1 Pointer to where scan ended
R2 Preserved
R3 X of where scan ended
R4 Y of where scan ended
R5 Preserved
R6 Preserved
R7 Number of split characters in scanned part of string

Use

This purpose of this call is to return information on a string.

Notes

How to use the call:

How wide is a string?
Use large values for R3, R4 and no split character.

Given width, how much of a string will fit?
Use correct width in R3, large value in R4 and (if needed) a split character in the buffer at R5.

Address of a mouse click?
Use correct width in R3, large value in R4 and (if needed) a split character in the buffer at R5.

Graphical position of a caret?
Set R7 to offset into string, use huge values for R3 and R4, and no split.

The flags in R2 determine how this call is used. Registers R0, R5, R6 and R7 are only used if bits 5, 6, 7 and 8 are set in flags in R2.

Unlike Font_Paint, this call only allows millipoints for all co-ordinates.

See also

  • Font Transformation Matrix
  • Font_ScanString Flags
  • Font_ScanString Block
  • Font_FutureFont
  • Font_Paint
Created on October 24, 2009 21:12:36 by Alan Robertson (52)? (127.0.0.1)
Edit | Views: Print | Source | Linked from: The Font Manager SWI Calls, Font_FutureRGB, Font_FindCaret, Font_FindCaretJ, Font_Paint String Forms, Font_ReadFontMetrics, Font_ScanString Flags, Font_ScanString Block, Font_StringBBox, Font_StringWidth

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