BricksTexture method (ILEADRasterProcess)

Visual Basic example

Visual C++ example

 

Syntax

short BricksTexture(ILEADRaster * pRaster, long lBricksWidth, long lBricksHeight, long lOffsetX, long lOffsetY, long lEdgeWidth, long lMortarWidth, long lShadeAngle, long lRowDifference, long lMortarRoughness, long lMortarRoughnessEevenness, long lBricksRoughness, long lBricksRoughnessEevenness, OLE_COLOR crMortarColor, long lFlags);

Overview

Refer to Applying Artistic Effects.

Remarks

(Raster Pro and above only) Creates a brick texture that makes the image look like it has been drawn on a brick wall.

This method creates a brick-like texture. Edges that are in the angle of the light source are brightened and the others are darkened. Apply this texture to a bitmap by using pRaster as the source raster object. You can obtain the best result by applying this method on a medium brightness image.

Using the shading option of BRICKS_SMOOTHEDOUT results in bricks that have a more chiseled look than the same settings with a shading option of BRICKS_SMOOTHEDIN.

As an example, suppose you were to start with a gray image, like the following figure:

image\GraySourceImage.gif

Now, suppose you call the BricksTexture method. The following settings apply to all of the following figures:

Parameter

Value

lOffsetX

0

lOffsetY

0

lRowDifference

35

lBricksWidth

60

lBricksHeight

20

If you were to use the following additional settings:

Parameter

Value

lMortarRoughness

0

lMortarRoughnessEevenness

0

lBricksRoughness

0

lBricksRoughnessEevenness

0

lFlags

BRICKS_SMOOTHEDOUT

The following figure results:

image\BTBzeroes.gif

Note how smooth the surface of both the mortar and the bricks is. In the following figure, the only change from the previous settings is the value of lBricksRoutness, which is set to 196:

image\BTBrough.gif

In the following figure, lBricksRoutness remains set to 196 and in addition, lBricksRoutnessSmooth is set to 4:

image\BTBsmoothed.gif

The next two figures show the difference between the BRICKS_SMOOTHEDOUT flag and the BRICKS_SMOOTHEDIN flag. For these figures the following settings are used:

Parameter

Value

lMortarRoughness

0

lMortarRoughnessEevenness

0

lBricksRoughness

250

lBricksRoughnessEevenness

4

lEdgeWidth

7

lMortarWidth

4

In the following figure the BRICKS_SMOOTHEDOUT flag is set:

image\BTBSmoothedOut.gif

In the following figure, the BRICKS_SMOOTHEDIN flag is set:

image\BTBSmoothedIn.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.

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:

Emboss method, AddShadow method, HueSaturationIntensity method, ColorReplace method, ColorThreshold method, DirectionEdgeStatistical method, GetBitmapStatisticsInfo method, GetFeretsDiameter method, GetObjectInfo method, GetRgnContourPoints method, GetRgnPerimeterLength method, MathFunction method, Segment method, SubtractBackground method, UserFilter method.

Topics:

Raster Images: Filtering Images.

 

Raster Images: Artistic Effects