Sviluppatori Basic (e non) per Mobile e Desktop
Vuoi reagire a questo messaggio? Crea un account in pochi clic o accedi per continuare.
Sviluppatori Basic (e non) per Mobile e Desktop

Forum dedicato agli sviluppatori di B4X, Delphi, Xamarin

Non sei connesso Connettiti o registrati

Effetto luce

Andare in basso  Messaggio [Pagina 1 di 1]

1Effetto luce Empty Effetto luce il Gio Mag 03, 2018 11:18 pm



Sub Globals
   'These global variables will be redeclared each time the activity is created.
   'These variables can only be accessed from this module.
   Dim xui As XUI
   Private Label1 As Label
   Dim PanelMask As Panel
End Sub

Sub Activity_Create(FirstTime As Boolean)
   'Do not forget to load the layout file created with the visual designer. For example:
   Activity.Addview(Label1,0,0,100%x, 120dip)
   Activity.Addview(PanelMask,0,0,100%x, 120dip)
End Sub

Sub Label1_Click
End Sub

Sub Label2_Click
End Sub

Sub Light2(ImageView As B4XView, Delay As Int)
   Dim xui As XUI
   Dim PanelBase As B4XView = xui.CreatePanel("")
   Dim PanelEffect As B4XView = xui.CreatePanel("")
   Dim Can As B4XCanvas
   Dim MaxW As Int = PanelEffect.Width-1
   For x=0 To MaxW
      Dim C As Int = 200*(1-Sin(cPI*(((x+MaxW/2) Mod MaxW)/MaxW)))
End Sub

Sub CreateMask
   ' B4A function
   Dim Lb4x As B4XView = Label1
   Dim Out As OutputStream
   Out = File.OpenOutput(xui.DefaultFolder, "Test.png", False)
   Lb4x.Snapshot.WriteToStream(Out, 100, "PNG")
   Dim Bt As Bitmap = LoadBitmap(xui.DefaultFolder, "Test.png")
   Dim Canv As Canvas
   For x=0 To Bt.Width-1
      For y=0 To Bt.Height-1
         If Bt.GetPixel(x,y)=0 Then
         End If
End Sub

Torna in alto  Messaggio [Pagina 1 di 1]

Permessi in questa sezione del forum:
Non puoi rispondere agli argomenti in questo forum.