GDI32Util (JNA API)

com.sun.jna.platform.win32

## Class GDI32Util

- java.lang.Object
- - com.sun.jna.platform.win32.GDI32Util

-     public class GDI32Util
      extends java.lang.Object

  GDI32 utility API.
  Author:
    mlfreeman[at]gmail.com

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `GDI32Util()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.awt.image.BufferedImage` | `getScreenshot(WinDef.HWND target)` Takes a screenshot of the given window

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### GDI32Util

          public GDI32Util()

  - ### Method Detail

    - #### getScreenshot

          public static java.awt.image.BufferedImage getScreenshot(WinDef.HWND target)

      Takes a screenshot of the given window
      Parameters:
        `target` - The window to target
      Returns:
        the window captured as a screenshot, or null if the BufferedImage doesn't construct properly
      Throws:
        `java.lang.IllegalStateException` - if the rectangle from GetWindowRect has a width and/or height of 0.
        if the device context acquired from the original HWND doesn't release properly

Copyright © 2007-2018 Timothy Wall. All Rights Reserved.