LDialogImageEffect::DoModalRadialWave

#include "ltwrappr.h"

virtual L_INT LDialogImageEffect::DoModalRadialWave(hWndOwner)

HWND hWndOwner;

/* handle of the window which owns the dialog */

Displays the Radial Wave dialog box, and gets the options for LBitmap::RadWave. This function is available in the Raster Pro and above toolkits.

Parameter

Description

hWndOwner

Handle of the window which owns the dialog.

Returns

SUCCESS_DLG_OK

The "OK" button was pressed, and the dialog exited successfully.

SUCCESS_DLG_CANCEL

The "Cancel" button was pressed, and the dialog exited successfully.

< 1

An error occurred. Refer to Return Codes.

Comments

LDialogImageEffect::SetRadialWaveParams must be called before using this function to set the initial values for the dialog. You can get the updated RADIALWAVEDLGPARAMS with the values entered by the user through the dialog by using LDialogImageEffect::GetRadialWaveParams.

The Radial Wave dialog is shown in the following figure:

image\RadialWave.gif

This dialog has the following fields:

image\BeforeAfterZoomToFit.gif Zoom to fit

Use this button to fit entire preview images on both the Before and After views.

image\BeforeAfterZoomToNormal.gif Zoom to Normal

Use this button to view images with normal scale on both the Before and After views.

Before View

This view shows the original image before the dialog applies any changes to it.

The view can be dragged when it is not in Zoom to Fit zoom mode. Place the mouse cursor over the view window (the cursor will change to a hand), then click and drag.

After View

This view shows the original image with the dialog changes applied. This enables the user to see a preview of what the image should look like when the changes are applied.

The view can be dragged when it is not in Zoom to Fit zoom mode. Place the mouse cursor over the view window (the cursor will change to a hand), then click and drag.

Type Drop-down list box:

Use this to set the wave length type. There are two choices:

image\sqrblit.gif Period: The value in the Length edit box determines the wavelength as a percent of the image dimensions.

image\sqrblit.gif Frequency: The value in the Length edit box determines the number of waves repeated in the image.

Length Edit box:

Use this to set the wavelength or number of repeated waves. Enter the value directly in the edit box or use the arrows to set the desired value.

Phase Edit box:

Use this to set the wave phase shift. Enter the value directly in the edit box or use the arrows to set the desired value.

Amplitude Edit box:

Use this to set the radial wave magnitude. Enter the value directly in the edit box or use the arrows to set the desired value.

Exposed Area Section:

This section contains a drop-down list box and a button for specifying how to fill any exposed areas. Available values are:

image\sqrblit.gif Use Color: Use the color picker button to select the color to fill any exposed areas. Clicking the color picker button will activate a Color Dialog that will be used to set the color.

image\sqrblit.gif Stretch Image. Stretch the image edges to fill the exposed area.

image\sqrblit.gif Don’t Change. Leave the exposed area as is, without changing it.

image\Icon_Pivot.gif Pivot Section:

This section contains two edit boxes and a display area for setting the pivot point. You can also set the pivot point by right clicking on the Before view. The Pivot point image\Icon_Pivot.gif appears on the point you just clicked.

X Edit box:

Use this to set the pivot's x-axis position in the image. Enter the value directly in the edit box or use the arrows to set the desired value.

Y Edit box:

Use this to set the pivot's y-axis position in the image. Enter the value directly in the edit box or use the arrows to set the desired value.

Cursor Pos (x,y)

Displays the mouse position with respect to the image.

Center Button:

Use the Center button to center the Before and After views with respect to image\Icon_Pivot.gif the pivot point position.

OK

Use the OK button to close the dialog and apply the changes.

Cancel

Use the Cancel button to close the dialog and discard the changes.

Progress Bar

image\BeforeAfterProgressBar.gif

Located at the bottom of the dialog, this progress bar shows the percentage of the current dialog operation that has been completed.

Required DLLs and Libraries

LTDLGIMGEFX
LTDLGKRN
LTDLGUTL
LTDLGCTRL
LTDLGCOM
LTDIS
LTIMG

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

See Also

Functions:

LDialogBase::Initialize, LBitmap::RadWave, LBase::EnableCallBack, LDialogBase::EnablePreview, LDialogBase::EnableAutoProcess, LDialogBase::EnableToolbar, LDialogBase::Free, LDialogImageEffect::SetRadialWaveParams, LDialogImageEffect::GetRadialWaveParams

Topics:

Using Imaging Common Dialog

Example

void TestFunction(LBitmap * pBitmap, HWND hWnd)
{
   LDialogImageEffect DlgImageEffect;
   LDialogImageEffect::Initialize(0);
   DlgImageEffect.SetBitmap(pBitmap);

   RADIALWAVEDLGPARAMS DlgParams; 

   memset ( &DlgParams, 0, sizeof ( RADIALWAVEDLGPARAMS ) );

   DlgParams.uStructSize      = sizeof ( RADIALWAVEDLGPARAMS );

   DlgImageEffect.EnableCallBack(FALSE);
   DlgImageEffect.EnablePreview(TRUE);
   DlgImageEffect.EnableAutoProcess(TRUE);
   DlgImageEffect.EnableToolbar(TRUE);
   DlgImageEffect.SetRadialWaveParams(&DlgParams);
   DlgImageEffect.DoModalRadialWave(hWnd);

   // Gets the updated values for the structure
   DlgImageEffect.GetRadialWaveParams(&DlgParams, sizeof(DlgParams));
   LDialogImageEffect::Free();
}