Seed7 - The extensible programming language
Seed7 FAQ Manual Screenshots Examples Libraries Algorithms Download Links
Libraries AES ARC4 Array ASN.1 Bigfile Bigint Bigrat Bin32 Bin64 Bitdata Bitmapfont Bitset Bitsetof Boolean Browser Bstring Bytedata Cards Category CC config Cgi Cgi dialog Char Charsets Cipher Clib_file Color CLI Commands Complex Console Crc32 Deflate DES Dialog Dir Draw Duration Echo Editline Enable_input Enable_io Enable_output Encoding Environment External_file File File system Float Font Forloop Ftp Getf Gethttp Gethttps Graph Graph_file Gzip Hash Hashsetof Hmac Html_ent Httpserv Idxarray Image Inflate Inflate file Inifile Integer Keybd Line Listener LZW Make Math Msgdigest Null_file Osfiles Picture utility Pixmap_file Pixmapfont PKCS #1 Poll Process Progs Propertyfile Rational Reference Ref_list Scanfile Scanstri Set Shell Smtp Sockbase Socket SQL base Stdio Strifile String Stritext Subrange Tar Text Time TLS/SSL Triple DES Unicode Utf16 Utf8 Vectorfont 3D Vector Window Wrinum X.509 Xmldom Xml_ent Zip
Libraries
Vectorfont Source Code
 previous   up   next 

Types
vectorFont
Font implementation type for vector fonts.

vectorFont

const type: vectorFont

Font implementation type for vector fonts. The following vector fonts are available: vecfont18.s7i, cronos16.s7i, cronos27.s7i, modern27.s7i


Function Summary
integer
width (in vectorFont: vecFont, in string: stri)
Determine the pixel width of a string displayed with a font.
integer
numOfCharsInWidth (in vectorFont: vecFont, in string: stri, in integer: allowedWidth)
Compute how many chars fit in a width, when stri is displayed.
PRIMITIVE_WINDOW
genPixmap (in vectorFont: vecFont, in charVectorType: charVectors, in color: foreground, in color: background, in integer: scale)
Create a pixmap from charVectors.
pixmapFontType
genPixmapFont (in vectorFont: vecFont, in integer: fontSize, in integer: scale, in color: foreground, in color: background)
Create a pixmap font from a vector font.
PRIMITIVE_WINDOW
getFontCharPixmap (in vectorFont: vecFont, inout pixmapFontType: pixmapFont, in char: ch)
Get the pixmap of a given vectorFont and char.
integer
columnWidth (in fontVectorType: fontVectors)
Determine the maximal column width of all chars in a fontVectorType.

Function Detail

width

const func integer: width (in vectorFont: vecFont, in string: stri)

Determine the pixel width of a string displayed with a font.

Returns:
the pixel width of stri displayed with vecFont.

numOfCharsInWidth

const func integer: numOfCharsInWidth (in vectorFont: vecFont, in string: stri, in integer: allowedWidth)

Compute how many chars fit in a width, when stri is displayed. This is done for the given vecFont. The allowedWidth is specified in pixels. The expression:

numOfCharsInWidth(aFont, stri, width(aFont, stri))

will always be equivalent to

length(stri);
Returns:
the number of chars from stri that fit into allowedWidth when stri is displayed with vecFont.

genPixmap

const func PRIMITIVE_WINDOW: genPixmap (in vectorFont: vecFont, in charVectorType: charVectors, in color: foreground, in color: background, in integer: scale)

Create a pixmap from charVectors. The charVectorType describes an array of filled polygons. Together the filled polygons define a pixmap. The background is used as backgound of the pixmap and the foreground is used as color for the filled polygons. The scale parameter is used to scale the pixmap, but does not scale the polygons.

Returns:
the created pixmap.

genPixmapFont

const func pixmapFontType: genPixmapFont (in vectorFont: vecFont, in integer: fontSize, in integer: scale, in color: foreground, in color: background)

Create a pixmap font from a vector font. The pixmapFont structure is set up and the pixmap for space (' ') is created. The pixmaps of other characters are created on demand with getFontCharPixmap.

Returns:
the created pixmap font.

getFontCharPixmap

const func PRIMITIVE_WINDOW: getFontCharPixmap (in vectorFont: vecFont, inout pixmapFontType: pixmapFont, in char: ch)

Get the pixmap of a given vectorFont and char. This function is used to create character pixmaps on demand.

Returns:
the pixmap of the character ch.

columnWidth

const func integer: columnWidth (in fontVectorType: fontVectors)

Determine the maximal column width of all chars in a fontVectorType. This is used as helper function when a font is defined.

Returns:
the maximal column width of all chars in fontVectorType.


 previous   up   next