Table of Contents

Class WinGDI

Namespace
Npp.DotNet.Plugin.Winforms
Assembly
Npp.DotNet.Plugin.dll
public static class WinGDI
Inheritance
WinGDI
Inherited Members

Methods

GetDeviceCaps(IntPtr, DeviceCapability)

public static extern int GetDeviceCaps(IntPtr hWnd, WinGDI.DeviceCapability index)

Parameters

hWnd IntPtr
index WinGDI.DeviceCapability

Returns

int

GetLogicalPixels(int, int, long, IntPtr)

Retrieves the number of logical pixels in the window or screen area bound by pixelsX and pixelsY physical pixels, based on deviceDPI.

public static (int, int) GetLogicalPixels(int pixelsX, int pixelsY, long deviceDPI = 96, IntPtr hWnd = default)

Parameters

pixelsX int

Number of physical pixels in the x-axis of the window or screen area being measured.

pixelsY int

Number of physical pixels in the y-axis of the window or screen area being measured.

deviceDPI long

The DPI of the window or screen area being measured.

hWnd IntPtr

Handle to the window or, if NULL, the screen whose area is being measured.

Returns

(int, int)