but i am in trouble with any unicode issues, in PB 5.50 how to plot french or german chars which have marks over it such as é , or hauptsächlich, in english windows ? thanks in advance for any code variations, amusements or ideas.
notes: change magnify to other value to fit the graphics within the window
Code: Select all
OpenWindow(0, 0, 0, 800, 600, "VectorDrawing", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
CanvasGadget(0, 2, 2, 795, 595, #PB_Canvas_Border )
magnify = 7
x = 400 : y = 300
chars.s = "cupoftea"; "zzzz"
chars = UCase(chars)
Dim charValue(26)
For i=1 To 26
Read.l charValue(i)
Next
StartDrawing(CanvasOutput(0))
Circle(x,y,3, RGB(255,0,0))
StopDrawing()
If StartVectorDrawing(CanvasVectorOutput(0))
MovePathCursor(x, y)
For i=1 To Len(chars)
letterValue = charValue(Asc(Mid(chars, i, 1))-64)
turn = turn + 1
If turn = 5
turn = 1
EndIf
Select turn
Case 1
x = x + letterValue * magnify
Case 2
y = y - letterValue * magnify
Case 3
x = x - letterValue * magnify
Case 4
y = y + letterValue * magnify
EndSelect
VectorSourceColor(RGBA(50, 0, 255, 255))
AddPathLine(x, y, #PB_Path_Default)
StrokePath(1, #PB_Path_Preserve)
Next
StopVectorDrawing()
EndIf
StartDrawing(CanvasOutput(0))
Circle(x,y,3, RGB(255,0,0))
StopDrawing()
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
DataSection
Data.l 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26
EndDataSection