File: Windows.Win32.PInvoke.GDI32.dll.g.cs
Project: src\src\System.Windows.Forms.Primitives\src\System.Windows.Forms.Primitives.csproj (System.Windows.Forms.Primitives)
// ------------------------------------------------------------------------------
// <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
{

	/// <content>
	/// Contains extern methods from "GDI32.dll".
	/// </content>
	internal static partial class PInvoke
	{
		/// <inheritdoc cref="CreateBrushIndirect(winmdroot.Graphics.Gdi.LOGBRUSH*)"/>
		[SupportedOSPlatform("windows5.0")]
		internal static unsafe winmdroot.Graphics.Gdi.HBRUSH CreateBrushIndirect(in winmdroot.Graphics.Gdi.LOGBRUSH plbrush)
		{
			fixed (winmdroot.Graphics.Gdi.LOGBRUSH* plbrushLocal = &plbrush)
			{
				winmdroot.Graphics.Gdi.HBRUSH __result = PInvoke.CreateBrushIndirect(plbrushLocal);
				return __result;
			}
		}

		/// <summary>The CreateBrushIndirect function creates a logical brush that has the specified style, color, and pattern.</summary>
		/// <param name="plbrush">A pointer to a <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/ns-wingdi-logbrush">LOGBRUSH</a> structure that contains information about the brush.</param>
		/// <returns>
		/// <para>If the function succeeds, the return value identifies a logical brush. If the function fails, the return value is <b>NULL</b>.</para>
		/// </returns>
		/// <remarks>
		/// <para>A brush is a bitmap that the system uses to paint the interiors of filled shapes. After an application creates a brush by calling <b>CreateBrushIndirect</b>, it can select it into any device context by calling the <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-selectobject">SelectObject</a> function. A brush created by using a monochrome bitmap (one color plane, one bit per pixel) is drawn using the current text and background colors. Pixels represented by a bit set to 0 are drawn with the current text color; pixels represented by a bit set to 1 are drawn with the current background color. When you no longer need the brush, call the <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-deleteobject">DeleteObject</a> function to delete it. <b>ICM:</b> No color is done at brush creation. However, color management is performed when the brush is selected into an ICM-enabled device context.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/wingdi/nf-wingdi-createbrushindirect#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("GDI32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe winmdroot.Graphics.Gdi.HBRUSH CreateBrushIndirect(winmdroot.Graphics.Gdi.LOGBRUSH* plbrush);

		/// <summary>The CreateHalftonePalette function creates a halftone palette for the specified device context (DC).</summary>
		/// <param name="hdc">A handle to the device context.</param>
		/// <returns>
		/// <para>If the function succeeds, the return value is a handle to a logical halftone palette. If the function fails, the return value is zero.</para>
		/// </returns>
		/// <remarks>
		/// <para>An application should create a halftone palette when the stretching mode of a device context is set to HALFTONE. The logical halftone palette returned by <b>CreateHalftonePalette</b> should then be selected and realized into the device context before the <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-stretchblt">StretchBlt</a> or <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-stretchdibits">StretchDIBits</a> function is called. When you no longer need the palette, call the <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-deleteobject">DeleteObject</a> function to delete it.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/wingdi/nf-wingdi-createhalftonepalette#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("GDI32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern winmdroot.Graphics.Gdi.HPALETTE CreateHalftonePalette(winmdroot.Graphics.Gdi.HDC hdc);

		/// <summary>The CreatePatternBrush function creates a logical brush with the specified bitmap pattern. The bitmap can be a DIB section bitmap, which is created by the CreateDIBSection function, or it can be a device-dependent bitmap.</summary>
		/// <param name="hbm">A handle to the bitmap to be used to create the logical brush.</param>
		/// <returns>
		/// <para>If the function succeeds, the return value identifies a logical brush. If the function fails, the return value is <b>NULL</b>.</para>
		/// </returns>
		/// <remarks>
		/// <para>A pattern brush is a bitmap that the system uses to paint the interiors of filled shapes. After an application creates a brush by calling <b>CreatePatternBrush</b>, it can select that brush into any device context by calling the <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-selectobject">SelectObject</a> function. You can delete a pattern brush without affecting the associated bitmap by using the <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-deleteobject">DeleteObject</a> function. Therefore, you can then use this bitmap to create any number of pattern brushes. A brush created by using a monochrome (1 bit per pixel) bitmap has the text and background colors of the device context to which it is drawn. Pixels represented by a 0 bit are drawn with the current text color; pixels represented by a 1 bit are drawn with the current background color. <b>ICM:</b> No color is done at brush creation. However, color management is performed when the brush is selected into an ICM-enabled device context.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/wingdi/nf-wingdi-createpatternbrush#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("GDI32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern winmdroot.Graphics.Gdi.HBRUSH CreatePatternBrush(winmdroot.Graphics.Gdi.HBITMAP hbm);

		/// <summary>The CreateRectRgn function creates a rectangular region.</summary>
		/// <param name="x1">Specifies the x-coordinate of the upper-left corner of the region in logical units.</param>
		/// <param name="y1">Specifies the y-coordinate of the upper-left corner of the region in logical units.</param>
		/// <param name="x2">Specifies the x-coordinate of the lower-right corner of the region in logical units.</param>
		/// <param name="y2">Specifies the y-coordinate of the lower-right corner of the region in logical units.</param>
		/// <returns>
		/// <para>If the function succeeds, the return value is the handle to the region. If the function fails, the return value is <b>NULL</b>.</para>
		/// </returns>
		/// <remarks>
		/// <para>When you no longer need the <b>HRGN</b> object, call the <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-deleteobject">DeleteObject</a> function to delete it. Region coordinates are represented as 27-bit signed integers. Regions created by the Create&lt;shape&gt;Rgn methods (such as <b>CreateRectRgn</b> and <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-createpolygonrgn">CreatePolygonRgn</a>) only include the interior of the shape; the shape's outline is excluded from the region. This means that any point on a line between two sequential vertices is not included in the region. If you were to call <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-ptinregion">PtInRegion</a> for such a point, it would return zero as the result.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/wingdi/nf-wingdi-createrectrgn#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("GDI32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern winmdroot.Graphics.Gdi.HRGN CreateRectRgn(int x1, int y1, int x2, int y2);

		/// <summary>Creates a D2D1_ELLIPSE structure.</summary>
		/// <returns>
		/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/d2d1/ns-d2d1-d2d1_ellipse">D2D1_ELLIPSE</a></b> The new ellipse.</para>
		/// </returns>
		/// <remarks>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/d2d1helper/nf-d2d1helper-ellipse">Learn more about this API from docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("GDI32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows6.1")]
		internal static extern winmdroot.Foundation.BOOL Ellipse(winmdroot.Graphics.Gdi.HDC hdc, int left, int top, int right, int bottom);

		/// <inheritdoc cref="ExtTextOut(winmdroot.Graphics.Gdi.HDC, int, int, winmdroot.Graphics.Gdi.ETO_OPTIONS, winmdroot.Foundation.RECT*, winmdroot.Foundation.PCWSTR, uint, int*)"/>
		[SupportedOSPlatform("windows5.0")]
		internal static unsafe winmdroot.Foundation.BOOL ExtTextOut(winmdroot.Graphics.Gdi.HDC hdc, int x, int y, winmdroot.Graphics.Gdi.ETO_OPTIONS options, winmdroot.Foundation.RECT? lprect, string lpString, ReadOnlySpan<int> lpDx)
		{
			fixed (int* lpDxLocal = lpDx)
			{
				fixed (char* lpStringLocal = lpString)
				{
					winmdroot.Foundation.RECT lprectLocal = lprect ?? default(winmdroot.Foundation.RECT);
					winmdroot.Foundation.BOOL __result = PInvoke.ExtTextOut(hdc, x, y, options, lprect.HasValue ? &lprectLocal : null, lpStringLocal, (uint )lpDx.Length, lpDxLocal);
					return __result;
				}
			}
		}

		/// <summary>The ExtTextOut function draws text using the currently selected font, background color, and text color. You can optionally provide dimensions to be used for clipping, opaquing, or both. (Unicode)</summary>
		/// <param name="hdc">A handle to the device context.</param>
		/// <param name="x">The x-coordinate, in logical coordinates, of the reference point used to position the string.</param>
		/// <param name="y">The y-coordinate, in logical coordinates, of the reference point used to position the string.</param>
		/// <param name="options"></param>
		/// <param name="lprect">A pointer to an optional <a href="https://docs.microsoft.com/windows/desktop/api/windef/ns-windef-rect">RECT</a> structure that specifies the dimensions, in logical coordinates, of a rectangle that is used for clipping, opaquing, or both.</param>
		/// <param name="lpString">A pointer to a string that specifies the text to be drawn. The string does not need to be zero-terminated, since <i>cbCount</i> specifies the length of the string.</param>
		/// <param name="c">
		/// <para>The <a href="https://docs.microsoft.com/windows/desktop/gdi/specifying-length-of-text-output-string">length of the string</a> pointed to by <i>lpString</i>. This value may not exceed 8192.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/wingdi/nf-wingdi-exttextoutw#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="lpDx">A pointer to an optional array of values that indicate the distance between origins of adjacent character cells. For example, lpDx[<i>i</i>] logical units separate the origins of character cell <i>i</i> and character cell <i>i</i> + 1.</param>
		/// <returns>
		/// <para>If the string is drawn, the return value is nonzero. However, if the ANSI version of <b>ExtTextOut</b> is called with ETO_GLYPH_INDEX, the function returns <b>TRUE</b> even though the function does nothing. If the function fails, the return value is zero.</para>
		/// </returns>
		/// <remarks>
		/// <para>The current text-alignment settings for the specified device context determine how the reference point is used to position the text. The text-alignment settings are retrieved by calling the <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-gettextalign">GetTextAlign</a> function. The text-alignment settings are altered by calling the <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-settextalign">SetTextAlign</a> function. You can use the following values for text alignment. Only one flag can be chosen from those that affect horizontal and vertical alignment. In addition, only one of the two flags that alter the current position can be chosen.</para>
		/// <para></para>
		/// <para>This doc was truncated.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/wingdi/nf-wingdi-exttextoutw#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("GDI32.dll", ExactSpelling = true, EntryPoint = "ExtTextOutW"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe winmdroot.Foundation.BOOL ExtTextOut(winmdroot.Graphics.Gdi.HDC hdc, int x, int y, winmdroot.Graphics.Gdi.ETO_OPTIONS options, [Optional] winmdroot.Foundation.RECT* lprect, winmdroot.Foundation.PCWSTR lpString, uint c, [Optional] int* lpDx);

		/// <summary>The GetBitmapBits function copies the bitmap bits of a specified device-dependent bitmap into a buffer.</summary>
		/// <param name="hbit">A handle to the device-dependent bitmap.</param>
		/// <param name="cb">The number of bytes to copy from the bitmap into the buffer.</param>
		/// <param name="lpvBits">A pointer to a buffer to receive the bitmap bits. The bits are stored as an array of byte values.</param>
		/// <returns>
		/// <para>If the function succeeds, the return value is the number of bytes copied to the buffer. If the function fails, the return value is zero.</para>
		/// </returns>
		/// <remarks>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/wingdi/nf-wingdi-getbitmapbits">Learn more about this API from docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("GDI32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe int GetBitmapBits(winmdroot.Graphics.Gdi.HBITMAP hbit, int cb, void* lpvBits);

		/// <summary>The GetBkColor function returns the current background color for the specified device context.</summary>
		/// <param name="hdc">Handle to the device context whose background color is to be returned.</param>
		/// <returns>
		/// <para>If the function succeeds, the return value is a <a href="https://docs.microsoft.com/windows/desktop/gdi/colorref">COLORREF</a> value for the current background color. If the function fails, the return value is CLR_INVALID.</para>
		/// </returns>
		/// <remarks>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/wingdi/nf-wingdi-getbkcolor">Learn more about this API from docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("GDI32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern winmdroot.Foundation.COLORREF GetBkColor(winmdroot.Graphics.Gdi.HDC hdc);

		/// <summary>The GetBkMode function returns the current background mix mode for a specified device context. The background mix mode of a device context affects text, hatched brushes, and pen styles that are not solid lines.</summary>
		/// <param name="hdc">Handle to the device context whose background mode is to be returned.</param>
		/// <returns>
		/// <para>If the function succeeds, the return value specifies the current background mix mode, either OPAQUE or TRANSPARENT. If the function fails, the return value is zero.</para>
		/// </returns>
		/// <remarks>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/wingdi/nf-wingdi-getbkmode">Learn more about this API from docs.microsoft.com</see>.</para>
		/// </remarks>
		[SupportedOSPlatform("windows5.0")]
		internal static winmdroot.Graphics.Gdi.BACKGROUND_MODE GetBkMode(winmdroot.Graphics.Gdi.HDC hdc)
		{
			winmdroot.Graphics.Gdi.BACKGROUND_MODE __retVal = (winmdroot.Graphics.Gdi.BACKGROUND_MODE)LocalExternFunction(hdc);
			return __retVal;

			[DllImport("GDI32.dll", ExactSpelling = true, EntryPoint = "GetBkMode"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
			static extern int LocalExternFunction(winmdroot.Graphics.Gdi.HDC hdc);
		}

		/// <inheritdoc cref="GetBrushOrgEx(winmdroot.Graphics.Gdi.HDC, global::System.Drawing.Point*)"/>
		[SupportedOSPlatform("windows5.0")]
		internal static unsafe winmdroot.Foundation.BOOL GetBrushOrgEx(winmdroot.Graphics.Gdi.HDC hdc, out global::System.Drawing.Point lppt)
		{
			fixed (global::System.Drawing.Point* lpptLocal = &lppt)
			{
				winmdroot.Foundation.BOOL __result = PInvoke.GetBrushOrgEx(hdc, lpptLocal);
				return __result;
			}
		}

		/// <summary>The GetBrushOrgEx function retrieves the current brush origin for the specified device context. This function replaces the GetBrushOrg function.</summary>
		/// <param name="hdc">A handle to the device context.</param>
		/// <param name="lppt">A pointer to a <a href="https://docs.microsoft.com/windows/win32/api/windef/ns-windef-point">POINT</a> structure that receives the brush origin, in device coordinates.</param>
		/// <returns>
		/// <para>If the function succeeds, the return value is nonzero. If the function fails, the return value is zero.</para>
		/// </returns>
		/// <remarks>
		/// <para>A brush is a bitmap that the system uses to paint the interiors of filled shapes. The brush origin is a set of coordinates with values between 0 and 7, specifying the location of one pixel in the bitmap. The default brush origin coordinates are (0,0). For horizontal coordinates, the value 0 corresponds to the leftmost column of pixels; the value 7 corresponds to the rightmost column. For vertical coordinates, the value 0 corresponds to the uppermost row of pixels; the value 7 corresponds to the lowermost row. When the system positions the brush at the start of any painting operation, it maps the origin of the brush to the location in the window's client area specified by the brush origin. For example, if the origin is set to (2,3), the system maps the origin of the brush (0,0) to the location (2,3) on the window's client area. If an application uses a brush to fill the backgrounds of both a parent and a child window with matching colors, it may be necessary to set the brush origin after painting the parent window but before painting the child window. The system automatically tracks the origin of all window-managed device contexts and adjusts their brushes as necessary to maintain an alignment of patterns on the surface.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/wingdi/nf-wingdi-getbrushorgex#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("GDI32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe winmdroot.Foundation.BOOL GetBrushOrgEx(winmdroot.Graphics.Gdi.HDC hdc, global::System.Drawing.Point* lppt);

		/// <inheritdoc cref="GetClipBox(winmdroot.Graphics.Gdi.HDC, winmdroot.Foundation.RECT*)"/>
		[SupportedOSPlatform("windows5.0")]
		internal static unsafe winmdroot.Graphics.Gdi.GDI_REGION_TYPE GetClipBox(winmdroot.Graphics.Gdi.HDC hdc, out winmdroot.Foundation.RECT lprect)
		{
			fixed (winmdroot.Foundation.RECT* lprectLocal = &lprect)
			{
				winmdroot.Graphics.Gdi.GDI_REGION_TYPE __result = PInvoke.GetClipBox(hdc, lprectLocal);
				return __result;
			}
		}

		/// <summary>The GetClipBox function retrieves the dimensions of the tightest bounding rectangle that can be drawn around the current visible area on the device.</summary>
		/// <param name="hdc">A handle to the device context.</param>
		/// <param name="lprect">A pointer to a <a href="https://docs.microsoft.com/windows/desktop/api/windef/ns-windef-rect">RECT</a> structure that is to receive the rectangle dimensions, in logical units.</param>
		/// <returns>
		/// <para>If the function succeeds, the return value specifies the clipping box's complexity and can be one of the following values. </para>
		/// <para>This doc was truncated.</para>
		/// </returns>
		/// <remarks>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/wingdi/nf-wingdi-getclipbox">Learn more about this API from docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("GDI32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe winmdroot.Graphics.Gdi.GDI_REGION_TYPE GetClipBox(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Foundation.RECT* lprect);

		/// <summary>The GetClipRgn function retrieves a handle identifying the current application-defined clipping region for the specified device context.</summary>
		/// <param name="hdc">A handle to the device context.</param>
		/// <param name="hrgn">A handle to an existing region before the function is called. After the function returns, this parameter is a handle to a copy of the current clipping region.</param>
		/// <returns>If the function succeeds and there is no clipping region for the given device context, the return value is zero. If the function succeeds and there is a clipping region for the given device context, the return value is 1. If an error occurs, the return value is -1.</returns>
		/// <remarks>
		/// <para>An application-defined clipping region is a clipping region identified by the <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-selectcliprgn">SelectClipRgn</a> function. It is not a clipping region created when the application calls the <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-beginpaint">BeginPaint</a> function. If the function succeeds, the <i>hrgn</i> parameter is a handle to a copy of the current clipping region. Subsequent changes to this copy will not affect the current clipping region.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/wingdi/nf-wingdi-getcliprgn#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("GDI32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern int GetClipRgn(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.Gdi.HRGN hrgn);

		/// <summary>The GetCurrentObject function retrieves a handle to an object of the specified type that has been selected into the specified device context (DC).</summary>
		/// <param name="hdc">A handle to the DC.</param>
		/// <param name="type"></param>
		/// <returns>
		/// <para>If the function succeeds, the return value is a handle to the specified object. If the function fails, the return value is <b>NULL</b>.</para>
		/// </returns>
		/// <remarks>An application can use the <b>GetCurrentObject</b> and <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-getobject">GetObject</a> functions to retrieve descriptions of the graphic objects currently selected into the specified DC.</remarks>
		[SupportedOSPlatform("windows5.0")]
		internal static winmdroot.Graphics.Gdi.HGDIOBJ GetCurrentObject(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.Gdi.OBJ_TYPE type)
		{
			winmdroot.Graphics.Gdi.HGDIOBJ __retVal = LocalExternFunction(hdc, (uint)type);
			return __retVal;

			[DllImport("GDI32.dll", ExactSpelling = true, EntryPoint = "GetCurrentObject"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
			static extern winmdroot.Graphics.Gdi.HGDIOBJ LocalExternFunction(winmdroot.Graphics.Gdi.HDC hdc, uint type);
		}

		/// <summary>The GetDIBits function retrieves the bits of the specified compatible bitmap and copies them into a buffer as a DIB using the specified format.</summary>
		/// <param name="hdc">A handle to the device context.</param>
		/// <param name="hbm">A handle to the bitmap. This must be a compatible bitmap (DDB).</param>
		/// <param name="start">The first scan line to retrieve.</param>
		/// <param name="cLines">The number of scan lines to retrieve.</param>
		/// <param name="lpvBits">A pointer to a buffer to receive the bitmap data. If this parameter is <b>NULL</b>, the function passes the dimensions and format of the bitmap to the <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/ns-wingdi-bitmapinfo">BITMAPINFO</a> structure pointed to by the <i>lpbmi</i> parameter.</param>
		/// <param name="lpbmi">A pointer to a <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/ns-wingdi-bitmapinfo">BITMAPINFO</a> structure that specifies the desired format for the DIB data.</param>
		/// <param name="usage"></param>
		/// <returns>
		/// <para>If the <i>lpvBits</i> parameter is non-<b>NULL</b> and the function succeeds, the return value is the number of scan lines copied from the bitmap. If the <i>lpvBits</i> parameter is <b>NULL</b> and <b>GetDIBits</b> successfully fills the <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/ns-wingdi-bitmapinfo">BITMAPINFO</a> structure, the return value is nonzero. If the function fails, the return value is zero. This function can return the following value. </para>
		/// <para>This doc was truncated.</para>
		/// </returns>
		/// <remarks>
		/// <para>If the requested format for the DIB matches its internal format, the RGB values for the bitmap are copied. If the requested format doesn't match the internal format, a color table is synthesized. The following table describes the color table synthesized for each format. </para>
		/// <para>This doc was truncated.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/wingdi/nf-wingdi-getdibits#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("GDI32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe int GetDIBits(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.Gdi.HBITMAP hbm, uint start, uint cLines, [Optional] void* lpvBits, winmdroot.Graphics.Gdi.BITMAPINFO* lpbmi, winmdroot.Graphics.Gdi.DIB_USAGE usage);

		/// <summary>The GetMapMode function retrieves the current mapping mode.</summary>
		/// <param name="hdc">A handle to the device context.</param>
		/// <returns>
		/// <para>If the function succeeds, the return value specifies the mapping mode. If the function fails, the return value is zero.</para>
		/// </returns>
		/// <remarks>
		/// <para>The following are the various mapping modes. </para>
		/// <para>This doc was truncated.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/wingdi/nf-wingdi-getmapmode#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("GDI32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern winmdroot.Graphics.Gdi.HDC_MAP_MODE GetMapMode(winmdroot.Graphics.Gdi.HDC hdc);

		/// <summary>The GetNearestColor function retrieves a color value identifying a color from the system palette that will be displayed when the specified color value is used.</summary>
		/// <param name="hdc">A handle to the device context.</param>
		/// <param name="color">A color value that identifies a requested color. To create a <a href="https://docs.microsoft.com/windows/desktop/gdi/colorref">COLORREF</a> color value, use the <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-rgb">RGB</a> macro.</param>
		/// <returns>
		/// <para>If the function succeeds, the return value identifies a color from the system palette that corresponds to the given color value. If the function fails, the return value is CLR_INVALID.</para>
		/// </returns>
		/// <remarks>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/wingdi/nf-wingdi-getnearestcolor">Learn more about this API from docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("GDI32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern winmdroot.Foundation.COLORREF GetNearestColor(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Foundation.COLORREF color);

		/// <inheritdoc cref="GetRgnBox(winmdroot.Graphics.Gdi.HRGN, winmdroot.Foundation.RECT*)"/>
		[SupportedOSPlatform("windows5.0")]
		internal static unsafe winmdroot.Graphics.Gdi.GDI_REGION_TYPE GetRgnBox(winmdroot.Graphics.Gdi.HRGN hrgn, out winmdroot.Foundation.RECT lprc)
		{
			fixed (winmdroot.Foundation.RECT* lprcLocal = &lprc)
			{
				winmdroot.Graphics.Gdi.GDI_REGION_TYPE __result = PInvoke.GetRgnBox(hrgn, lprcLocal);
				return __result;
			}
		}

		/// <summary>The GetRgnBox function retrieves the bounding rectangle of the specified region.</summary>
		/// <param name="hrgn">A handle to the region.</param>
		/// <param name="lprc">A pointer to a <a href="https://docs.microsoft.com/windows/desktop/api/windef/ns-windef-rect">RECT</a> structure that receives the bounding rectangle in logical units.</param>
		/// <returns>
		/// <para>The return value specifies the region's complexity. It can be one of the following values: </para>
		/// <para>This doc was truncated.</para>
		/// </returns>
		/// <remarks>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/wingdi/nf-wingdi-getrgnbox">Learn more about this API from docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("GDI32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe winmdroot.Graphics.Gdi.GDI_REGION_TYPE GetRgnBox(winmdroot.Graphics.Gdi.HRGN hrgn, winmdroot.Foundation.RECT* lprc);

		/// <summary>The GetROP2 function retrieves the foreground mix mode of the specified device context. The mix mode specifies how the pen or interior color and the color already on the screen are combined to yield a new color.</summary>
		/// <param name="hdc">Handle to the device context.</param>
		/// <returns>
		/// <para>If the function succeeds, the return value specifies the foreground mix mode. If the function fails, the return value is zero.</para>
		/// </returns>
		/// <remarks>
		/// <para>Following are the foreground mix modes. </para>
		/// <para>This doc was truncated.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/wingdi/nf-wingdi-getrop2#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("GDI32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern winmdroot.Graphics.Gdi.R2_MODE GetROP2(winmdroot.Graphics.Gdi.HDC hdc);

		/// <inheritdoc cref="GetSystemPaletteEntries(winmdroot.Graphics.Gdi.HDC, uint, uint, winmdroot.Graphics.Gdi.PALETTEENTRY*)"/>
		[SupportedOSPlatform("windows5.0")]
		internal static unsafe uint GetSystemPaletteEntries(winmdroot.Graphics.Gdi.HDC hdc, uint iStart, Span<winmdroot.Graphics.Gdi.PALETTEENTRY> pPalEntries)
		{
			fixed (winmdroot.Graphics.Gdi.PALETTEENTRY* pPalEntriesLocal = pPalEntries)
			{
				uint __result = PInvoke.GetSystemPaletteEntries(hdc, iStart, (uint )pPalEntries.Length, pPalEntriesLocal);
				return __result;
			}
		}

		/// <summary>The GetSystemPaletteEntries function retrieves a range of palette entries from the system palette that is associated with the specified device context (DC).</summary>
		/// <param name="hdc">A handle to the device context.</param>
		/// <param name="iStart">The first entry to be retrieved from the system palette.</param>
		/// <param name="cEntries">The number of entries to be retrieved from the system palette.</param>
		/// <param name="pPalEntries">A pointer to an array of <a href="https://docs.microsoft.com/previous-versions/dd162769(v=vs.85)">PALETTEENTRY</a> structures to receive the palette entries. The array must contain at least as many structures as specified by the <i>cEntries</i> parameter. If this parameter is <b>NULL</b>, the function returns the total number of entries in the palette.</param>
		/// <returns>
		/// <para>If the function succeeds, the return value is the number of entries retrieved from the palette. If the function fails, the return value is zero.</para>
		/// </returns>
		/// <remarks>An application can determine whether a device supports palette operations by calling the <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-getdevicecaps">GetDeviceCaps</a> function and specifying the RASTERCAPS constant.</remarks>
		[DllImport("GDI32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe uint GetSystemPaletteEntries(winmdroot.Graphics.Gdi.HDC hdc, uint iStart, uint cEntries, [Optional] winmdroot.Graphics.Gdi.PALETTEENTRY* pPalEntries);

		/// <summary>The GetTextAlign function retrieves the text-alignment setting for the specified device context.</summary>
		/// <param name="hdc">A handle to the device context.</param>
		/// <returns>
		/// <para>If the function succeeds, the return value is the status of the text-alignment flags. For more information about the return value, see the Remarks section. The return value is a combination of the following values. </para>
		/// <para>This doc was truncated.</para>
		/// </returns>
		/// <remarks>
		/// <para>The bounding rectangle is a rectangle bounding all of the character cells in a string of text. Its dimensions can be obtained by calling the <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-gettextextentpoint32a">GetTextExtentPoint32</a> function. The text-alignment flags determine how the <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-textouta">TextOut</a> and <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-exttextouta">ExtTextOut</a> functions align a string of text in relation to the string's reference point provided to <b>TextOut</b> or <b>ExtTextOut</b>. The text-alignment flags are not necessarily single bit flags and may be equal to zero. The flags must be examined in groups of related flags, as shown in the following list. </para>
		/// <para>This doc was truncated.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/wingdi/nf-wingdi-gettextalign#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("GDI32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern winmdroot.Graphics.Gdi.TEXT_ALIGN_OPTIONS GetTextAlign(winmdroot.Graphics.Gdi.HDC hdc);

		/// <summary>The GetTextColor function retrieves the current text color for the specified device context.</summary>
		/// <param name="hdc">Handle to the device context.</param>
		/// <returns>
		/// <para>If the function succeeds, the return value is the current text color as a <a href="https://docs.microsoft.com/windows/desktop/gdi/colorref">COLORREF</a> value. If the function fails, the return value is CLR_INVALID. No extended error information is available.</para>
		/// </returns>
		/// <remarks>The text color defines the foreground color of characters drawn by using the <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-textouta">TextOut</a> or <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-exttextouta">ExtTextOut</a> function.</remarks>
		[DllImport("GDI32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern winmdroot.Foundation.COLORREF GetTextColor(winmdroot.Graphics.Gdi.HDC hdc);

		/// <inheritdoc cref="GetTextExtentPoint32W(winmdroot.Graphics.Gdi.HDC, winmdroot.Foundation.PCWSTR, int, winmdroot.Foundation.SIZE*)"/>
		[SupportedOSPlatform("windows5.0")]
		internal static unsafe winmdroot.Foundation.BOOL GetTextExtentPoint32W(winmdroot.Graphics.Gdi.HDC hdc, string lpString, int c, out winmdroot.Foundation.SIZE psizl)
		{
			fixed (winmdroot.Foundation.SIZE* psizlLocal = &psizl)
			{
				fixed (char* lpStringLocal = lpString)
				{
					winmdroot.Foundation.BOOL __result = PInvoke.GetTextExtentPoint32W(hdc, lpStringLocal, c, psizlLocal);
					return __result;
				}
			}
		}

		/// <summary>The GetTextExtentPoint32 function computes the width and height of the specified string of text. (Unicode)</summary>
		/// <param name="hdc">A handle to the device context.</param>
		/// <param name="lpString">A pointer to a buffer that specifies the text string. The string does not need to be null-terminated, because the <i>c</i> parameter specifies the length of the string.</param>
		/// <param name="c">The <a href="https://docs.microsoft.com/windows/desktop/gdi/specifying-length-of-text-output-string">length of the string</a> pointed to by <i>lpString</i>.</param>
		/// <param name="psizl">A pointer to a <a href="https://docs.microsoft.com/windows/win32/api/windef/ns-windef-size">SIZE</a> structure that receives the dimensions of the string, in logical units.</param>
		/// <returns>
		/// <para>If the function succeeds, the return value is nonzero. If the function fails, the return value is zero.</para>
		/// </returns>
		/// <remarks>
		/// <para>The <b>GetTextExtentPoint32</b> function uses the currently selected font to compute the dimensions of the string. The width and height, in logical units, are computed without considering any clipping. Because some devices kern characters, the sum of the extents of the characters in a string may not be equal to the extent of the string. The calculated string width takes into account the intercharacter spacing set by the <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-settextcharacterextra">SetTextCharacterExtra</a> function and the justification set by <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-settextjustification">SetTextJustification</a>. This is true for both displaying on a screen and for printing. However, if <i>lpDx</i> is set in <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-exttextouta">ExtTextOut</a>, <b>GetTextExtentPoint32</b> does not take into account either intercharacter spacing or justification. In addition, for EMF, the print result always takes both intercharacter spacing and justification into account. When dealing with text displayed on a screen, the calculated string width takes into account the intercharacter spacing set by the <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-settextcharacterextra">SetTextCharacterExtra</a> function and the justification set by <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-settextjustification">SetTextJustification</a>. However, if <i>lpDx</i> is set in <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-exttextouta">ExtTextOut</a>, <b>GetTextExtentPoint32</b> does not take into account either intercharacter spacing or justification. However, when printing with EMF: </para>
		/// <para>This doc was truncated.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/wingdi/nf-wingdi-gettextextentpoint32w#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("GDI32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe winmdroot.Foundation.BOOL GetTextExtentPoint32W(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Foundation.PCWSTR lpString, int c, winmdroot.Foundation.SIZE* psizl);

		/// <inheritdoc cref="GetTextMetrics(winmdroot.Graphics.Gdi.HDC, winmdroot.Graphics.Gdi.TEXTMETRICW*)"/>
		[SupportedOSPlatform("windows5.0")]
		internal static unsafe winmdroot.Foundation.BOOL GetTextMetrics(winmdroot.Graphics.Gdi.HDC hdc, out winmdroot.Graphics.Gdi.TEXTMETRICW lptm)
		{
			fixed (winmdroot.Graphics.Gdi.TEXTMETRICW* lptmLocal = &lptm)
			{
				winmdroot.Foundation.BOOL __result = PInvoke.GetTextMetrics(hdc, lptmLocal);
				return __result;
			}
		}

		/// <summary>The GetTextMetricsW (Unicode) function (wingdi.h) fills the specified buffer with the metrics for the currently selected font.</summary>
		/// <param name="hdc">A handle to the device context.</param>
		/// <param name="lptm">A pointer to the <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/ns-wingdi-textmetrica">TEXTMETRIC</a> structure that receives the text metrics.</param>
		/// <returns>
		/// <para>If the function succeeds, the return value is nonzero. If the function fails, the return value is zero.</para>
		/// </returns>
		/// <remarks>To determine whether a font is a TrueType font, first select it into a DC, then call <b>GetTextMetrics</b>, and then check for TMPF_TRUETYPE in TEXTMETRIC.tmPitchAndFamily. Note that <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-getdc">GetDC</a> returns an uninitialized DC, which has "System" (a bitmap font) as the default font; thus the need to select a font into the DC.</remarks>
		[DllImport("GDI32.dll", ExactSpelling = true, EntryPoint = "GetTextMetricsW"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe winmdroot.Foundation.BOOL GetTextMetrics(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.Gdi.TEXTMETRICW* lptm);

		/// <inheritdoc cref="GetViewportExtEx(winmdroot.Graphics.Gdi.HDC, winmdroot.Foundation.SIZE*)"/>
		[SupportedOSPlatform("windows5.0")]
		internal static unsafe winmdroot.Foundation.BOOL GetViewportExtEx(winmdroot.Graphics.Gdi.HDC hdc, out winmdroot.Foundation.SIZE lpsize)
		{
			fixed (winmdroot.Foundation.SIZE* lpsizeLocal = &lpsize)
			{
				winmdroot.Foundation.BOOL __result = PInvoke.GetViewportExtEx(hdc, lpsizeLocal);
				return __result;
			}
		}

		/// <summary>The GetViewportExtEx function retrieves the x-extent and y-extent of the current viewport for the specified device context.</summary>
		/// <param name="hdc">A handle to the device context.</param>
		/// <param name="lpsize">A pointer to a <a href="https://docs.microsoft.com/windows/win32/api/windef/ns-windef-size">SIZE</a> structure that receives the x- and y-extents, in device units.</param>
		/// <returns>
		/// <para>If the function succeeds, the return value is nonzero. If the function fails, the return value is zero.</para>
		/// </returns>
		/// <remarks>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/wingdi/nf-wingdi-getviewportextex">Learn more about this API from docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("GDI32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe winmdroot.Foundation.BOOL GetViewportExtEx(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Foundation.SIZE* lpsize);

		/// <summary>The IntersectClipRect function creates a new clipping region from the intersection of the current clipping region and the specified rectangle.</summary>
		/// <param name="hdc">A handle to the device context.</param>
		/// <param name="left">The x-coordinate, in logical units, of the upper-left corner of the rectangle.</param>
		/// <param name="top">The y-coordinate, in logical units, of the upper-left corner of the rectangle.</param>
		/// <param name="right">The x-coordinate, in logical units, of the lower-right corner of the rectangle.</param>
		/// <param name="bottom">The y-coordinate, in logical units, of the lower-right corner of the rectangle.</param>
		/// <returns>
		/// <para>The return value specifies the new clipping region's type and can be one of the following values. </para>
		/// <para>This doc was truncated.</para>
		/// </returns>
		/// <remarks>
		/// <para>The lower and right-most edges of the given rectangle are excluded from the clipping region. If a clipping region does not already exist then the system may apply a default clipping region to the specified HDC. A clipping region is then created from the intersection of that default clipping region and the rectangle specified in the function parameters.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/wingdi/nf-wingdi-intersectcliprect#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("GDI32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern winmdroot.Graphics.Gdi.GDI_REGION_TYPE IntersectClipRect(winmdroot.Graphics.Gdi.HDC hdc, int left, int top, int right, int bottom);

		/// <summary>The LineTo function draws a line from the current position up to, but not including, the specified point.</summary>
		/// <param name="hdc">Handle to a device context.</param>
		/// <param name="x">Specifies the x-coordinate, in logical units, of the line's ending point.</param>
		/// <param name="y">Specifies the y-coordinate, in logical units, of the line's ending point.</param>
		/// <returns>
		/// <para>If the function succeeds, the return value is nonzero. If the function fails, the return value is zero.</para>
		/// </returns>
		/// <remarks>
		/// <para>The line is drawn by using the current pen and, if the pen is a geometric pen, the current brush. If <b>LineTo</b> succeeds, the current position is set to the specified ending point.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/wingdi/nf-wingdi-lineto#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("GDI32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern winmdroot.Foundation.BOOL LineTo(winmdroot.Graphics.Gdi.HDC hdc, int x, int y);

		/// <inheritdoc cref="LPtoDP(winmdroot.Graphics.Gdi.HDC, global::System.Drawing.Point*, int)"/>
		[SupportedOSPlatform("windows5.0")]
		internal static unsafe winmdroot.Foundation.BOOL LPtoDP(winmdroot.Graphics.Gdi.HDC hdc, ReadOnlySpan<global::System.Drawing.Point> lppt)
		{
			fixed (global::System.Drawing.Point* lpptLocal = lppt)
			{
				winmdroot.Foundation.BOOL __result = PInvoke.LPtoDP(hdc, lpptLocal, lppt.Length);
				return __result;
			}
		}

		/// <summary>The LPtoDP function converts logical coordinates into device coordinates. The conversion depends on the mapping mode of the device context, the settings of the origins and extents for the window and viewport, and the world transformation.</summary>
		/// <param name="hdc">A handle to the device context.</param>
		/// <param name="lppt">A pointer to an array of <a href="https://docs.microsoft.com/windows/win32/api/windef/ns-windef-point">POINT</a> structures. The x-coordinates and y-coordinates contained in each of the <b>POINT</b> structures will be transformed.</param>
		/// <param name="c">The number of points in the array.</param>
		/// <returns>
		/// <para>If the function succeeds, the return value is nonzero. If the function fails, the return value is zero.</para>
		/// </returns>
		/// <remarks>
		/// <para>The <b>LPtoDP</b> function fails if the logical coordinates exceed 32 bits, or if the converted device coordinates exceed 27 bits. In the case of such an overflow, the results for all the points are undefined. <b>LPtoDP</b> calculates complex floating-point arithmetic, and it has a caching system for efficiency. Therefore, the conversion result of an initial call to <b>LPtoDP</b> might not exactly match the conversion result of a later call to <b>LPtoDP</b>. We recommend not to write code that relies on the exact match of the conversion results from multiple calls to <b>LPtoDP</b> even if the parameters that are passed to each call are identical.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/wingdi/nf-wingdi-lptodp#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("GDI32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe winmdroot.Foundation.BOOL LPtoDP(winmdroot.Graphics.Gdi.HDC hdc, global::System.Drawing.Point* lppt, int c);

		/// <summary>The MoveToEx function updates the current position to the specified point and optionally returns the previous position.</summary>
		/// <param name="hdc">Handle to a device context.</param>
		/// <param name="x">Specifies the x-coordinate, in logical units, of the new position, in logical units.</param>
		/// <param name="y">Specifies the y-coordinate, in logical units, of the new position, in logical units.</param>
		/// <param name="lppt">Pointer to a <a href="https://docs.microsoft.com/windows/win32/api/windef/ns-windef-point">POINT</a> structure that receives the previous current position. If this parameter is a <b>NULL</b> pointer, the previous position is not returned.</param>
		/// <returns>
		/// <para>If the function succeeds, the return value is nonzero. If the function fails, the return value is zero.</para>
		/// </returns>
		/// <remarks>The <b>MoveToEx</b> function affects all drawing functions.</remarks>
		[DllImport("GDI32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe winmdroot.Foundation.BOOL MoveToEx(winmdroot.Graphics.Gdi.HDC hdc, int x, int y, [Optional] global::System.Drawing.Point* lppt);

		/// <summary>The PatBlt function paints the specified rectangle using the brush that is currently selected into the specified device context. The brush color and the surface color or colors are combined by using the specified raster operation.</summary>
		/// <param name="hdc">A handle to the device context.</param>
		/// <param name="x">The x-coordinate, in logical units, of the upper-left corner of the rectangle to be filled.</param>
		/// <param name="y">The y-coordinate, in logical units, of the upper-left corner of the rectangle to be filled.</param>
		/// <param name="w">The width, in logical units, of the rectangle.</param>
		/// <param name="h">The height, in logical units, of the rectangle.</param>
		/// <param name="rop"></param>
		/// <returns>
		/// <para>If the function succeeds, the return value is nonzero. If the function fails, the return value is zero.</para>
		/// </returns>
		/// <remarks>
		/// <para>The values of the <i>dwRop</i> parameter for this function are a limited subset of the full 256 ternary raster-operation codes; in particular, an operation code that refers to a source rectangle cannot be used. Not all devices support the <b>PatBlt</b> function. For more information, see the description of the RC_BITBLT capability in the <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-getdevicecaps">GetDeviceCaps</a> function.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/wingdi/nf-wingdi-patblt#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("GDI32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern winmdroot.Foundation.BOOL PatBlt(winmdroot.Graphics.Gdi.HDC hdc, int x, int y, int w, int h, winmdroot.Graphics.Gdi.ROP_CODE rop);

		/// <summary>The RoundRect function draws a rectangle with rounded corners. The rectangle is outlined by using the current pen and filled by using the current brush.</summary>
		/// <param name="hdc">A handle to the device context.</param>
		/// <param name="left">The x-coordinate, in logical coordinates, of the upper-left corner of the rectangle.</param>
		/// <param name="top">The y-coordinate, in logical coordinates, of the upper-left corner of the rectangle.</param>
		/// <param name="right">The x-coordinate, in logical coordinates, of the lower-right corner of the rectangle.</param>
		/// <param name="bottom">The y-coordinate, in logical coordinates, of the lower-right corner of the rectangle.</param>
		/// <param name="width">The width, in logical coordinates, of the ellipse used to draw the rounded corners.</param>
		/// <param name="height">The height, in logical coordinates, of the ellipse used to draw the rounded corners.</param>
		/// <returns>
		/// <para>If the function succeeds, the return value is nonzero. If the function fails, the return value is zero.</para>
		/// </returns>
		/// <remarks>The current position is neither used nor updated by this function.</remarks>
		[DllImport("GDI32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern winmdroot.Foundation.BOOL RoundRect(winmdroot.Graphics.Gdi.HDC hdc, int left, int top, int right, int bottom, int width, int height);

		/// <summary>Sets the horizontal and vertical extents of the viewport for a device context by using the specified values.</summary>
		/// <param name="hdc">A handle to the device context.</param>
		/// <param name="x">The horizontal extent, in device units, of the viewport.</param>
		/// <param name="y">The vertical extent, in device units, of the viewport.</param>
		/// <param name="lpsz">A pointer to a <a href="https://docs.microsoft.com/windows/win32/api/windef/ns-windef-size">SIZE</a> structure that receives the previous viewport extents, in device units. If <i>lpSize</i> is <b>NULL</b>, this parameter is not used.</param>
		/// <returns>
		/// <para>If the function succeeds, the return value is nonzero. If the function fails, the return value is zero.</para>
		/// </returns>
		/// <remarks>
		/// <para>The <i>viewport</i> refers to the device coordinate system of the device space. The <i>extent</i> is the maximum value of an axis. This function sets the maximum values for the horizontal and vertical axes of the viewport in device coordinates (or pixels). When mapping between page space and device space, <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-setwindowextex">SetWindowExtEx</a> and <b>SetViewportExtEx</b> determine the scaling factor between the window and the viewport. For more information, see <a href="https://docs.microsoft.com/windows/desktop/gdi/transformation-of-coordinate-spaces">Transformation of Coordinate Spaces</a>. When the following mapping modes are set, calls to the <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-setwindowextex">SetWindowExtEx</a> and <b>SetViewportExtEx</b> functions are ignored. </para>
		/// <para>This doc was truncated.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/wingdi/nf-wingdi-setviewportextex#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("GDI32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe winmdroot.Foundation.BOOL SetViewportExtEx(winmdroot.Graphics.Gdi.HDC hdc, int x, int y, [Optional] winmdroot.Foundation.SIZE* lpsz);

		/// <summary>The SetViewportOrgEx function specifies which device point maps to the window origin (0,0).</summary>
		/// <param name="hdc">A handle to the device context.</param>
		/// <param name="x">The x-coordinate, in device units, of the new viewport origin.</param>
		/// <param name="y">The y-coordinate, in device units, of the new viewport origin.</param>
		/// <param name="lppt">A pointer to a <a href="https://docs.microsoft.com/windows/win32/api/windef/ns-windef-point">POINT</a> structure that receives the previous viewport origin, in device coordinates. If <i>lpPoint</i> is <b>NULL</b>, this parameter is not used.</param>
		/// <returns>
		/// <para>If the function succeeds, the return value is nonzero. If the function fails, the return value is zero.</para>
		/// </returns>
		/// <remarks>
		/// <para>This function (along with <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-setviewportextex">SetViewportExtEx</a> and <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-setwindowextex">SetWindowExtEx</a>) helps define the mapping from the logical coordinate space (also known as a <i>window</i>) to the device coordinate space (the <i>viewport</i>). <b>SetViewportOrgEx</b> specifies which device point maps to the logical point (0,0). It has the effect of shifting the axes so that the logical point (0,0) no longer refers to the upper-left corner.</para>
		/// <para></para>
		/// <para>This doc was truncated.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/wingdi/nf-wingdi-setviewportorgex#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("GDI32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe winmdroot.Foundation.BOOL SetViewportOrgEx(winmdroot.Graphics.Gdi.HDC hdc, int x, int y, [Optional] global::System.Drawing.Point* lppt);

		/// <summary>The SetWindowExtEx function sets the horizontal and vertical extents of the window for a device context by using the specified values.</summary>
		/// <param name="hdc">A handle to the device context.</param>
		/// <param name="x">The window's horizontal extent in logical units.</param>
		/// <param name="y">The window's vertical extent in logical units.</param>
		/// <param name="lpsz">A pointer to a <a href="https://docs.microsoft.com/windows/win32/api/windef/ns-windef-size">SIZE</a> structure that receives the previous window extents, in logical units. If <i>lpSize</i> is <b>NULL</b>, this parameter is not used.</param>
		/// <returns>
		/// <para>If the function succeeds, the return value is nonzero. If the function fails, the return value is zero.</para>
		/// </returns>
		/// <remarks>
		/// <para>The <i>window</i> refers to the logical coordinate system of the page space. The <i>extent</i> is the maximum value of an axis. This function sets the maximum values for the horizontal and vertical axes of the window (in logical coordinates). When mapping between page space and device space, <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-setviewportextex">SetViewportExtEx</a> and <b>SetWindowExtEx</b> determine the scaling factor between the window and the viewport. For more information, see <a href="https://docs.microsoft.com/windows/desktop/gdi/transformation-of-coordinate-spaces">Transformation of Coordinate Spaces</a>. When the following mapping modes are set, calls to the <b>SetWindowExtEx</b> and <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-setviewportextex">SetViewportExtEx</a> functions are ignored: </para>
		/// <para>This doc was truncated.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/wingdi/nf-wingdi-setwindowextex#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("GDI32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe winmdroot.Foundation.BOOL SetWindowExtEx(winmdroot.Graphics.Gdi.HDC hdc, int x, int y, [Optional] winmdroot.Foundation.SIZE* lpsz);

		/// <summary>The SetWindowOrgEx function specifies which window point maps to the viewport origin (0,0).</summary>
		/// <param name="hdc">A handle to the device context.</param>
		/// <param name="x">The x-coordinate, in logical units, of the new window origin.</param>
		/// <param name="y">The y-coordinate, in logical units, of the new window origin.</param>
		/// <param name="lppt">A pointer to a <a href="https://docs.microsoft.com/windows/win32/api/windef/ns-windef-point">POINT</a> structure that receives the previous origin of the window, in logical units. If <i>lpPoint</i> is <b>NULL</b>, this parameter is not used.</param>
		/// <returns>
		/// <para>If the function succeeds, the return value is nonzero. If the function fails, the return value is zero.</para>
		/// </returns>
		/// <remarks>
		/// <para>This helps define the mapping from the logical coordinate space (also known as a <i>window</i>) to the device coordinate space (the <i>viewport</i>). <b>SetWindowOrgEx</b> specifies which logical point maps to the device point (0,0). It has the effect of shifting the axes so that the logical point (0,0) no longer refers to the upper-left corner.</para>
		/// <para></para>
		/// <para>This doc was truncated.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/wingdi/nf-wingdi-setwindoworgex#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("GDI32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe winmdroot.Foundation.BOOL SetWindowOrgEx(winmdroot.Graphics.Gdi.HDC hdc, int x, int y, [Optional] global::System.Drawing.Point* lppt);

		/// <summary>The StretchDIBits function copies the color data for a rectangle of pixels in a DIB, JPEG, or PNG image to the specified destination rectangle.</summary>
		/// <param name="hdc">A handle to the destination device context.</param>
		/// <param name="xDest">The x-coordinate, in logical units, of the upper-left corner of the destination rectangle.</param>
		/// <param name="yDest">The y-coordinate, in logical units, of the upper-left corner of the destination rectangle.</param>
		/// <param name="DestWidth">The width, in logical units, of the destination rectangle.</param>
		/// <param name="DestHeight">The height, in logical units, of the destination rectangle.</param>
		/// <param name="xSrc">The x-coordinate, in pixels, of the source rectangle in the image.</param>
		/// <param name="ySrc">The y-coordinate, in pixels, of the source rectangle in the image.</param>
		/// <param name="SrcWidth">The width, in pixels, of the source rectangle in the image.</param>
		/// <param name="SrcHeight">The height, in pixels, of the source rectangle in the image.</param>
		/// <param name="lpBits">A pointer to the image bits, which are stored as an array of bytes. For more information, see the Remarks section.</param>
		/// <param name="lpbmi">A pointer to a <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/ns-wingdi-bitmapinfo">BITMAPINFO</a> structure that contains information about the DIB.</param>
		/// <param name="iUsage"></param>
		/// <param name="rop">A raster-operation code that specifies how the source pixels, the destination device context's current brush, and the destination pixels are to be combined to form the new image. For a list of some common raster operation codes, see <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-bitblt">BitBlt</a>.</param>
		/// <returns>
		/// <para>If the function succeeds, the return value is the number of scan lines copied. Note that this value can be negative for mirrored content. If the function fails, or no scan lines are copied, the return value is 0. If the driver cannot support the JPEG or PNG file image passed to <b>StretchDIBits</b>, the function will fail and return GDI_ERROR. If failure does occur, the application must fall back on its own JPEG or PNG support to decompress the image into a bitmap, and then pass the bitmap to <b>StretchDIBits</b>.</para>
		/// </returns>
		/// <remarks>
		/// <para>The origin of a bottom-up DIB is the lower-left corner; the origin of a top-down DIB is the upper-left corner. <b>StretchDIBits</b> creates a mirror image of a bitmap if the signs of the <i>nSrcWidth</i> and <i>nDestWidth</i> parameters, or if the <i>nSrcHeight</i> and <i>nDestHeight</i> parameters differ. If <i>nSrcWidth</i> and <i>nDestWidth</i> have different signs, the function creates a mirror image of the bitmap along the x-axis. If <i>nSrcHeight</i> and <i>nDestHeight</i> have different signs, the function creates a mirror image of the bitmap along the y-axis. <b>StretchDIBits</b> creates a top-down image if the sign of the <b>biHeight</b> member of the <a href="https://docs.microsoft.com/windows/win32/api/wingdi/ns-wingdi-bitmapinfoheader">BITMAPINFOHEADER</a> structure for the DIB is negative. For a code example, see <a href="https://docs.microsoft.com/windows/desktop/gdi/sizing-a-jpeg-or-png-image">Sizing a JPEG or PNG Image</a>. This function allows a JPEG or PNG image to be passed as the source image. How each parameter is used remains the same, except: </para>
		/// <para>This doc was truncated.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/wingdi/nf-wingdi-stretchdibits#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("GDI32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe int StretchDIBits(winmdroot.Graphics.Gdi.HDC hdc, int xDest, int yDest, int DestWidth, int DestHeight, int xSrc, int ySrc, int SrcWidth, int SrcHeight, [Optional] void* lpBits, winmdroot.Graphics.Gdi.BITMAPINFO* lpbmi, winmdroot.Graphics.Gdi.DIB_USAGE iUsage, winmdroot.Graphics.Gdi.ROP_CODE rop);
	}
}