Today, I finally upgraded to FB-1.07.1 and now I get a compiler error
undefined reference to 'XFONT::INTERFACE::FORECOLOR__SET__(unsigned long)@8'
whenever I try to set the ForeColor as shown in the code below. The same problem occurs with BackColor. Fortunately, xFont is otherwise working with the default colors in FB-1.071
Code: Select all
#Include Once "xfont.bi"
Dim Shared As xfont.interface font
ScreenRes 640,480,32
Font.Loadfont ("Comic20.xf",1)
Font.FOntIndex = 1
font.forecolor = rgb(255,0,255)
font.drawstring (,"Hello World",50,50)
sleep
LeonHeart's xFont project at XaviorSoft is now shut down. I do have the source code (the link to the source code is dead). Here are some relevant sections
Code: Select all
'04 August 2008
'v 8.8.28 : Fix autolock problem [last edit 30 august 2008)
'v 10.6.17 : Support viewport now. Suport isLoaded property [last edit 17 June 2010)
'v 11.9.13 : Fix windows.bi include conflict.
#Include Once "file.bi"
#Include Once "crt/string.bi"
#Include Once "std_font_0.bas"
Namespace xfont
.
.
.
Type Interface'--------------------------------------------------------------------------------------------------
'Public
Declare Constructor ()
Declare Destructor ()
.
.
.
Declare Property ForeColor() As uInteger
Declare Property ForeColor(ByVal Expression As uInteger)
.
.
.
Property Interface.ForeColor(ByVal Expression As uInteger)
With xForeColor 'Selalu dalam 32-bit
.Red = (Expression Shr 16) And &HFF
.Green = (Expression Shr 8) And &HFF
.Blue = Expression And &HFF
.Alpha = (Expression Shr 24) And &HFF
.Palette = Expression
.AlphaFactor = AlphaFactor255(.Alpha)
.iAlphaFactor= iAlphaFactor255(.Alpha)
.AfRed = .AlphaFactor * .Red
.AfGreen = .AlphaFactor * .Green
.AfBlue = .AlphaFactor * .Blue
End With
ColorChange = _True_
'Print Expression
End property
'____________________________________________________________________________________________________________________________________________________
Property Interface.ForeColor() As uInteger
Return xForeColor.Palette
End property
'___________________
End namespace