JCL Help:TJclBitmap32.TextExtent

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Returns the width and height, in pixels, of a string rendered in the current Font.


Pascal

 public function TextExtent(const Text: string): TSize;


Description

Use TextExtent to determine the space a string will occupy in the image. Other elements in the image such as lines, boxes, or additional lines of text can be positioned to accommodate the size of the text. TextExtent returns the width and height of the rectangle that bounds the text on the bitmap.
To check only the height, call TextHeight. To check only the width, call TextWidth.


See Also

Font RenderText TextHeight TextOut TextWidth TSize


About

Donator

Alex Denissov


Notes

The size returned by this function may differ from the actual width of the text produced by RenderText function, especially when using raster fonts.


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page