' ########################################################################################
' Microsoft Windows
' File: GdiplusColorMatrix.inc
' Contents: GDI+ Color Matrix structures and constants
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
#IF NOT %DEF(PBX_GdiPlusColorMatrix_PBI)
#DEFINE PBX_GdiPlusColorMatrix_PBI
%EQUATE `GDIPLUSCOLORMATRIX_INC = 1
#IF (%GDIPVER >= &H0110)
'//----------------------------------------------------------------------------
'// Color channel look up table (LUT)
'//----------------------------------------------------------------------------
'typedef BYTE ColorChannelLUT[256];
'//----------------------------------------------------------------------------
'// Per-channel Histogram for 8bpp images.
'//----------------------------------------------------------------------------
'enum HistogramFormat
%EQUATE `HistogramFormatARGB = 0
%EQUATE `HistogramFormatPARGB = 1
%EQUATE `HistogramFormatRGB = 2
%EQUATE `HistogramFormatGray = 3
%EQUATE `HistogramFormatB = 4
%EQUATE `HistogramFormatG = 5
%EQUATE `HistogramFormatR = 6
%EQUATE `HistogramFormatA = 7
#ENDIF ' //(%GDIPVER >= &H0110)
'//----------------------------------------------------------------------------
'// Color matrix
'//----------------------------------------------------------------------------
' // Size = 100 bytes
TYPE ColorMatrix DWORD
 m (4, 4) AS SINGLE ' REAL[5,5]
END TYPE
'//----------------------------------------------------------------------------
'// Color Matrix flags
'//----------------------------------------------------------------------------
' enum ColorMatrixFlags
%EQUATE `ColorMatrixFlagsDefault = 0
%EQUATE `ColorMatrixFlagsSkipGrays = 1
%EQUATE `ColorMatrixFlagsAltGray = 2
'//----------------------------------------------------------------------------
'// Color Adjust Type
'//----------------------------------------------------------------------------
'enum ColorAdjustType
%EQUATE `ColorAdjustTypeDefault = 0
%EQUATE `ColorAdjustTypeBitmap = 1
%EQUATE `ColorAdjustTypeBrush = 2
%EQUATE `ColorAdjustTypePen = 3
%EQUATE `ColorAdjustTypeText = 4
%EQUATE `ColorAdjustTypeCount = 5
%EQUATE `ColorAdjustTypeAny = 6 ' Reserved
'//----------------------------------------------------------------------------
'// Color Map
'//----------------------------------------------------------------------------
'struct ColorMap
'{
' Color oldColor;
' Color newColor;
'};
' // The name conflicts with the ColorMap structure defined in COMMCTRL.INC.
' // Changed to a union in COMMCTRL.INC to allow to use ColorMap with GDI+.
' // Size = 8 bytes
TYPE GDIP_COLORMAP DWORD
 oldColor AS DWORD ' Color
 newColor AS DWORD ' Color
END TYPE
MACRO GpColorMap = GDIP_COLORMAP
#ENDIF
