BitmapToolkit Scol plugin
Functions
TextToolkit

Functions

int _CRBTfont (mmachine m)
 _CRBTfont : Creates a ObjBTFont object Prototype: fun [Chn S I I F] ObjBTFont
 
int _CRBTfontFromFile (mmachine m)
 _CRBTfontFromFile : Creates a ObjBTFont object Prototype: fun [Chn P I I F] ObjBTFont
 
int _DSBTfont (mmachine m)
 _DSBTfont : Deletes a cv font object Prototype: fun [ObjBTFont] I
 
int _BTDRAWtextBitmap (mmachine m)
 _BTDRAWtextBitmap : Draws a text to a bitmap Prototype: fun [ObjBitmap S ObjBTFont [I I] I I] ObjBitmap
 
int _BTDRAWtextAreaBitmap (mmachine m)
 _BTDRAWtextAreaBitmap : Draws a text to a bitmap, within a defined area Prototype: fun [ObjBitmap ObjBTFont [I I I I] [I I] I I S] ObjBitmap
 
int _BTDRAWtextAlphaBitmap (mmachine m)
 _BTDRAWtextAlphaBitmap : Draws a text to a bitmap Prototype: fun [AlphaBitmap ObjBTFont [I I] I I I S] AlphaBitmap
 
int _BTDRAWtextAreaAlphaBitmap (mmachine m)
 _BTDRAWtextAreaAlphaBitmap : Draws a text to an alpha bitmap, within a defined area Prototype: fun [AlphaBitmap ObjBTFont [I I I I] [I I] I I I S] AlphaBitmap
 
int _BTGETtextSize (mmachine m)
 _BTGETtextSize : Gets the length of a text line Prototype: fun [ObjBTFont S] [I I]
 
int _BTGETtextAreaHeight (mmachine m)
 _BTGETtextAreaHeight : Gets the height of a formated text area Prototype: fun [ObjBTFont S I I] I
 

Detailed Description

Scol functions for bitmap manipulation

Function Documentation

◆ _BTDRAWtextAlphaBitmap()

int _BTDRAWtextAlphaBitmap ( mmachine  m)

_BTDRAWtextAlphaBitmap : Draws a text to a bitmap Prototype: fun [AlphaBitmap ObjBTFont [I I] I I I S] AlphaBitmap

Parameters
AlphaBitmap: input bitmap
ObjBTFont: font to use
[II] : coordinates [x y]
I: alignment flags 0:BT_TEXT_HORIZ_LEFT, 1:BT_TEXT_HORIZ_RIGHT, 2:BT_TEXT_HORIZ_CENTERED, 3:BT_TEXT_HORIZ_JUSTIFIED, default:BT_TEXT_HORIZ_LEFT 0:BT_TEXT_VERT_TOP, 4:BT_TEXT_VERT_CENTER, 8:BT_TEXT_VERT_BOTTOM, default:BT_TEXT_VERT_TOP
I: color
I: opacity
S: text to draw
Returns
AlphaBitmap : bitmap with text on it if success or nil otherwise

Definition at line 977 of file BitmapToolkitText.cpp.

◆ _BTDRAWtextAreaAlphaBitmap()

int _BTDRAWtextAreaAlphaBitmap ( mmachine  m)

_BTDRAWtextAreaAlphaBitmap : Draws a text to an alpha bitmap, within a defined area Prototype: fun [AlphaBitmap ObjBTFont [I I I I] [I I] I I I S] AlphaBitmap

Parameters
AlphaBitmap: input alpha bitmap
ObjBTFont: font to use
[II I I] : rect [x y w h]
[II] : X and Y text position offset
I: alignment flags 0:BT_TEXT_HORIZ_LEFT, 1:BT_TEXT_HORIZ_RIGHT, 2:BT_TEXT_HORIZ_CENTERED, 3:BT_TEXT_HORIZ_JUSTIFIED, default:BT_TEXT_HORIZ_LEFT 0:BT_TEXT_VERT_TOP, 4:BT_TEXT_VERT_CENTER, 8:BT_TEXT_VERT_BOTTOM, default:BT_TEXT_VERT_TOP 16:BT_TEXT_WORD_WRAP
I: color
I: opacity
S: text to draw
Returns
AlphaBitmap : alpha bitmap with text on it if success or nil otherwise

Definition at line 1175 of file BitmapToolkitText.cpp.

◆ _BTDRAWtextAreaBitmap()

int _BTDRAWtextAreaBitmap ( mmachine  m)

_BTDRAWtextAreaBitmap : Draws a text to a bitmap, within a defined area Prototype: fun [ObjBitmap ObjBTFont [I I I I] [I I] I I S] ObjBitmap

Parameters
ObjBitmap: input bitmap
ObjBTFont: font to use
[II I I] : rect [x y w h]
[II] : X and Y text position offset
I: alignment flags 0:BT_TEXT_HORIZ_LEFT, 1:BT_TEXT_HORIZ_RIGHT, 2:BT_TEXT_HORIZ_CENTERED, 3:BT_TEXT_HORIZ_JUSTIFIED, default:BT_TEXT_HORIZ_LEFT 0:BT_TEXT_VERT_TOP, 4:BT_TEXT_VERT_CENTER, 8:BT_TEXT_VERT_BOTTOM, default:BT_TEXT_VERT_TOP 16:BT_TEXT_WORD_WRAP
I: color
S: text to draw
Returns
ObjBitmap : bitmap with text on it if success or nil otherwise

Definition at line 723 of file BitmapToolkitText.cpp.

◆ _BTDRAWtextBitmap()

int _BTDRAWtextBitmap ( mmachine  m)

_BTDRAWtextBitmap : Draws a text to a bitmap Prototype: fun [ObjBitmap S ObjBTFont [I I] I I] ObjBitmap

Parameters
ObjBitmap: input bitmap
ObjBTFont: font to use
[II] : coordinates [x y]
I: alignment flags 0:BT_TEXT_HORIZ_LEFT, 1:BT_TEXT_HORIZ_RIGHT, 2:BT_TEXT_HORIZ_CENTERED, 3:BT_TEXT_HORIZ_JUSTIFIED, default:BT_TEXT_HORIZ_LEFT 0:BT_TEXT_VERT_TOP, 4:BT_TEXT_VERT_CENTER, 8:BT_TEXT_VERT_BOTTOM, default:BT_TEXT_VERT_TOP
I: color
S: text to draw
Returns
ObjBitmap : bitmap with text on it if success or nil otherwise

Definition at line 553 of file BitmapToolkitText.cpp.

◆ _BTGETtextAreaHeight()

int _BTGETtextAreaHeight ( mmachine  m)

_BTGETtextAreaHeight : Gets the height of a formated text area Prototype: fun [ObjBTFont S I I] I

Parameters
ObjBTFont: font to use
S: text
I: text align flags
I: area width
Returns
I : text area height

Definition at line 1542 of file BitmapToolkitText.cpp.

◆ _BTGETtextSize()

int _BTGETtextSize ( mmachine  m)

_BTGETtextSize : Gets the length of a text line Prototype: fun [ObjBTFont S] [I I]

Parameters
ObjBTFont: font to use
S: text
Returns
[I I] : line size

Definition at line 1451 of file BitmapToolkitText.cpp.

◆ _CRBTfont()

int _CRBTfont ( mmachine  m)

_CRBTfont : Creates a ObjBTFont object Prototype: fun [Chn S I I F] ObjBTFont

Parameters
Chn: channel
S: face (gets font to draw by its name)
I: size
I: flags (BT_FONT_BOLD, BT_FONT_ITALIC, BT_FONT_ANTIALIAS, BT_FONT_FILLED, BT_FONT_HOLLOW)
F: line offset ratio
Returns
ObjBTFont : the created font

Definition at line 216 of file BitmapToolkitText.cpp.

◆ _CRBTfontFromFile()

int _CRBTfontFromFile ( mmachine  m)

_CRBTfontFromFile : Creates a ObjBTFont object Prototype: fun [Chn P I I F] ObjBTFont

Parameters
Chn: channel
P: font file path
I: size
I: flags (BT_FONT_BOLD, BT_FONT_ITALIC, BT_FONT_ANTIALIAS, BT_FONT_FILLED, BT_FONT_HOLLOW)
F: line offset ratio
Returns
ObjBTFont : the created font

Definition at line 366 of file BitmapToolkitText.cpp.

◆ _DSBTfont()

int _DSBTfont ( mmachine  m)

_DSBTfont : Deletes a cv font object Prototype: fun [ObjBTFont] I

Parameters
ObjBTFont: font to destroy
Returns
I : 1 on success 0 otherwise

Definition at line 523 of file BitmapToolkitText.cpp.