CreatePen function Null safety gdi32

int CreatePen(
  1. int iStyle,
  2. int cWidth,
  3. int color

The CreatePen function creates a logical pen that has the specified style, width, and color. The pen can subsequently be selected into a device context and used to draw lines and curves.

HPEN CreatePen(
  int      iStyle,
  int      cWidth,
  COLORREF color


int CreatePen(int iStyle, int cWidth, int color) {
  final _CreatePen = _gdi32.lookupFunction<
      IntPtr Function(Uint32 iStyle, Int32 cWidth, Uint32 color),
      int Function(int iStyle, int cWidth, int color)>('CreatePen');
  return _CreatePen(iStyle, cWidth, color);