ShowFreeHandWaveDlg Example for Visual Basic
Dim RasterImgEfxDlg As New LEADRasterDlgImgEfx
Dim RasterProc As New LEADRasterProcess
Dim nRet As Integer
Private Sub FreeHandWave_Click()
Dim i As Integer
RasterImgEfxDlg.ScaleValue = 10
RasterImgEfxDlg.WaveLength = 5
RasterImgEfxDlg.ImageEffectFlags = FILL_CLR Or DIS_FRQ
RasterImgEfxDlg.Angle = 4500
RasterImgEfxDlg.FillColor= RGB(200, 0, 0)
RasterImgEfxDlg.UIFlags = FREEHANDWAVE_SHOW_PREVIEW Or _
FREEHANDWAVE_SHOW_TOOL_ZOOMLEVEL
RasterImgEfxDlg.Bitmap = LEADRasterView1.Raster.Bitmap
nRet = RasterImgEfxDlg.ShowFreeHandWaveDlg(hWnd)
If (nRet = 0 And RasterImgEfxDlg.DialogStatus = DLG_OK) Then
RasterProc.CurveSize = RasterImgEfxDlg.AmplitudesCount
For i = 0 To RasterProc.CurveSize - 1
RasterProc.Curve(i) = RasterImgEfxDlg.Amplitudes(i)
Next i
RasterProc.FreeHandWave LEADRasterView1.Raster, RasterImgEfxDlg.Scale_
, RasterImgEfxDlg.WaveLength, RasterImgEfxDlg.Angle, RasterImgEfxDlg.FillColor, RasterImgEfxDlg.ImageEffectFlags
End If
End Sub