Files
vncproxy/common/rectangle.go
amit bezalel 66c322c164 added a vnc server and the required client messages parsers.
now I should get to tying up the proxying connections and checking what should be written to the file. (server init?)
2017-06-21 00:42:06 +03:00

35 lines
763 B
Go

package common
import (
"fmt"
)
// Rectangle represents a rectangle of pixel data.
type Rectangle struct {
X uint16
Y uint16
Width uint16
Height uint16
Enc Encoding
}
func (r *Rectangle) String() string {
return fmt.Sprintf("(%d,%d) (width: %d, height: %d), Enc= %d", r.X, r.Y, r.Width, r.Height, r.Enc.Type())
}
// PixelFormat describes the way a pixel is formatted for a VNC connection.
//
// See RFC 6143 Section 7.4 for information on each of the fields.
// type PixelFormat struct {
// BPP uint8
// Depth uint8
// BigEndian bool
// TrueColor bool
// RedMax uint16
// GreenMax uint16
// BlueMax uint16
// RedShift uint8
// GreenShift uint8
// BlueShift uint8
// }