1#ifndef __BITMAPTOOLKIT_TEXT_H__
2#define __BITMAPTOOLKIT_TEXT_H__
6#include <opencv2/opencv.hpp>
16#define BT_FONT_BOLD 0x1
17#define BT_FONT_ITALIC 0x10
18#define BT_FONT_ANTIALIAS 0x100
19#define BT_FONT_FILLED 0x0000
20#define BT_FONT_HOLLOW 0x1000
24#define BT_FONT_SERIF 1
25#define BT_FONT_SCRIPT 2
28#define BT_TEXT_HORIZ_MASK (0x1 << 0 | 0x1 << 1)
29#define BT_TEXT_HORIZ_LEFT (0x0 << 0)
30#define BT_TEXT_HORIZ_RIGHT (0x1 << 0)
31#define BT_TEXT_HORIZ_CENTERED (0x1 << 1)
32#define BT_TEXT_HORIZ_JUSTIFIED (0x1 << 0 | 0x1 << 1)
35#define BT_TEXT_VERT_MASK (0x1 << 2 | 0x1 << 3)
36#define BT_TEXT_VERT_TOP (0x0 << 0)
37#define BT_TEXT_VERT_CENTER (0x1 << 2)
38#define BT_TEXT_VERT_BOTTOM (0x1 << 3)
41#define BT_TEXT_WORD_WRAP (0x1 << 4)
42#define BT_CHARSET "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789,;:!./§&é(-è_çà@)]=}$¤*ùµ%"
43#define BT_CHARSETREF "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
58 static type&
get(std::string name);
59 static bool has(std::string name);
75 cv::Ptr<cv::freetype::FreeTypeFont> ft2;
80 face = cv::FONT_HERSHEY_SIMPLEX;
105int destroyCVFont(mmachine m, SCOL_PTR_TYPE handsys,
int obj);
int destroyCVFont(mmachine m, SCOL_PTR_TYPE handsys, int obj)
Ptr< FreeTypeFont > createFreeTypeFont()
Create FreeType2 Instance.
int _BTBLENDalphaBitmaps(mmachine m)
_BTBLENDalphaBitmaps : blends 2 alpha bitmaps. Takes a piece of the src to blit it in a piece of the ...
int _BTBLENDbitmaps(mmachine m)
_BTBLENDbitmaps : blends 2 bitmaps from percentage value. Takes a piece of the src to blit it in a pi...
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 _BTDRAWtextAlphaBitmap(mmachine m)
_BTDRAWtextAlphaBitmap : Draws a text to a bitmap Prototype: fun [AlphaBitmap ObjBTFont [I I] I I I S...
int _BTDRAWtextAreaAlphaBitmap(mmachine m)
_BTDRAWtextAreaAlphaBitmap : Draws a text to an alpha bitmap, within a defined area Prototype: fun [A...
int _BTDRAWtextBitmap(mmachine m)
_BTDRAWtextBitmap : Draws a text to a bitmap Prototype: fun [ObjBitmap S ObjBTFont [I I] I I] ObjBitm...
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
int _DSBTfont(mmachine m)
_DSBTfont : Deletes a cv font object Prototype: fun [ObjBTFont] I
int _BTDRAWtextAreaBitmap(mmachine m)
_BTDRAWtextAreaBitmap : Draws a text to a bitmap, within a defined area Prototype: fun [ObjBitmap Obj...
type(int f=0, bool b=false, bool eb=false, bool i=false)
static type & get(std::string name)
static bool has(std::string name)
static std::map< std::string, type > font_to_cv