ImageMan DLL Suite Version 8Submit feedback on this topic   

ImgDrawImageFX

 int IMAPI ImgDrawImageFX ( hImage, hDC, pDstBound, pSrcBounds,T nEffect, dwFlags, dwExtra, pfnCallback, UINT nInterval, dwUserInfo, hPal )

This function displays the image referenced by hImage on the screen at the specified location and size using one of the special effects indicated.

 

Parameter

Type

Description

hImage

HANDLE

Identifies the image to be displayed. If NULL, the specified effect is applied using the DC's background brush.

hDC

HDC

Identifies the device context for the display.

pDstBounds

LPRECT

Points to a RECT data structure containing the logical screen coordinates to draw the image into.

pSrcBounds

LPRECT

Point to a RECT data structure specifying the portion of the source which will be displayed. If NULL, the entire image will be displayed in pDstBounds.

nEffect

UINT

Specifies the effect to use while drawing the image.

 

 

Valid values for nEffect are :

 

Values

Description

IMFX_WIPELEFT

wipes left from right edge

IMFX_WIPERIGHT

wipe right from left edge

IMFX_WIPEUP

wipe up from the bottom

IMFX_WIPEDOWN

wipe down from the top

IMFX_VCURTAIN_OUT

vertical curtain from the middle

IMFX_VCURTAIN_IN

vertical curtain to the middle

IMFX_HCURTAIN_OUT

horizontal curtain from the middle

IMFX_HCURTAIN_IN

horizontal curtain to the middle

IMFX_MOSAIC

rectangles spread over the entire area

IMFX_MOSAICLEFT

rectangles creeping from the right edge

IMFX_MOSAICRIGHT

rectangles creeping from the left edge

IMFX_MOSAICUP

rectangles creeping up from the bottom

IMFX_MOSAICDOWN

rectangles creeping down form the top

IMFX_BLUR_IN

image blurs in (from bad to good)

IMFX_BLUR_OUT

image blurs out (from good to bad)

IMFX_SHAPE_EXPLODE

image is drawn from the center out

IMFX_SHAPE_IMPLODE

image is drawn towards the center

IMFX_VBLIND_LEFT

vertical Venetian blinds open to the left

IMFX_VBLIND_RIGHT

vertical Venetian blinds open to the right

IMFX_VBLIND_UP

horizontal Venetian blinds open to the top

IMFX_VBLIND_DOWN

horizontal blinds open to the bottom

 

 

 

dwFlags

DWORD

Specifies an effect modifier.

 

Valid dwFlags values are:

 

Values

Description

IMDF_WIPE_IMGSLIDE

 image slides into view

IMDF_WIPE_IMGEXPOSE

image is exposed in place

IMDF_WIPE_PUSHBKGND

image pushes the background out

IMDF_WIPE_OVERBKGND

new image floats above background

IMDF_CURTAIN_IMGSLIDE

IMDF_CURTAIN_IMGEXPOSE

IMDF_CURTAIN_PUSHBKGND

IMDF_CURTAIN_OVERBKGND

IMDF_SHAPE_RECTANGLE

IMDF_SHAPE_ROUNDRECTANGLE

IMDF_SHAPE_ELLIPSE

IMDF_VBLIND_IMGSLIDE

IMDF_VBLIND_IMGEXPOSE

IMDF_VBLIND_PUSHBKGND

IMDF_VBLIND_OVERBKGND

 

 

dwExtra

DWORD

Specifies additional effect specific information. See the Comments..

pfnCallback

IMFXCALLBACK

Specifies the address of the callback (status) function to be called between every effect operation. If NULL, no status call backs are made

nInterval

UINT

This is the percentage of effect completed points between each callback invocation.

dwUserInfo

  DWORD

Specifies any user/programmer information that will be passed directly to your call back function.

hPal

HPALETTE

Specifies a palette that will be realized by the effect drawing routine. (Currently only the Blur effect uses this.)

 

 

Return Value

This function returns IMG_OK if successful. Otherwise IMG_ERR. If you are using a callback function and it does not return zero, then IMG_ERR will be returned and ImgGetStatus() will return IMG_CANCELLED.

 

Comments

By adjusting the values that make up the dwExtra modifier you have control over certain aspects of each special effect. For Wipes its value specifies the step increment. For a simple Mosaic (IMFX_MOSAIC), the low-word is the cell width and the high-word is the cell height. If you use small cells and it's a large image, it may take some time to completely draw the image. For the Creeping Mosaics, the low-word is the cell height and width and the high-word is the fill percent (0-100). For the Curtain and Venetian Blind effects the low-word specifies the step increment. For Venetian Blind, it also uses the high-word for slat size.

 

If no call back function is used, the ImgDrawImageFX function will not stop or return until it has completely drawn the image.

 

Be careful adjusting the value of the nInterval parameter. If you set this to zero, your function will be called in between every single effect drawing activity.

See Also

See the sections Having Fun With Special Effects and Using the Special Effects Callback for more information.

 

 


© 1995-2004 Data Techniques, Inc. All rights reserved.