AGK for Pascal
ContentsIndexHome
PreviousUpNext
TAgkText.HitText Method (TAgkPoint)

Returns True if the given point in world coordinates is inside the bounding box of the text.

Syntax
Pascal
function HitText(const P: TAgkPoint): Boolean; overload;
Parameters 
Description 
const P: TAgkPoint 
The position in world coordinates to check. 

If you are testing a mouse or touch coordinate, remember to convert it to world coordinates using TAgkScene.ScreenToWorld

This does not take into account individual character positions. For example if you have positioned a character using SetCharPos or similar. Only the bounding box created by drawing the characters in their default positions is checked.

Copyright (c) 2012. All rights reserved.