, Visual C#


- 9


Dim N_x As Integer = 200

Dim N_y As Integer = 1

' myArrayVB(i, j) Single,

' i = 0,1,2,3,...,N_x; j = 0,1,2,3,...,N_y:

Dim myArrayVB(N_x, N_y) As Single '- .

' myArrayVB:

Dim N_1_myArrayVB As Integer

' myArrayVB(i, j)

' - :

i = -1 ' .

For k = first_line To last_line

x1 = Lines(k).fr_tr_points(1)

y1 = Lines(k).fr_tr_points(2)

x2 = Lines(k).to_tr_points(1)

y2 = Lines(k).to_tr_points(2)

' :

'g.DrawLine(pen, _

' (x1 * bmp.Width / 4) + bmp.Width / 2.0F, _

' bmp.Height / 2.0F - (y1 * bmp.Height / 4), _

' (x2 * bmp.Width / 4) + bmp.Width / 2.0F, _

' bmp.Height / 2.0F - (y2 * bmp.Height / 4) _

')

' :

x1 = (x1 * bmp.Width / 4) + bmp.Width / 2.0F

y1 = bmp.Height / 2.0F - (y1 * bmp.Height / 4)

x2 = (x2 * bmp.Width / 4) + bmp.Width / 2.0F

y2 = bmp.Height / 2.0F - (y2 * bmp.Height / 4)

' :

i = i + 2

myArrayVB(i, 0) = x1

myArrayVB(i, 1) = y1

myArrayVB(i + 1, 0) = x2

myArrayVB(i + 1, 1) = y2

N_1_myArrayVB = i + 1 ' .

Next

' N_first_line N_last_line

' myArrayVB:

Dim N_first_line, N_last_line As Integer

N_first_line = first_line

N_last_line = last_line

' N_first_line

' N_last_line

'myArrayVB(0, 0) myArrayVB(0, 1):