Merge pull request #432 from go-vgo/bitmap-pr

Update Dockerfile and circle
This commit is contained in:
Evans 2022-01-06 20:52:26 -04:00 committed by GitHub
commit bf3f823fd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 15 deletions

View File

@ -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)

View File

@ -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 && \

View File

@ -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)

View File

@ -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)