Returns the palette associated with the specified vector handle.
#include "ltwrappr.h"
virtual HPALETTE LVectorBase::GetPalette(L_VOID)
Returns the handle to the logical palette
You can use this palette to allow proper drawing of vector image colors in a palletized system.
L_INT LVectorBase__GetPaletteExample(HWND hWnd, LVectorBase &Vector){L_INT nRet;HDC hdc;PAINTSTRUCT ps;RECT rect;HPALETTE hOldPalette = NULL, hPal;hdc = BeginPaint (hWnd, &ps) ;GetClientRect(hWnd, &rect);nRet = Vector.SetViewport(&rect);if(nRet != SUCCESS)return nRet;if (Vector.IsAllocated()){// Create the palette that we will use to painthPal = Vector.GetPalette();if( hPal ){hOldPalette = ::SelectPalette( hdc, hPal, TRUE );::RealizePalette( hdc );}nRet = Vector.Paint(hdc, TRUE);if(nRet != SUCCESS)return nRet;if (hOldPalette){::SelectPalette (hdc, hOldPalette, FALSE);DeleteObject(hPal);}}EndPaint (hWnd, &ps) ;return SUCCESS;}
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
