Drawing methods implemented
parent
f3f5e80160
commit
ee65505e8f
|
@ -269,6 +269,28 @@ func (c *Cli) DisplaySetRes(d *DEVMODE) error {
|
|||
return err
|
||||
}
|
||||
|
||||
/***************** Draw Functions *****************/
|
||||
|
||||
func (c *Cli) DrawCLear() error {
|
||||
err := c.HttpCli().JsonGet("/ipc/draw/clear", nil)
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *Cli) DrawBox(x, y, w, h, t int) error {
|
||||
err := c.HttpCli().JsonGet(fmt.Sprintf("/ipc/draw/addbox?x=%d&y=%d&w=%d&h=%d&t=%d", x, y, w, h, t), nil)
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *Cli) DrawRect(x, y, w, h int) error {
|
||||
err := c.HttpCli().JsonGet(fmt.Sprintf("/ipc/draw/addrect?x=%d&y=%d&w=%d&h=%d", x, y, w, h), nil)
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *Cli) DrawAddText(t string, x, y, w, h int) error {
|
||||
err := c.HttpCli().JsonGet(fmt.Sprintf("/ipc/draw/addtext?t=%s&x=%d&y=%d&w=%d&h=%d", t, x, y, w, h), nil)
|
||||
return err
|
||||
}
|
||||
|
||||
func NewCli() *Cli {
|
||||
ret := &Cli{ApiCli: api.NewApiCli()}
|
||||
return ret
|
||||
|
|
Loading…
Reference in New Issue