ColoredBalls method (ILEADRasterProcess)

Visual Basic example

Visual C++ example

 

Syntax

short ColoredBalls(ILEADRaster * pRaster, long lNumBalls, long lSize, long lSizeVariation, long lHighLightAng, OLE_COLOR crHighLight, OLE_COLOR crBkgColor, OLE_COLOR crShadingColor, long lAvrBallClrOpacity, long lBallClrOpacityVariation, long lRipple, long lFlags);

Overview

Refer to Applying Artistic Effects.

Remarks

(Raster Pro and above only) This method adds colored balls to the bitmap. Various parameters control the color and appearance of the balls.

The CLRBALLS_STICKER flag produces balls with more distinct edges than the CLRBALLS_BALL option.

As an example, if you use the following figure.

image\ReplaceColor_Befor_2.gif

If you call the ColoredBalls method using the following values:

Parameter

Value

lNumBalls

500

lSize

10

lSizeVariation

90

lHighLightAng

315

crHighLight

White

crBkgColor

Blue

crShadingColor

Black

lAvrBallClrOpacity

0

lBallClrOpacityVariation

0

lRipple

4250

lFlags

CLRBALLS_SHADING_TOPBOTTOM | CLRBALLS_STICKER | CLRBALLS_IMAGE | CLRBALLS_ BALLCLR_OPACITY

The following figure will result:

image\coloredballssticker.gif

As another example, if you call the method using the following settings:

Parameter

Value

lNumBalls

1500

lSize

4

lSizeVariation

0

lHighLightAng

315

crHighLight

White

crBkgColor

Blue

crShadingColor

Black

lAvrBallClrOpacity

108

lBallClrOpacityVariation

13

lRipple

1000

lFlags

CLRBALLS_SHADING_LEFTRIGHT | CLRBALLS_BALL | CLRBALLS_IMAGE | CLRBALLS_ BALLCLR_OPACITY

You will obtain the following figure if you use magenta as the color for the balls:

image\ColoredBalls.gif

This method supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

If the bitmap has a region, this method works only on the region. If the bitmap does not have a region, this method works on the entire bitmap.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements:

ColoredBallsCount property, ColoredBalls method, AddNoise method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, BumpMap method, Cubism method, Dry method, FreePlaneBend method, FreeRadBend method, GlassEffect method, GlowFilter method, LensFlare method, Light method, Ocean method, PlaneBend method, Plane method, SampleTarget method, Tunnel method, Bending method, Cylindrical method, FreeHandShear method, FreeHandWave method, Impressionist method, Pixelate method, Polar method, Punch method, RadialBlur method, RadWave method, Ripple method, Spherize method, Swirl method, Wave method, Wind method, ZoomBlur method, ZoomWave method, DrawStar method.

Topics:

Raster Images: Artistic Effects.