I newbie in programming world, but I try do something. However – sorry for my question if it stupid question.
Example source code:
Question:
1) Why Pencil tool so slow drawing in ppc?(if quick drawing on Qtek s100 CPU 416 MEM 40mbFree)
2) Maybe I do something wrong? Or basic44pc work slow with calculates X Y coordinate every times?
3) Are there any ways to do this?
And sorry for my bad English – I from Ukraine
Source example in file:
Example source code:
B4X:
Sub Globals
MouseDown=False
Pencil=0
Brush=0
Mouse=0
x1=0
y1=0
x2=0
y2=0
End Sub
Sub App_Start
frmMain.Show
End Sub
Sub Pencil_Click
Pencil=1
Brush=0
End Sub
Sub Brush_Click
Pencil=0
Brush=1
End Sub
Sub frmMain_MouseMove (x,y)
If Pencil=1 AND Mouse=1 Then
x2=x
y2=y
frmMain.Line(x1,y1,x2,y2,0,0,0)
If x1<>x2 OR y1<>y2 Then
x1=x2
y1=y2
End If
End If
If Brush=1 AND Mouse=1 Then
x2=x
y2=y
frmMain.Circle(x2,y2,3,0,0,0,f)
End If
End Sub
Sub frmMain_MouseDown (x,y)
x1=x
y1=y
Mouse=1
End Sub
Sub frmMain_MouseUp (x,y)
Mouse=0
End Sub
1) Why Pencil tool so slow drawing in ppc?(if quick drawing on Qtek s100 CPU 416 MEM 40mbFree)
2) Maybe I do something wrong? Or basic44pc work slow with calculates X Y coordinate every times?
3) Are there any ways to do this?
And sorry for my bad English – I from Ukraine
Source example in file:
Last edited: