Dear colleagues,
I refer to your help with specific graphic problem. It is
necessary to create a viewfinder in graphic application.
It seems that the algorithm is simple: just draw lines
in specific position in according to value of some
controls, track bars, for example. Next read the track
bars value to find the coordinates of lines cross.
It works, but I can not get real cross because the
background image is being deface by lines images.
The drawing procedure looks like the next:
' graphic object is refering to picturebox
' this picturebox has background image
Sub DrawViewfinder()
' draw viewfinder's lines
' TODO - how to prevent the drawing of multiple
lines ????
Dim p_en As New Pen(Color.Yellow)
g.DrawLine(p_en, 0, trckVert.Value,
picbView.Width, trckVert.Value) ' horizontal line
g.DrawLine(p_en, trckHoriz.Value, 0,
trckHoriz.Value, picbView.Height) ' vertical line
End Sub
Private Sub trckHoriz_Scroll(ByVal sender As Object,
ByVal e As System.EventArgs) Handles trckHoriz.Scroll
DrawViewfinder()
End Sub
Private Sub trckVert_Scroll(ByVal sender As Object,
ByVal e As System.EventArgs) Handles trckVert.Scroll
DrawViewfinder()
End Sub
I will be highly grateful for advices how to resolve this
problem.
Best regards
George Golubev, Russia