iOS Question How to drawline in the images?

winjiadh

Active Member
Licensed User
Longtime User
I want drawline in a page with backroundimages
use Designer add ImageView to a Layout named "1"
B4X:
#Region  Project Attributes
    #ApplicationLabel: test backimage
    #Version: 1.0.0
    'Orientation possible values: Portrait, LandscapeLeft, LandscapeRight and PortraitUpsideDown
    #iPhoneOrientations: Portrait, LandscapeLeft, LandscapeRight
    #iPadOrientations: Portrait, LandscapeLeft, LandscapeRight, PortraitUpsideDown
    #Target: iPhone, iPad
    #ATSEnabled: True
    #MinVersion: 7
#End Region

Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'Public variables can be accessed from all modules.
    Public App As Application
    Public NavControl As NavigationController
    Private Page1 As Page
    Private DLine As Canvas
    Dim Rects As Rect

End Sub

Private Sub Application_Start (Nav As NavigationController)
    'SetDebugAutoFlushLogs(True) 'Uncomment if program crashes before all logs are printed.
    NavControl = Nav
    Page1.Initialize("1")
    Page1.Title = "Page 1"
    Page1.RootPanel.LoadLayout("1")
    Page1.RootPanel.Color = Colors.White
    NavControl.ShowPage(Page1)
    Rects.Initialize(0, 0, 0, 0)
    DLine.Initialize(Page1.RootPanel)
    
    
End Sub

Private Sub Page1_Resize(Width As Int, Height As Int)
    
End Sub

Private Sub Application_Background
    
End Sub


Sub Button1_Click
'    For i=0 To 9
        DLine.DrawLine(1,Rnd(1,100),20,30,Colors.Green,2dip)

'    Next
    DLine.Refresh
End Sub
 
Top