Show / Hide Table of Contents

Class Gdi

Inheritance
System.Object
Gdi
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: CADability
Assembly: CADability.dll
Syntax
public class Gdi

Fields

| Improve this Doc View Source

PFD_DOUBLEBUFFER

The buffer is double-buffered. This flag and PFD_SUPPORT_GDI are mutually exclusive in the current generic implementation.

Declaration
public const int PFD_DOUBLEBUFFER = 1
Field Value
Type Description
System.Int32
| Improve this Doc View Source

PFD_DRAW_TO_BITMAP

The buffer can draw to a memory bitmap.

Declaration
public const int PFD_DRAW_TO_BITMAP = 8
Field Value
Type Description
System.Int32
| Improve this Doc View Source

PFD_DRAW_TO_WINDOW

The buffer can draw to a window or device surface.

Declaration
public const int PFD_DRAW_TO_WINDOW = 4
Field Value
Type Description
System.Int32
| Improve this Doc View Source

PFD_GENERIC_ACCELERATED

The pixel format is supported by a device driver that accelerates the generic implementation. If this flag is clear and the PFD_GENERIC_FORMAT flag is set, the pixel format is supported by the generic implementation only.

Declaration
public const int PFD_GENERIC_ACCELERATED = 4096
Field Value
Type Description
System.Int32
| Improve this Doc View Source

PFD_GENERIC_FORMAT

The pixel format is supported by the GDI software implementation, which is also known as the generic implementation. If this bit is clear, the pixel format is supported by a device driver or hardware.

Declaration
public const int PFD_GENERIC_FORMAT = 64
Field Value
Type Description
System.Int32
| Improve this Doc View Source

PFD_MAIN_PLANE

The layer is the main plane.

Declaration
public const int PFD_MAIN_PLANE = 0
Field Value
Type Description
System.Int32
| Improve this Doc View Source

PFD_NEED_PALETTE

The buffer uses RGBA pixels on a palette-managed device. A logical palette is required to achieve the best results for this pixel type. Colors in the palette should be specified according to the values of the cRedBits, cRedShift, cGreenBits, cGreenShift, cBluebits, and cBlueShift members. The palette should be created and realized in the device context before calling wglMakeCurrent(IntPtr, IntPtr).

Declaration
public const int PFD_NEED_PALETTE = 128
Field Value
Type Description
System.Int32
| Improve this Doc View Source

PFD_NEED_SYSTEM_PALETTE

Defined in the pixel format descriptors of hardware that supports one hardware palette in 256-color mode only. For such systems to use hardware acceleration, the hardware palette must be in a fixed order (for example, 3-3-2) when in RGBA mode or must match the logical palette when in color-index mode.

When this flag is set, you must call in your program to force a one-to-one mapping of the logical palette and the system palette. If your OpenGL hardware supports multiple hardware palettes and the device driver can allocate spare hardware palettes for OpenGL, this flag is typically clear.

This flag is not set in the generic pixel formats.

Declaration
public const int PFD_NEED_SYSTEM_PALETTE = 256
Field Value
Type Description
System.Int32
| Improve this Doc View Source

PFD_STEREO

The buffer is stereoscopic. This flag is not supported in the current generic implementation.

Declaration
public const int PFD_STEREO = 2
Field Value
Type Description
System.Int32
| Improve this Doc View Source

PFD_SUPPORT_DIRECTDRAW

The buffer supports DirectDraw drawing.

Declaration
public const int PFD_SUPPORT_DIRECTDRAW = 8192
Field Value
Type Description
System.Int32
| Improve this Doc View Source

PFD_SUPPORT_GDI

The buffer supports GDI drawing. This flag and PFD_DOUBLEBUFFER are mutually exclusive in the current generic implementation.

Declaration
public const int PFD_SUPPORT_GDI = 16
Field Value
Type Description
System.Int32
| Improve this Doc View Source

PFD_SUPPORT_OPENGL

The buffer supports OpenGL drawing.

Declaration
public const int PFD_SUPPORT_OPENGL = 32
Field Value
Type Description
System.Int32
| Improve this Doc View Source

PFD_SWAP_COPY

Specifies the content of the back buffer in the double-buffered main color plane following a buffer swap. Swapping the color buffers causes the content of the back buffer to be copied to the front buffer. The content of the back buffer is not affected by the swap. PFD_SWAP_COPY is a hint only and might not be provided by a driver.

Declaration
public const int PFD_SWAP_COPY = 1024
Field Value
Type Description
System.Int32
| Improve this Doc View Source

PFD_SWAP_EXCHANGE

Specifies the content of the back buffer in the double-buffered main color plane following a buffer swap. Swapping the color buffers causes the exchange of the back buffer's content with the front buffer's content. Following the swap, the back buffer's content contains the front buffer's content before the swap. PFD_SWAP_EXCHANGE is a hint only and might not be provided by a driver.

Declaration
public const int PFD_SWAP_EXCHANGE = 512
Field Value
Type Description
System.Int32
| Improve this Doc View Source

PFD_SWAP_LAYER_BUFFERS

Indicates whether a device can swap individual layer planes with pixel formats that include double-buffered overlay or underlay planes. Otherwise all layer planes are swapped together as a group. When this flag is set, is supported.

Declaration
public const int PFD_SWAP_LAYER_BUFFERS = 2048
Field Value
Type Description
System.Int32
| Improve this Doc View Source

PFD_TYPE_COLORINDEX

Color-index pixels. Each pixel uses a color-index value.

Declaration
public const int PFD_TYPE_COLORINDEX = 1
Field Value
Type Description
System.Int32
| Improve this Doc View Source

PFD_TYPE_RGBA

RGBA pixels. Each pixel has four components in this order: red, green, blue, and alpha.

Declaration
public const int PFD_TYPE_RGBA = 0
Field Value
Type Description
System.Int32

Methods

_SetPixelFormat(IntPtr, Int32, ref Gdi.PIXELFORMATDESCRIPTOR)

Declaration
[CLSCompliant(false)]
public static bool _SetPixelFormat(IntPtr deviceContext, int pixelFormat, ref Gdi.PIXELFORMATDESCRIPTOR pixelFormatDescriptor)
Parameters
Type Name Description
System.IntPtr deviceContext
System.Int32 pixelFormat
Gdi.PIXELFORMATDESCRIPTOR pixelFormatDescriptor
Returns
Type Description
System.Boolean

ChoosePixelFormat(IntPtr, ref Gdi.PIXELFORMATDESCRIPTOR)

Declaration
public static int ChoosePixelFormat(IntPtr deviceContext, ref Gdi.PIXELFORMATDESCRIPTOR pixelFormatDescriptor)
Parameters
Type Name Description
System.IntPtr deviceContext
Gdi.PIXELFORMATDESCRIPTOR pixelFormatDescriptor
Returns
Type Description
System.Int32

CreateCompatibleDC(IntPtr)

Declaration
public static IntPtr CreateCompatibleDC(IntPtr hdc)
Parameters
Type Name Description
System.IntPtr hdc
Returns
Type Description
System.IntPtr

CreateFont(Int32, Int32, Int32, Int32, Int32, Boolean, Boolean, Boolean, Int32, Int32, Int32, Int32, Int32, String)

Declaration
public static IntPtr CreateFont(int height, int width, int escapement, int orientation, int weight, bool italic, bool underline, bool strikeOut, int charSet, int outputPrecision, int clipPrecision, int quality, int pitchAndFamily, string typeFace)
Parameters
Type Name Description
System.Int32 height
System.Int32 width
System.Int32 escapement
System.Int32 orientation
System.Int32 weight
System.Boolean italic
System.Boolean underline
System.Boolean strikeOut
System.Int32 charSet
System.Int32 outputPrecision
System.Int32 clipPrecision
System.Int32 quality
System.Int32 pitchAndFamily
System.String typeFace
Returns
Type Description
System.IntPtr

DeleteDC(IntPtr)

Declaration
public static bool DeleteDC(IntPtr hdc)
Parameters
Type Name Description
System.IntPtr hdc
Returns
Type Description
System.Boolean

DeleteObject(IntPtr)

Declaration
public static bool DeleteObject(IntPtr objectHandle)
Parameters
Type Name Description
System.IntPtr objectHandle
Returns
Type Description
System.Boolean

DescribePixelFormat(IntPtr, Int32, UInt32, IntPtr)

Declaration
public static int DescribePixelFormat(IntPtr hdc, int iPixelFormat, uint nBytes, IntPtr pfd)
Parameters
Type Name Description
System.IntPtr hdc
System.Int32 iPixelFormat
System.UInt32 nBytes
System.IntPtr pfd
Returns
Type Description
System.Int32

GetCharABCWidths(IntPtr, UInt32, UInt32, Gdi.ABC[])

Declaration
public static bool GetCharABCWidths(IntPtr hdc, uint uFirstChar, uint uLastChar, Gdi.ABC[] lpabc)
Parameters
Type Name Description
System.IntPtr hdc
System.UInt32 uFirstChar
System.UInt32 uLastChar
Gdi.ABC[] lpabc
Returns
Type Description
System.Boolean

GetCharWidth32(IntPtr, UInt32, UInt32, Int32[])

Declaration
public static bool GetCharWidth32(IntPtr hdc, uint uFirstChar, uint uLastChar, int[] lpwidth)
Parameters
Type Name Description
System.IntPtr hdc
System.UInt32 uFirstChar
System.UInt32 uLastChar
System.Int32[] lpwidth
Returns
Type Description
System.Boolean

GetKerningPairs(IntPtr, Int32, Gdi.KERNINGPAIR[])

Declaration
public static int GetKerningPairs(IntPtr hDC, int cPairs, Gdi.KERNINGPAIR[] lpkrnpair)
Parameters
Type Name Description
System.IntPtr hDC
System.Int32 cPairs
Gdi.KERNINGPAIR[] lpkrnpair
Returns
Type Description
System.Int32

GetPixelFormat(IntPtr)

Declaration
public static int GetPixelFormat(IntPtr deviceContext)
Parameters
Type Name Description
System.IntPtr deviceContext
Returns
Type Description
System.Int32

SelectObject(IntPtr, IntPtr)

Declaration
public static IntPtr SelectObject(IntPtr deviceContext, IntPtr objectHandle)
Parameters
Type Name Description
System.IntPtr deviceContext
System.IntPtr objectHandle
Returns
Type Description
System.IntPtr
| Improve this Doc View Source

SetPixelFormat(IntPtr, Int32, ref Gdi.PIXELFORMATDESCRIPTOR)

Declaration
public static bool SetPixelFormat(IntPtr deviceContext, int pixelFormat, ref Gdi.PIXELFORMATDESCRIPTOR pixelFormatDescriptor)
Parameters
Type Name Description
System.IntPtr deviceContext
System.Int32 pixelFormat
Gdi.PIXELFORMATDESCRIPTOR pixelFormatDescriptor
Returns
Type Description
System.Boolean

SwapBuffersFast(IntPtr)

Declaration
public static int SwapBuffersFast(IntPtr deviceContext)
Parameters
Type Name Description
System.IntPtr deviceContext
Returns
Type Description
System.Int32
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX