FreeHandShear Example for Visual Basic
Dim RasterProc As New LEADRasterProcess
Dim nMax As Integer
Dim i As Integer
RasterProc.AmplitudesCount = 4
RasterProc.UserLUTCurveX(0) = 0
RasterProc.UserLUTCurveY (0) = 0
RasterProc.UserLUTCurveX(1) = 3
RasterProc.UserLUTCurveY(1) = 10
RasterProc.UserLUTCurveX(2) = 9
RasterProc.UserLUTCurveY(2) = -10
RasterProc.UserLUTCurveX(3) = 12
RasterProc.UserLUTCurveY(3) = 0
RasterProc.GetCurvePoints GUB_LINEAR
For i = 0 To RasterProc.AmplitudesCount - 1
If nMax < RasterProc.Amplitudes(i) Then
nMax = RasterProc.Amplitudes(i)
End If
Next i
If nMax > 0 Then
For i = 0 To RasterProc.AmplitudesCount - 1
RasterProc.Amplitudes(i) = (1000 * CLng(RasterProc.Amplitudes(i)) / Abs(nMax))
Next i
End If
RasterProc.FreeHandShear LEADRasterView1.Raster, 100, RGB(0, 0, 0), FILL_RPT _
Or HR_HORZ