The LIGHTPARAMS structure provides the information needed for the LBitmap::FunctionalLight Function.
Size of this structure, in bytes. Use the sizeof operator to calculate this value.
Value that represents the frequency factor. This member used if the uFlags is set to FL_TRIGONOMETRY or to FL_FREEHAND. Valid values range from 1 to 10000. This value is divided internally by 100 (corresponding to a real interval of 0.01 - 100.0).
If the bitmap is grayscale, this parameter represents the amplitude of the master channel. If the bitmap is color and FL_MUL or FL_LINEAR_QUADRATIC are set, this parameter represents the amplitude of each channel. If the bitmap is color and FLB_ADD is used, this represents the amplitude of the red channel. This value is an integer with a value greater than or equal to 0. This value will be multiplied with the results of the selected function (sine, cosine, user buffer, ...). The results of the multiplications are then added to the pixel values. These functions as well as the real buffer values are from -1 to 1.
Possible values for uRAmp are from 0 to 100.
Value that represents the amplitude of the green color when the addition operation is used (FL_ADD is set). This value is ignored when grayscale images are used or when the multiplication operation is used (FL_MUL is set). This value is also ignored if uFlags contains FL_LINEAR_QUADRATIC
Possible values for uGAmp are from 0 to 100.
Value that represents the amplitude of the blue color when the addition operation is used (FL_ADD is set). This value is ignored when grayscale images are used or when the multiplication operation is used (FL_MUL is set). This value is also ignored if uFlags contains FL_LINEAR_QUADRATIC
Possible values for uBAmp are from 0 to 100.
Value that represents the angle, in hundredths of degrees. This member is used if uFlags is set to FL_TRIGONOMETRY or to FL_FREEHAND. Valid values for nAngle range from -18000 to 18000. This value is divided internally by 100.
Value that represents the X coordinate of the origin, in pixels. This member used if the uFlags is set to FL_TRIGONOMETRY and FL_CIRCLES or to FL_LINEAR_QUADRATIC.
Value that represents the Y coordinate of the origin, in pixels. This member used if the uFlags is set to FL_TRIGONOMETRY and FL_CIRCLES or to FL_LINEAR_QUADRATIC.
Value that represents the phase shift angle, in hundredths of degrees, this member used if the uFlags is set to FL_TRIGONOMETRY. Possible values for nPhase are from -18000 to 18000. This value will be divided internally by 100.
Pointer holds all points that represents the shape that drawn by the user. This member is used only if uFlags is set to FL_FREEHAND. These values should be between 1000 and 1000. They are internally divided by 1000, so the real values are between 1 and 1.
Number of points stored in pBuff. This member is used only if uFlags is set to FL_FREEHAND.
This member has the following values:
Value | Meaning |
---|---|
FL_LINEAR_QUADRATIC | [0x1000] If this flag is set, the light will be computed according to distance from the center which is represented by uXOrigin and uYOrigin parameters, The brightness increase for every pixel is proportional to the distance to the effects center. If this flag is set, do not set FL_TRIGONOMETRY, FL_FREEHAND. |
FL_TRIGONOMETRY | [0x2000] If this flag is set then the light will be generated by a sine or cosine function. If this is set, uFreq, nAngle, uXOrigin and uYOrigin are used to compute the light. If this flag is set, do not set FL_LINEAR_QUADRATIC or FL_FREEHAND. |
FL_FREEHAND | [0x4000] If this flag is set, the user will pass the light shape in the pBuff parameter. If this flag is set, the nAngle, pBuff and nBuffCount will be used. The nAngle will determine the angle of the light lines compared to the X axis. If this flag is set, do not set FL_LINEAR_QUADRATIC or FL_TRIGONOMETRY. |
FL_LINEAR_INNER | [0x0001] The linear light will be concentrated at the center (uXOrigin, uYOrigin) and will decreases outwards. This flag is valid only if FL_LINEAR_QUADRATIC is also set. |
FL_LINEAR_OUTER | [0x0002] The linear light will be concentrated at the far points from the center and will decrease inwards towards the center (uXOrigin, uYOrigin). This flag is valid only if FL_LINEAR_QUADRATIC is also set. |
FL_QUADRATIC_INNER | [0x0004] The Quadrate light will be concentrated at the center (uXOrigin, uYOrigin) and will decrease outwards. This flag is valid only if FL_LINEAR_QUADRATIC is also set. |
FL_QUADRATIC_OUTER | [0x0008] The Quadrate light will be concentrated at the far points from the center and will decrease inwards towards the center (uXOrigin, uYOrigin). This flag is valid only if FL_LINEAR_QUADRATIC is also set. |
FL_UNIDIRECTION | [0x0010] A sine or cosine function will generate the light as lines. |
Value | Meaning |
---|---|
FL_CIRCLES | [0x0020] Sine or cosine function will generate the light as circles around the center (uXOrigin, uYOrigin). |
Value | Meaning |
---|---|
FL_ADD | [0x0040] The amplitude parameters value (uRAmp, uGAmp, and uBAmp) are multiplied with the results of the selected function (sine, cosine, freehand). The results are then added to the pixel values of the equivalent channel. These functions as well as the real buffer values are from -1 to 1. This flag is valid only if FL_TRIGONOMETRY or FL_FREEHAND are also set. |
FL_MUL | [0x0080] Multiply the color factor specified by the uRAmp with the results of the selected function (sine, cosine, freehand). The results are multiplied with every channel value. |
This flag is valid only if FL_TRIGONOMETRY or FL_FREEHAND are also set.
For an example, refer to LBitmap::FunctionalLight.
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document