Hi,
We have an outline text function that only works some of the time?
Can someone look at below source code and let us know what is wrong with it?
Thanks in advance!
Jesse
function CreateAndInitializeOutlinedText (outline as integer, index as integer, text as string, font as integer, size as integer, red as integer, green as integer, blue as integer
, alpha as integer, outRed as integer, outGreen as integer, outBlue as integer, horizontalJustification as integer, screenX as integer, screenY as integer, depth as integer )
size = (size+2)
outlineIndex as integer
outlineIndex = 1
if outline = TRUE
posX as integer
posY as integer
for posX = -2 to 2 step 1
for posY = -2 to 2 step 1
CreateText( index+outlineIndex, text )
SetTextFont( index+outlineIndex, font )
SetTextSize(index+outlineIndex, size)
if posX = -2 and posY = -2
dec screenY, ( GetTextTotalHeight(index+outlineIndex)/2 )
endif
SetTextColor(index+outlineIndex, outRed, outGreen, outBlue, alpha)
SetTextAlignment(index+outlineIndex, horizontalJustification)
SetTextPosition(index+outlineIndex, screenX+posX, screenY+posY)
SetTextDepth(index+outlineIndex, depth)
inc outlineIndex, 1
next posY
next posX
else
outlineIndex = 26
endif
CreateText( index, text )
SetTextFont( index, font )
SetTextSize(index, size)
if outline = FALSE then dec screenY, ( GetTextTotalHeight(index)/2 )
SetTextColor(index, red, green, blue, alpha)
SetTextAlignment(index, horizontalJustification)
SetTextPosition(index, screenX, screenY)
SetTextDepth(index, depth)
inc CurrentMinTextIndex, outlineIndex
endfunction index