Added version variable to build script and index.html. Mouse over on bowl now reveals...
[guacamole.git] / src / net / sourceforge / guacamole / instruction / framebuffer / DrawRectInstruction.java
1
2 package net.sourceforge.guacamole.instruction.framebuffer;
3
4 /*
5  *  Guacamole - Pure JavaScript/HTML VNC Client
6  *  Copyright (C) 2010  Michael Jumper
7  *
8  *  This program is free software: you can redistribute it and/or modify
9  *  it under the terms of the GNU Affero General Public License as published by
10  *  the Free Software Foundation, either version 3 of the License, or
11  *  (at your option) any later version.
12  *
13  *  This program is distributed in the hope that it will be useful,
14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  *  GNU Affero General Public License for more details.
17  *
18  *  You should have received a copy of the GNU Affero General Public License
19  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
20  */
21
22 import net.sourceforge.guacamole.instruction.Instruction;
23
24 public class DrawRectInstruction extends Instruction {
25
26     private final int x;
27     private final int y;
28     private final int width;
29     private final int height;
30     private final int color;
31
32     public DrawRectInstruction(int x, int y, int width, int height, int color) {
33         this.x = x;
34         this.y = y;
35         this.width = width;
36         this.height = height;
37         this.color = color;
38     }
39
40     public int getX() {
41         return x;
42     }
43
44     public int getY() {
45         return y;
46     }
47
48     public int getWidth() {
49         return width;
50     }
51
52     public int getHeight() {
53         return height;
54     }
55
56     public int getColor() {
57         return color;
58     }
59
60     @Override
61     public String toString() {
62
63         return "rect:"
64                 + getX() + ","
65                 + getY() + ","
66                 + getWidth() + ","
67                 + getHeight() + ","
68                 + String.format("#%06X", getColor()) + ";";
69
70     }
71
72 }