Attribute VB_Name = "modCommon"
Option Explicit

Public Sub CanvasRedraw(picBox As PictureBox)
    
    Dim idx As Integer
    
    picBox.Cls
    picBox.DrawWidth = 1
    
    'Grid
    For idx = picBox.ScaleLeft To picBox.ScaleWidth
        picBox.Line (idx, picBox.ScaleTop)-(idx, picBox.ScaleHeight), RGB(230, 230, 230)
    Next
    
    For idx = picBox.ScaleTop To picBox.ScaleHeight Step -1
        picBox.Line (picBox.ScaleLeft, idx)-(picBox.ScaleWidth, idx), RGB(230, 230, 230)
    Next
    
    picBox.ForeColor = RGB(0, 0, 0)

End Sub

Public Sub CanvasRescale(picBox As PictureBox)
    
    picBox.ScaleLeft = -30      '-10
    picBox.ScaleTop = 30        '10
    picBox.ScaleWidth = 60      '20
    picBox.ScaleHeight = -60    '-20

End Sub

