Converts the bitmap from rectangular to polar coordinates and vice versa.
#include "ltwrappr.h"
virtual L_INT LBitmap::Polar(crFill, uFlags)
The COLORREF value that specifies the fill color for any exposed areas. You can specify a COLORREF value, such as the return value of the Windows RGB macro, or you can use the PALETTEINDEX macro to specify a palette color.
Flags that indicate how to handle exposed areas and the type of conversion. You can use a bitwise OR ( | ) to specify one flag from each group.
Value | Meaning |
---|---|
FILL_CLR | [0x0000] Fill any exposed areas with crFill. |
FILL_RPT | [0x0001] Stretch the image edges to fill the exposed area. |
FILL_NOCHG | [0x0002] Leave the exposed area as is, without changing it. |
Value | Meaning |
---|---|
CART_TO_POL | [0x0000] Convert the image from Cartesian (rectangular) coordinates to polar coordinates. |
POL_TO_CART | [0x0010] Convert the image from polar coordinates to Cartesian (rectangular) coordinates. |
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
This function converts a bitmap from Cartesian (rectangular) coordinates to polar coordinates or vice versa. Rectangular coordinates use the form (x, y) where x and y are the horizontal and vertical distances from the origin, respectively. Polar coordinates are in the form (r, ) where r is the distance from the origin to the point and Ȓ is the angle of the line the point makes with the positive x-axis. Polar coordinates use a grid made of concentric circles around the origin, along with lines that are rays radiating outward from the origin.
If CART_TO_POL is set, this function considers the positions of the images pixels as values in a Polar coordinate system. Then it converts all the pixels in a line of the source image into a circle around the center of the bitmap.
If POL_TO_CART is set, this function takes the pixels from concentric circles and considers their positions as values in a Cartesian coordinate system. Then it converts all the pixels in a circle into horizontal lines.
If there is any region selected on the bitmap, the effect will be applied on the region dimensions only.
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.
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.
Polar Function - Before
Polar Function - After
View additional platform support for this Polar function.
Win32, x64.
L_INT LBitmap__PolarExample(LAnimationWindow * LAniWnd)
{
return LAniWnd->Polar(0, FILL_RPT | CART_TO_POL);
}
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