5.4. tsPostAddShadow

Syntax

Pascal

procedure tsPostAddShadow3ub(Radius: tsFloat; X: tsInt; Y: tsInt;
  Red: tsByte; Green: tsByte; Blue: tsByte);

procedure tsPostAddShadow4ub(Radius: tsFloat; X: tsInt; Y: tsInt;
  Red: tsByte; Green: tsByte; Blue: tsByte; Alpha: tsByte);

procedure tsPostAddShadow3f(Radius: tsFloat; X: tsInt; Y: tsInt;
  Red: tsFloat; Green: tsFloat; Blue: tsFloat);

procedure tsPostAddShadow4f(Radius: tsFloat; X: tsInt; Y: tsInt;
  Red: tsFloat; Green: tsFloat; Blue: tsFloat; Alpha: tsFloat);

C/C++

void tsPostAddShadow3ub(tsFloat Radius, tsInt X, tsInt Y,
  tsByte Red, tsByte Green, tsByte Blue);

void tsPostAddShadow4ub(tsFloat Radius, tsInt X, tsInt Y,
  tsByte Red, tsByte Green, tsByte Blue, tsByte Alpha);

void tsPostAddShadow3f(tsFloat Radius, tsInt X, tsInt Y,
  tsFloat Red, tsFloat Green, tsFloat Blue);

void tsPostAddShadow4f(tsFloat Radius, tsInt X, tsInt Y,
  tsFloat Red, tsFloat Green, tsFloat Blue, tsFloat Alpha);

Description

Creates an shadow under some chars. This shadow will be generated with an gaussian filter algorithm.

Sample Image for tsPostAddShadow

Params

Radius

The size of the gausian filter.

[Warning] Warning

If the radius of the filter is quite large the algorithm needs some time.

X

The horiziontal position of the shadow.

Y

The vertical position of the shadow.

Red, Green, Blue und Alpha

The color of the shadow. If you pass an value for alpha to the post processor you can control the visibility of the shadow.

The value may have 2 types. tsByte has an rage from 0 to 255. tsFloat is in range from 0 to 1. If you call an version without the alpha parameter the value for the alpha always will be the maximum value (255 or 1).

Error Codes

TS_NO_ACTIVE_CONTEXT

If there was no context bound.

TS_NO_ACTIVE_FONT

If there is no font bound.

TS_INVALID_OPERATION

If the bound font isn't an font creator.