Class CropCallback

3DS Max Plug-In SDK

Class CropCallback

See Also: Class Bitmap.

class CropCallback

Description:

This class is available in release 2.0 and later only.

This class is a callback for interactive adjustment of bitmap "Cropping rectangle", passed in as an argument to the Bitmap::Display() method. See \MAXSDK\SAMPLES\MATERIALS\BMTEX.CPP for sample code.

All methods of this class are implemented by the plug-in.

Methods:

Prototype:

virtual float GetInitU()=0;

Remarks:

Returns the initial U value.

Prototype:

virtual float GetInitV()=0;

Remarks:

Returns the initial V value.

Prototype:

virtual float GetInitW()=0;

Remarks:

Returns the initial W value.

Prototype:

virtual float GetInitH()=0;

Remarks:

Returns the initial H value.

Prototype:

virtual BOOL GetInitMode()=0;

Remarks:

Returns TRUE for place mode; FALSE for crop mode. In crop mode the image is clipped at the edges. In place mode, the image is resized or moved.

Prototype:

virtual void SetValues(float u, float v, float w, float h, BOOL md)=0;

Remarks:

This method is called to set the values as the user is making adjustments. If the parameters may be animated, use Interface::GetTime() to retrieve the time they are being set for.

Parameters:

float u

The U parameter to set.

float v

The V parameter to set.

float w

The W parameter to set.

float h

The H parameter to set.

BOOL md

The mode being set. TRUE is place mode; FALSE is crop.

Prototype:

virtual void OnClose()=0;

Remarks:

This method is called when the cropping adjustment window is closed.