infratec wrote:Or it has something todo with the floatingpoint arithmetic, since the size parameter is .d
I was hoping the floats are leading to smoother results - and this seems to be correct for normal (see below), using non vector functions would lead to a more wobbling effect...
Code: Select all
#X=960
#Y=640
;LoadFont(1,"Benguiat",15)
LoadFont(1,"Segoe UI",15)
Procedure Draw(time)
Protected s.s
Protected frames,now
Protected alpha,glass,color
Protected fx.f,fy.f,fw.f,fs.f
Protected delta.f
StartVectorDrawing(CanvasVectorOutput(0))
VectorSourceColor($FF000000)
FillVectorOutput()
#Width=0.012
If time>=0 And time<500
now=time
frames=200
delta=now/frames
fs=3000+delta*-400-time*4
alpha=$FF000000
glass=$60000000
VectorFont(FontID(1),fs)
fx=300+delta*20-VectorTextWidth("N")/2
fy=450+delta*80-VectorTextHeight("N")/2
fw=1+#Width*fs
MovePathCursor(fx,fy)
AddPathText("N")
VectorSourceColor(alpha|$0000D0)
StrokePath(fw)
MovePathCursor(fx,fy)
AddPathText("N")
VectorSourceColor(glass|$1010FF)
StrokePath(fw*1.4)
MovePathCursor(fx,fy)
AddPathText("N")
VectorSourceColor(glass|$1010FF)
fs/10
DashPath(fw*0.9,fs,#PB_Path_DiagonalCorner,fs)
EndIf
StopVectorDrawing()
EndProcedure
OpenWindow(0,0,0,#X,#Y,"*",#PB_Window_ScreenCentered|#PB_Window_BorderLess)
StickyWindow(0,1)
CanvasGadget(0,0,0,#X,#Y)
AddWindowTimer(0,0,10)
Repeat
Select WaitWindowEvent()
Case #PB_Event_Timer
time+1
Draw(time)
Case #PB_Event_CloseWindow,#WM_CHAR
End
EndSelect
ForEver