Project

General

Profile

$wrap » History » Revision 3

Revision 2 (Per Amundsen, 12/23/2018 04:51 AM) → Revision 3/6 (Per Amundsen, 01/14/2019 03:27 AM)

_Added in 3.3_ 

 *$wrap(text, font, size, width, [word,] N)* 

 Returns the Nth line in text wrapped to the specified width in pixels. 

 *Parameters* 

 text - The text to wrap. 
 font - The font to wrap with. 
 size - The font size to wrap with. 
 width - The width in pixels for the area to wrap to. 
 [word] - If specified with "1" or word is not specified, the wrapping is performed on whole words, otherwise performed on max length. 
 N - If N = 0 number of wrapped lines, otherwise the Nth wrapped line. 

 *Properties* 

 .cc - Retain the control used for the previous line. 

 *Example* 

 <pre> 
 ; Show number of wrapped line for this text. 
 //echo -ag Number of wrapped lines is $wrap(veeeeeeerrrrrry long line, verdana, 9, 100, 0) 

 ; Show the first wrapped line for this text. 
 //echo -ag The first wrapped line is $wrap(veeeeeeerrrrrry long line, verdana, 9, 100, 1) 
 </pre>