toni@1119
|
1 |
/**
|
toni@1445
|
2 |
* Back 2 Browser Bytecode Translator Copyright (C) 2012 Jaroslav Tulach
|
toni@1445
|
3 |
* <jaroslav.tulach@apidesign.org>
|
toni@1119
|
4 |
*
|
toni@1445
|
5 |
* This program is free software: you can redistribute it and/or modify it under
|
toni@1445
|
6 |
* the terms of the GNU General Public License as published by the Free Software
|
toni@1445
|
7 |
* Foundation, version 2 of the License.
|
toni@1119
|
8 |
*
|
toni@1445
|
9 |
* This program is distributed in the hope that it will be useful, but WITHOUT
|
toni@1445
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
toni@1445
|
11 |
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
toni@1445
|
12 |
* details.
|
toni@1119
|
13 |
*
|
toni@1445
|
14 |
* You should have received a copy of the GNU General Public License along with
|
toni@1445
|
15 |
* this program. Look for COPYING file in the top folder. If not, see
|
toni@1445
|
16 |
* http://opensource.org/licenses/GPL-2.0.
|
toni@1111
|
17 |
*/
|
toni@1111
|
18 |
package net.java.html.canvas;
|
toni@1111
|
19 |
|
toni@1111
|
20 |
/**
|
toni@1155
|
21 |
* ImageData is an updateable 2-Dimensional Map of Color values. Created (
|
toni@1155
|
22 |
* createPixelMap / getSnapShot ) by GraphicsContext. you can modify the
|
toni@1155
|
23 |
* individual pixels and render it using paintPixelMap on GraphicsContext
|
toni@1155
|
24 |
*
|
toni@1111
|
25 |
* @author antonepple
|
toni@1111
|
26 |
*/
|
toni@1136
|
27 |
public interface ImageData {
|
toni@1111
|
28 |
|
toni@1445
|
29 |
/**
|
toni@1445
|
30 |
* get the height.
|
toni@1445
|
31 |
*
|
toni@1445
|
32 |
* @return the height
|
toni@1445
|
33 |
*/
|
toni@1111
|
34 |
public double getHeight();
|
toni@1111
|
35 |
|
toni@1445
|
36 |
/**
|
toni@1445
|
37 |
* get the width
|
toni@1445
|
38 |
*
|
toni@1445
|
39 |
* @return the width
|
toni@1445
|
40 |
*/
|
toni@1111
|
41 |
public double getWidth();
|
toni@1155
|
42 |
|
toni@1445
|
43 |
/**
|
toni@1445
|
44 |
* get the red value at a specified coordinate
|
toni@1445
|
45 |
*
|
toni@1445
|
46 |
* @param x
|
toni@1445
|
47 |
* @param y
|
toni@1445
|
48 |
* @return the red value as an int (0 -255)
|
toni@1445
|
49 |
*/
|
toni@1308
|
50 |
public int getR(int x, int y);
|
toni@1155
|
51 |
|
toni@1445
|
52 |
/**
|
toni@1445
|
53 |
* get the green value at a specified coordinate
|
toni@1445
|
54 |
*
|
toni@1445
|
55 |
* @param x
|
toni@1445
|
56 |
* @param y
|
toni@1445
|
57 |
* @return the green value as an int (0 -255)
|
toni@1445
|
58 |
*/
|
toni@1308
|
59 |
public int getG(int x, int y);
|
toni@1155
|
60 |
|
toni@1445
|
61 |
/**
|
toni@1445
|
62 |
* get the blue value at a specified coordinate
|
toni@1445
|
63 |
*
|
toni@1445
|
64 |
* @param x
|
toni@1445
|
65 |
* @param y
|
toni@1445
|
66 |
* @return the blue value as an int (0 -255)
|
toni@1445
|
67 |
*/
|
toni@1308
|
68 |
public int getB(int x, int y);
|
toni@1155
|
69 |
|
toni@1445
|
70 |
/**
|
toni@1445
|
71 |
* get the alpha (transparency) value at a specified coordinate
|
toni@1445
|
72 |
*
|
toni@1445
|
73 |
* @param x
|
toni@1445
|
74 |
* @param y
|
toni@1445
|
75 |
* @return the alpha value as an int (0 - 255)
|
toni@1445
|
76 |
*/
|
toni@1308
|
77 |
public int getA(int x, int y);
|
toni@1155
|
78 |
|
toni@1445
|
79 |
/**
|
toni@1445
|
80 |
* set the red value at a specified coordinate
|
toni@1445
|
81 |
*
|
toni@1445
|
82 |
* @param x
|
toni@1445
|
83 |
* @param y
|
toni@1445
|
84 |
* @param value the red value as an int (0 - 255)
|
toni@1445
|
85 |
*/
|
toni@1308
|
86 |
public void setR(int x, int y, int value);
|
toni@1155
|
87 |
|
toni@1445
|
88 |
/**
|
toni@1445
|
89 |
* set the green value at a specified coordinate
|
toni@1445
|
90 |
*
|
toni@1445
|
91 |
* @param x
|
toni@1445
|
92 |
* @param y
|
toni@1445
|
93 |
* @param value the green value as an int (0 - 255)
|
toni@1445
|
94 |
*/
|
toni@1308
|
95 |
public void setG(int x, int y, int value);
|
toni@1155
|
96 |
|
toni@1445
|
97 |
/**
|
toni@1445
|
98 |
* set the blue value at a specified coordinate
|
toni@1445
|
99 |
*
|
toni@1445
|
100 |
* @param x
|
toni@1445
|
101 |
* @param y
|
toni@1445
|
102 |
* @param value the blue value as an int (0 - 255)
|
toni@1445
|
103 |
*/
|
toni@1308
|
104 |
public void setB(int x, int y, int value);
|
toni@1155
|
105 |
|
toni@1445
|
106 |
/**
|
toni@1445
|
107 |
* set the alpha (transparency) value at a specified coordinate
|
toni@1445
|
108 |
*
|
toni@1445
|
109 |
* @param x
|
toni@1445
|
110 |
* @param y
|
toni@1445
|
111 |
* @param value the alpha value as an int (0 - 255)
|
toni@1445
|
112 |
*/
|
toni@1440
|
113 |
public void setA(int x, int y, int value);
|
toni@1111
|
114 |
}
|