virtual L_INT LBitmap::Cubism(uSpace, uLength, nBrightness, nAngle, crColor,uFlags)
Remaps the bitmap into a collection of rotated rectangles (cubic faces) so that it appears to have been created in the Cubist art style.
Space between cubes, in pixels. As uSpace decreases the concentration of cubes increases and vice versa. The valid range is from 1 to the image or region dimension (that is, min(Height, Width))
Cube side length, in pixels.
A value that indicates the brightness of the bitmap. This value can be a number between -1000 and 1000. Negative values darken the image and positive values lighten the image.
The cubes angle of orientation, in hundredths of a degree (+/-). This value is ignored if the CUB_RAND flag has been set in uFlags. Possible values are from -36000 to 36000.
The COLORREF value that specifies the background color. This value is ignored if the CUB_BKG flag has been set in uFlags.
Flags that indicate the background color, cube shape and cube orientation. You can use a bit wise OR ( | ) to specify one flag from each group.
|CUB_BKG||[0x0001] Use the image itself as the background.|
|CUB_COLOR||[0x0002] Use the color in the crColor member as the background color.|
|CUB_SQR||[0x0010] Cubes will have square shape.|
|CUB_RECT||[0x0020] Cubes will have rectangular shape.|
|CUB_RAND||[0x0100] Cubes will have random orientation.|
|CUB_ORNT||[0x0200] All cubes will have the orientation specified by the nAngle value.|
|SUCCESS||The function was successful.|
|< 1||An error occurred. Refer to Return Codes.|
This function remaps the bitmap into a collection of rotated rectangles (cubic faces), producing an image in a Cubist style.
To obtain this effect, the following settings were used with the function:
uSpace = 5
uLength = 10
nBrightness = 0
nAngle = 0
crColor = RGB(0,0,0)
uFlags = CUB_BKG|CUB_RAND|CUB_RECT
This function 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.
To update a status bar or detect a user interrupt during execution of this function, refer to LBase::EnableStatusCallback.
This function 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 function.
This function does not support 32-bit grayscale images. It returns the error code ERROR_GRAY32_UNSUPPORTED if a 32-bit grayscale image is passed to this function.
The following example applies the cubism function to it:
L_INT LBitmap__CubismExample(LAnimationWindow *BitmapWindow)
return BitmapWindow->Cubism(5,15,200,4500,RGB(255,0,0), CUB_COLOR | CUB_RECT | CUB_RAND);