Hi to everyone,
I have some problem with this widget code. There's no error compiling it but I don't see any image.
Thank you in advance who help me.
obviously ImageView1 is a view in the Widget Layout.
bye
I have some problem with this widget code. There's no error compiling it but I don't see any image.
Thank you in advance who help me.
B4X:
sub Process_Globals
dim freccia as bitmap
end sub
Sub DisegnaFreccia()
Dim canvas1 As Canvas
Dim path1 As Path
Dim DstRect As Rect
freccia.InitializeMutable(100dip,100dip)
canvas1.Initialize2(freccia)
DstRect.Initialize(0dip,0dip,100dip,100dip)
'dummy draw
path1.Initialize(50dip, 50dip)
path1.LineTo(100dip, 50dip)
path1.LineTo(50dip, 0dip)
path1.LineTo(0dip, 50dip)
path1.LineTo(50dip, 100dip)
canvas1.ClipPath(path1) 'clip the drawing area to the path
canvas1.DrawPath(path1,Colors.Magenta,True,10dip)
canvas1.DrawBitmap(freccia,Null,DstRect)
rv.SetImage("ImageView1",freccia)
rv_RequestUpdate
End Sub
obviously ImageView1 is a view in the Widget Layout.
bye
Last edited: