public class ScreenUtil extends Object
Constructor and Description |
---|
ScreenUtil() |
Modifier and Type | Method and Description |
---|---|
static BufferedImage |
captureScreen()
截取全屏
|
static File |
captureScreen(File outFile)
截取全屏到文件
|
static BufferedImage |
captureScreen(Rectangle screenRect)
截屏
|
static File |
captureScreen(Rectangle screenRect,
File outFile)
截屏
|
static int |
getHeight()
获取屏幕高度
|
static Rectangle |
getRectangle()
获取屏幕的矩形
|
static int |
getWidth()
获取屏幕宽度
|
public static Dimension dimension
public static int getWidth()
public static int getHeight()
public static Rectangle getRectangle()
public static BufferedImage captureScreen()
RobotUtil.captureScreen()
public static File captureScreen(File outFile)
outFile
- 写出到的文件RobotUtil.captureScreen(File)
public static BufferedImage captureScreen(Rectangle screenRect)
screenRect
- 截屏的矩形区域RobotUtil.captureScreen(Rectangle)
public static File captureScreen(Rectangle screenRect, File outFile)
screenRect
- 截屏的矩形区域outFile
- 写出到的文件RobotUtil.captureScreen(Rectangle, File)
Copyright © 2024. All rights reserved.