As a test I doubled my text objects, shifted them by one pixel and blended them with transparency depending on their position. This helps a bit, but of course the letters become transparent when blending and there are brightness fluctuations. To hide these, I placed a third non-transparent text object in front of it and blended the other two with two pixels between them. But for this the font must not have a border of a different color.
The program shows these trials: on the left the normal text and next to it the three experiments.
To see how the objects are blended, you can initialize xoffset with a non-zero value.
By the way, the blending is done with gamma correction, because otherwise at least with a black background, a pulsing of the horizontal lines could be seen.
In this way it looks good, but this method is not really practical, because I have to move three times the number of objects, and I can't show a border anymore, which I had used as a makeshift blur. Also, the characters are one pixel too high this way.
Would a similar drawing mode perhaps be a useful enhancement for a future Hollywood version?
I just hope I haven't overlooked a Hollywood feature that can do something like this already.
Ralf
Code: Select all
Function p_Scroll()
CurrentTimer=GetTimer(1)
timerdelta=CurrentTimer-LastTimer
LastTimer=CurrentTimer
ydelta=scrollspeed * (timerdelta/1000)
ypos=ypos-ydelta
If ypos<0-fsize Then ypos=startpos
gamma=1.5
yta=Int(Frac(ypos+2000)^gamma*256) ; transparency a
ytb=255-Int(Frac(ypos+2000)^(1/gamma)*256) ; transparency b
BeginRefresh()
SetLayerStyle("T1", {Y=ypos})
SetLayerStyle("T2a", {X=xpos2-xoffset/2, Y=ypos-1, Transparency=yta})
SetLayerStyle("T2b", {X=xpos2+xoffset/2, Y=ypos, Transparency=ytb})
SetLayerStyle("T3a", {X=xpos3-xoffset, Y=ypos-1, Transparency=yta})
SetLayerStyle("T3b", {X=xpos3+xoffset, Y=ypos+1, Transparency=ytb})
SetLayerStyle("T3c", {Y=ypos})
SetLayerStyle("T4a", {X=xpos4-xoffset, Y=ypos-1, Transparency=yta})
SetLayerStyle("T4b", {X=xpos4+xoffset, Y=ypos+1, Transparency=ytb})
SetLayerStyle("T4c", {Y=ypos})
EndRefresh()
If xoffset>0 Then xoffset=50-CurrentTimer/500
If xoffset<0 Then xoffset=0
EndFunction
@DISPLAY {Width = 650, Height = 400, Color = $555555, Layers = True}
startpos=GetAttribute(#DISPLAY, 1, #ATTRHEIGHT)
fsize=100
ypos=startpos-fsize
xoffset=0
SetFont(#SERIF, fsize)
SetFontColor("$FFAA22")
SetFontStyle(#BORDER, #WHITE, 1)
scrollspeed=1.5 ; pixel/s
xpos1=50
TextOut(xpos1, ypos, "T", {Name="T1", Transparency=0})
xpos2=200
TextOut(xpos2, ypos, "T", {Name="T2a", Transparency=0})
TextOut(xpos2, ypos, "T", {Name="T2b", Transparency=0})
xpos3=350
TextOut(xpos3, ypos, "T", {Name="T3a", Transparency=0})
TextOut(xpos3, ypos, "T", {Name="T3b", Transparency=0})
TextOut(xpos3, ypos, "T", {Name="T3c", Transparency=0})
xpos4=500
SetFontStyle(#BORDER, "$FFAA22", 1)
TextOut(xpos4, ypos, "T", {Name="T4a", Transparency=0})
TextOut(xpos4, ypos, "T", {Name="T4b", Transparency=0})
TextOut(xpos4, ypos, "T", {Name="T4c", Transparency=0})
StartTimer(1)
Period=1000/27 ; 27 Hz refresh frequency
SetInterval(1, p_Scroll, Period)
Repeat
WaitEvent
Forever