|
CartoType API
|
#include <cartotype_diffuse_lighting.h>
Public Member Functions | |
| CT_IMPORT TColor | Color (int32 aX, int32 aY) |
Static Public Member Functions | |
| static CT_IMPORT CDiffuseLighting * | New (TResult &aError, TColor aLightColor, TFixed aLightAzimuth, TFixed aLightElevation, const TBitmap &aHeightMap, TFixed aSurfaceScale, int32 aUnitLength) |
A diffuse lighting filter implemented as a paint server. It supplies light levels determined by a light source at infinity and an 8bpp source bitmap acting as a height map. See http://www.w3.org/TR/2003/REC-SVG11-20030114/filters.html#feDiffuseLighting for an explanation of the algorithm.
| CT_EXPORT TColor CDiffuseLighting::Color | ( | int32 | aX, |
| int32 | aY | ||
| ) | [virtual] |
Supply a color for the pixel at (aX,aY) in premultiplied RGBA format.
Implements CartoType::MPaintServer.
| CT_EXPORT CDiffuseLighting * CDiffuseLighting::New | ( | TResult & | aError, |
| TColor | aLightColor, | ||
| TFixed | aLightAzimuth, | ||
| TFixed | aLightElevation, | ||
| const TBitmap & | aHeightMap, | ||
| TFixed | aSurfaceScale, | ||
| int32 | aUnitLength | ||
| ) | [static] |
Create a diffuse lighting filter. aLightColor is the color of the light, in non-premultiplied-alpha format. The azimuth and elevation of the light source (the 'sun') are supplied in radians. aSurfaceScale is the scale used to multiply heights: a scale of 1 means that 1 horizontal pixel = 255 height units. aUnitLength is the number of pixels between sample points when estimating the gradient.
1.7.5.1