internal static extern IntPtr CreateDIBSection(HandleRef hdc, ref BITMAPINFO_FLAT bmi, int iUsage, ref IntPtr ppvBits, IntPtr hSection, int dwOffset);
internal static partial IntPtr CreateDIBSection( #if NET7_0_OR_GREATER [MarshalUsing(typeof(HandleRefMarshaller))] #endif HandleRef hdc, ref BITMAPINFO_FLAT bmi, int iUsage, ref IntPtr ppvBits, IntPtr hSection, int dwOffset);
internal static extern int GetDIBits(HandleRef hdc, HandleRef hbm, int arg1, int arg2, IntPtr arg3, ref BITMAPINFO_FLAT bmi, int arg5);
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; }
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; }
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; }
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; }
private unsafe bool bFillColorTable0(IntPtr hdc, uint num3, ref BITMAPINFO_FLAT pbmi) { byte[] lppe = new byte[sizeof(PALETTEENTRY) * 0x100]; fixed (byte* numRef2 = lppe) { *(numRef2 + 2) = 12; } Contract.Assert(num3 > 1); // Why is this here? return false; }
public static extern int GetDIBits(IntPtr hdc, IntPtr hbm, int StartScan, int ScanLines, int lpBits, ref BITMAPINFO_FLAT bmi, int usage);
public static extern IntPtr CreateDIBSection(IntPtr hdc, ref BITMAPINFO_FLAT bmi, int iUsage, ref int ppvBits, IntPtr hSection, int dwOffset);