1 Star 0 Fork 0

橙子/screenshot

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
screenshot_linux.go 775 Bytes
一键复制 编辑 原始数据 按行查看 历史
橙子 提交于 2020-08-13 17:29 . .
package screenshot
import (
"image"
"github.com/xuchengzhi/screenshot/internal/xwindow"
)
// Capture returns screen capture of specified desktop region.
// x and y represent distance from the upper-left corner of main display.
// Y-axis is downward direction. This means coordinates system is similar to Windows OS.
func Capture(x, y, width, height int) (*image.RGBA, error) {
return xwindow.Capture(x, y, width, height)
}
// NumActiveDisplays returns the number of active displays.
func NumActiveDisplays() int {
return xwindow.NumActiveDisplays()
}
// GetDisplayBounds returns the bounds of displayIndex'th display.
// The main display is displayIndex = 0.
func GetDisplayBounds(displayIndex int) image.Rectangle {
return xwindow.GetDisplayBounds(displayIndex)
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xuchengzhi/screenshot.git
[email protected]:xuchengzhi/screenshot.git
xuchengzhi
screenshot
screenshot
master

搜索帮助