mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-01 14:43:55 +00:00
Merge pull request #432 from go-vgo/bitmap-pr
Update Dockerfile and circle
This commit is contained in:
commit
bf3f823fd7
@ -16,17 +16,14 @@ jobs:
|
||||
libx11-dev xorg-dev libxtst-dev
|
||||
xsel xclip
|
||||
# libpng++-dev
|
||||
# xcb libxcb-xkb-dev x11-xkb-utils libx11-xcb-dev libxkbcommon-x11-dev
|
||||
# libxkbcommon-dev
|
||||
# xcb libxcb-xkb-dev x11-xkb-utils libx11-xcb-dev libxkbcommon-x11-dev libxkbcommon-dev
|
||||
- run: apt -y install xvfb
|
||||
#
|
||||
# override:
|
||||
# './...' is a relative pattern which means all subdirectories
|
||||
# - run: go get -u github.com/go-vgo/robotgo
|
||||
# - run: go get -u golang.org/x/sys/unix
|
||||
# - run: go get -u github.com/shirou/gopsutil
|
||||
- run: go get -v -t -d ./...
|
||||
- run: xvfb-run go test -v ./...
|
||||
#
|
||||
# codecov.io
|
||||
# - run: xvfb-run go test -v -covermode=count -coverprofile=coverage.out
|
||||
# - run: bash <(curl -s https://codecov.io/bash)
|
||||
|
@ -5,18 +5,15 @@ FROM golang:1.17.5-stretch AS build
|
||||
RUN apt update && apt install -y --no-install-recommends \
|
||||
# customize dependencies
|
||||
libx11-dev xorg-dev \
|
||||
# libgtkglextmm-x11-dev
|
||||
# libghc6-x11-dev
|
||||
# libgl1-mesa-swx11-dev
|
||||
# xorg-dev
|
||||
libxtst-dev libpng++-dev \
|
||||
libxtst-dev \
|
||||
# Bitmap
|
||||
libpng++-dev \
|
||||
# Event:
|
||||
xcb libxcb-xkb-dev \
|
||||
x11-xkb-utils libx11-xcb-dev \
|
||||
libxkbcommon-x11-dev libxkbcommon-dev \
|
||||
# Clipboard:
|
||||
xsel xclip && \
|
||||
# RUN apt install -y xclip
|
||||
#
|
||||
apt remove --purge --auto-remove && \
|
||||
apt clean && \
|
||||
|
@ -23,8 +23,8 @@ func bitmap() {
|
||||
gbit := robotgo.ToBitmap(abitMap)
|
||||
fmt.Println("bitmap...", gbit.Width)
|
||||
|
||||
gbitMap := robotgo.GoCaptureScreen()
|
||||
fmt.Println("GoCaptureScreen...", gbitMap.Width)
|
||||
gbitMap := robotgo.CaptureGo()
|
||||
fmt.Println("Go CaptureScreen...", gbitMap.Width)
|
||||
// fmt.Println("...", gbitmap.Width, gbitmap.BytesPerPixel)
|
||||
|
||||
// robotgo.SaveCapture("saveCapture.png", 10, 20, 100, 100)
|
||||
|
@ -326,8 +326,8 @@ func CaptureScreen(args ...int) CBitmap {
|
||||
return CBitmap(bit)
|
||||
}
|
||||
|
||||
// GoCaptureScreen capture the screen and return bitmap(go struct)
|
||||
func GoCaptureScreen(args ...int) Bitmap {
|
||||
// CaptureGo capture the screen and return bitmap(go struct)
|
||||
func CaptureGo(args ...int) Bitmap {
|
||||
bit := CaptureScreen(args...)
|
||||
defer FreeBitmap(bit)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user