1 Star 0 Fork 0

Cloudy/vnc2video

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
encoding_pointer_pos.go 964 Bytes
一键复制 编辑 原始数据 按行查看 历史
amit b 提交于 2019-06-16 04:11 . fixed go modules
package vnc2video
import (
"image"
"image/draw"
"github.com/amitbet/vnc2video/logger"
)
type CursorPosPseudoEncoding struct {
prevPosBackup draw.Image
prevPositionRect image.Rectangle
cursorImage draw.Image
Image draw.Image
}
func (*CursorPosPseudoEncoding) Supported(Conn) bool {
return true
}
func (enc *CursorPosPseudoEncoding) SetTargetImage(img draw.Image) {
enc.Image = img
}
func (enc *CursorPosPseudoEncoding) Reset() error {
return nil
}
func (*CursorPosPseudoEncoding) Type() EncodingType { return EncPointerPosPseudo }
func (enc *CursorPosPseudoEncoding) Read(c Conn, rect *Rectangle) error {
logger.Tracef("CursorPosPseudoEncoding: got cursot pos update: %v", rect)
canvas := enc.Image.(*VncCanvas)
canvas.CursorLocation = &image.Point{X: int(rect.X), Y: int(rect.Y)}
return nil
}
func (enc *CursorPosPseudoEncoding) Write(c Conn, rect *Rectangle) error {
return nil
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/itcloudy/vnc2video.git
git@gitee.com:itcloudy/vnc2video.git
itcloudy
vnc2video
vnc2video
master

搜索帮助