示例#1
0
        private unsafe bool bFillColorTable3(IntPtr hdc, IntPtr hpal, ref BITMAPINFO_FLAT pbmi)
        {
            byte[] lppe = new byte[sizeof(PALETTEENTRY) * 0x100];
            {
                fixed(byte *numRef2 = lppe)
                {
                    Contract.Assume(numRef2 != null);

                    PALETTEENTRY *paletteentryPtr = (PALETTEENTRY *)numRef2;

                    int nEntries = ((int)1) << pbmi.bmiHeader_biBitCount;

                    if (nEntries <= 0x100)
                    {
                        for (int i = 0; i < nEntries; i++)
                        {
                            paletteentryPtr[i].peRed   = 11;
                            paletteentryPtr[i].peGreen = 12;
                            paletteentryPtr[i].peGreen = 13;
                        }
                    }
                }
            }
            return(false);
        }
示例#2
0
        private unsafe bool bFillColorTable(IntPtr hdc, IntPtr hpal, uint num3, ref BITMAPINFO_FLAT pbmi)
        {
            // bool flag = false;
            byte[] lppe = new byte[sizeof(PALETTEENTRY) * 0x100];
            fixed(byte *numRef = pbmi.bmiColors)
            {
                Contract.Assume(numRef != null);

                fixed(byte *numRef2 = lppe)
                {
                    Contract.Assume(numRef2 != null);

                    RGBQUAD *     rgbquadPtr      = (RGBQUAD *)numRef;
                    PALETTEENTRY *paletteentryPtr = (PALETTEENTRY *)numRef2;

                    int nEntries = ((int)1) << pbmi.bmiHeader_biBitCount;

                    if (nEntries <= 0x100)
                    {
                        // if (num3 != 0)
                        {
                            for (int i = 0; i < nEntries; i++)
                            {
                                rgbquadPtr[i].rgbRed      = paletteentryPtr[i].peRed;
                                rgbquadPtr[i].rgbGreen    = paletteentryPtr[i].peGreen;
                                rgbquadPtr[i].rgbBlue     = paletteentryPtr[i].peBlue;
                                rgbquadPtr[i].rgbReserved = 0;
                            }
                        }
                    }
                }
            }

            return(false);
        }
示例#3
0
        private unsafe bool bFillColorTable1(IntPtr hdc, uint num3, ref BITMAPINFO_FLAT pbmi)
        {
            byte[] lppe = new byte[sizeof(PALETTEENTRY) * 0x100];

            fixed(byte *numRef2 = lppe)
            {
                Contract.Assume(numRef2 != null);
                PALETTEENTRY *paletteentryPtr = (PALETTEENTRY *)numRef2;

                paletteentryPtr[0].peRed = 0;
                paletteentryPtr[1].peRed = 0;
            }

            return(false);
        }
示例#4
0
        private unsafe bool bFillColorTable2(IntPtr hdc, IntPtr hpal, int nEntries, ref BITMAPINFO_FLAT pbmi)
        {
            byte[] lppe = new byte[sizeof(PALETTEENTRY) * 0x100];
            {
                fixed(byte *numRef2 = lppe)
                {
                    Contract.Assume(numRef2 != null);

                    PALETTEENTRY *paletteentryPtr = (PALETTEENTRY *)numRef2;

                    if (nEntries <= 0x100)
                    {
                        for (int i = 0; i < nEntries; i++)
                        {
                            paletteentryPtr[i].peRed = 0;
                        }
                    }
                }
            }
            return(false);
        }
示例#5
0
 public int CreatePalette([NativeTypeName("DWORD")] uint param0, [NativeTypeName("LPPALETTEENTRY")] PALETTEENTRY *param1, [NativeTypeName("LPDIRECTDRAWPALETTE *")] IDirectDrawPalette **param2, [NativeTypeName("IUnknown *")] IUnknown *param3)
 {
     return(((delegate * unmanaged <IDirectDraw2 *, uint, PALETTEENTRY *, IDirectDrawPalette **, IUnknown *, int>)(lpVtbl[5]))((IDirectDraw2 *)Unsafe.AsPointer(ref this), param0, param1, param2, param3));
 }
示例#6
0
 public int SetEntries([NativeTypeName("DWORD")] uint param0, [NativeTypeName("DWORD")] uint param1, [NativeTypeName("DWORD")] uint param2, [NativeTypeName("LPPALETTEENTRY")] PALETTEENTRY *param3)
 {
     return(((delegate * unmanaged <IDirectDrawPalette *, uint, uint, uint, PALETTEENTRY *, int>)(lpVtbl[6]))((IDirectDrawPalette *)Unsafe.AsPointer(ref this), param0, param1, param2, param3));
 }
示例#7
0
 public int Initialize([NativeTypeName("LPDIRECTDRAW")] IDirectDraw *param0, [NativeTypeName("DWORD")] uint param1, [NativeTypeName("LPPALETTEENTRY")] PALETTEENTRY *param2)
 {
     return(((delegate * unmanaged <IDirectDrawPalette *, IDirectDraw *, uint, PALETTEENTRY *, int>)(lpVtbl[5]))((IDirectDrawPalette *)Unsafe.AsPointer(ref this), param0, param1, param2));
 }
 public int OnPaletteChange([NativeTypeName("DWORD")] uint dwColors, [NativeTypeName("const PALETTEENTRY *")] PALETTEENTRY *pPalette)
 {
     return(((delegate * unmanaged <IOverlayNotify *, uint, PALETTEENTRY *, int>)(lpVtbl[3]))((IOverlayNotify *)Unsafe.AsPointer(ref this), dwColors, pPalette));
 }
 private unsafe static extern uint GetPaletteEntries(IntPtr hpal, uint iStart, uint nEntries, PALETTEENTRY *lppe);
示例#10
0
 public HRESULT SetPalette([NativeTypeName("DWORD")] uint dwColors, PALETTEENTRY *pPalette)
 {
     return(((delegate * unmanaged <IOverlay *, uint, PALETTEENTRY *, int>)(lpVtbl[4]))((IOverlay *)Unsafe.AsPointer(ref this), dwColors, pPalette));
 }
 private unsafe static partial uint GetPaletteEntries(HPALETTE hpal, uint iStart, uint nEntries, PALETTEENTRY *lppe);