Example: Shadowed Characters

Example FGFW7 illustrates a simple method of displaying characters with shadows. It displays the shadowed characters "text with shadow" in the middle of the active virtual buffer. The first call to fgf_print() displays the shadow in color 0 (black) offset one pixel to the right and one pixel below the position where the characters will appear. The second call to fgf_print() then displays the characters in color 19 where they are supposed to appear (which covers up most of the "shadow"). You can simulate different light sources by displaying the shadow in other positions and at other distances from the actual characters.

C/C++ version

C++Builder version

Delphi version

Visual Basic version

<< Prev

Next >>

Contents
Fastgraph Home Page

 

copyright 2001 Ted Gruber Software, Inc.