123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- package bx
- type BxArea interface {
- Build() []byte
- Length() int16
- }
- type bxArea struct {
- BxArea
- typ byte
- x int16
- y int16
- w int16
- h int16
- }
- func NewBxArea(typ byte, x int16, y int16, w int16, h int16) bxArea {
- return bxArea{
- typ: typ,
- x: x,
- y: y,
- w: w,
- h: h,
- }
- }
- func (a *bxArea) GetX() int16 {
- return a.x
- }
- func (a *bxArea) SetX(x int16) {
- a.x = x
- }
- func (a *bxArea) GetY() int16 {
- return a.y
- }
- func (a *bxArea) SetY(y int16) {
- a.y = y
- }
- func (a *bxArea) GetW() int16 {
- return a.w
- }
- func (a *bxArea) SetW(w int16) {
- a.w = w
- }
- func (a *bxArea) GetH() int16 {
- return a.h
- }
- func (a *bxArea) SetH(h int16) {
- a.h = h
- }
|