|
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------
#pragma warning disable CS1591,CS1573,CS0465,CS0649,CS8019,CS1570,CS1584,CS1658,CS0436,CS8981
using global::System;
using global::System.Diagnostics;
using global::System.Diagnostics.CodeAnalysis;
using global::System.Runtime.CompilerServices;
using global::System.Runtime.InteropServices;
using global::System.Runtime.Versioning;
using winmdroot = global::Windows.Win32;
namespace Windows.Win32
{
namespace Graphics.Gdi
{
/// <summary>The BITMAPINFO structure defines the dimensions and color information for a DIB.</summary>
/// <remarks>
/// <para>A DIB consists of two distinct parts: a <b>BITMAPINFO</b> structure describing the dimensions and colors of the bitmap, and an array of bytes defining the pixels of the bitmap. The bits in the array are packed together, but each scan line must be padded with zeros to end on a <b>LONG</b> data-type boundary. If the height of the bitmap is positive, the bitmap is a bottom-up DIB and its origin is the lower-left corner. If the height is negative, the bitmap is a top-down DIB and its origin is the upper left corner. A bitmap is packed when the bitmap array immediately follows the <b>BITMAPINFO</b> header. Packed bitmaps are referenced by a single pointer. For packed bitmaps, the <b>biClrUsed</b> member must be set to an even number when using the DIB_PAL_COLORS mode so that the DIB bitmap array starts on a <b>DWORD</b> boundary. <div class="alert"><b>Note</b> <p class="note">The <b>bmiColors</b> member should not contain palette indexes if the bitmap is to be stored in a file or transferred to another application. <p class="note">Unless the application has exclusive use and control of the bitmap, the bitmap color table should contain explicit RGB values. </div> <div> </div></para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/wingdi/ns-wingdi-bitmapinfo#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")]
internal partial struct BITMAPINFO
{
/// <summary>
/// <para>A <a href="https://docs.microsoft.com/windows/win32/api/wingdi/ns-wingdi-bitmapinfoheader">BITMAPINFOHEADER</a> structure that contains information about the dimensions of color format. .</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/wingdi/ns-wingdi-bitmapinfo#members">Read more on docs.microsoft.com</see>.</para>
/// </summary>
internal winmdroot.Graphics.Gdi.BITMAPINFOHEADER bmiHeader;
/// <summary>
/// <para>The <b>bmiColors</b> member contains one of the following: </para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/wingdi/ns-wingdi-bitmapinfo#members">Read more on docs.microsoft.com</see>.</para>
/// </summary>
internal global::Windows.Win32.VariableLengthInlineArray<winmdroot.Graphics.Gdi.RGBQUAD> bmiColors;
/// <summary>Computes the amount of memory that must be allocated to store this struct, including the specified number of elements in the variable length inline array at the end.</summary>
internal static unsafe int SizeOf(int count)
{
int v = sizeof(BITMAPINFO);
if (count > 1)
v +=checked((count - 1) * sizeof(winmdroot.Graphics.Gdi.RGBQUAD));
else
if (count < 0)
throw new ArgumentOutOfRangeException();
return v;
}
}
}
}
|