More JavaDoc improvements.
1.1 --- a/javaquery/canvas/src/main/java/net/java/html/canvas/Dimension.java Wed Feb 12 08:33:31 2014 +0100
1.2 +++ b/javaquery/canvas/src/main/java/net/java/html/canvas/Dimension.java Wed Feb 12 08:43:07 2014 +0100
1.3 @@ -23,7 +23,8 @@
1.4
1.5 /**
1.6 * Just a simple class to replace the need of java.awt.Dimension, since we only
1.7 - * want to use Java core APIs to keep porting simple.
1.8 + * want to use Java core APIs to keep porting simple. You shouldn't need to
1.9 + * ever create one, unless you write an implementation of your own Graphicsenvironment.
1.10 *
1.11 * @author antonepple
1.12 */
1.13 @@ -31,6 +32,11 @@
1.14
1.15 final double width, height;
1.16
1.17 + /**
1.18 + * Constructor
1.19 + * @param width
1.20 + * @param height
1.21 + */
1.22 public Dimension(double width, double height) {
1.23 this.width = width;
1.24 this.height = height;
2.1 --- a/javaquery/canvas/src/main/java/net/java/html/canvas/Image.java Wed Feb 12 08:33:31 2014 +0100
2.2 +++ b/javaquery/canvas/src/main/java/net/java/html/canvas/Image.java Wed Feb 12 08:43:07 2014 +0100
2.3 @@ -61,6 +61,11 @@
2.4 return src;
2.5 }
2.6
2.7 + /**
2.8 + * get the width of this Image. Might be an expensive operation, depending on the
2.9 + * GraphicsEnvironment, it might need to be rendered.
2.10 + * @return the width of this Image.
2.11 + */
2.12 public int getWidth() {
2.13 ServiceLoader<GraphicsEnvironment> loader = ServiceLoader.load(GraphicsEnvironment.class);
2.14 GraphicsEnvironment ge = null;
2.15 @@ -71,7 +76,11 @@
2.16 return ge.getWidth(this, cached);
2.17 }
2.18
2.19 -
2.20 + /**
2.21 + * get the height of this Image. Might be an expensive operation, depending on the
2.22 + * GraphicsEnvironment, it might need to be rendered.
2.23 + * @return the height of this Image.
2.24 + */
2.25 public int getHeight() {
2.26 ServiceLoader<GraphicsEnvironment> loader = ServiceLoader.load(GraphicsEnvironment.class);
2.27 GraphicsEnvironment ge = null;
3.1 --- a/javaquery/canvas/src/main/java/net/java/html/canvas/ImageData.java Wed Feb 12 08:33:31 2014 +0100
3.2 +++ b/javaquery/canvas/src/main/java/net/java/html/canvas/ImageData.java Wed Feb 12 08:43:07 2014 +0100
3.3 @@ -1,19 +1,19 @@
3.4 /**
3.5 - * Back 2 Browser Bytecode Translator
3.6 - * Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
3.7 + * Back 2 Browser Bytecode Translator Copyright (C) 2012 Jaroslav Tulach
3.8 + * <jaroslav.tulach@apidesign.org>
3.9 *
3.10 - * This program is free software: you can redistribute it and/or modify
3.11 - * it under the terms of the GNU General Public License as published by
3.12 - * the Free Software Foundation, version 2 of the License.
3.13 + * This program is free software: you can redistribute it and/or modify it under
3.14 + * the terms of the GNU General Public License as published by the Free Software
3.15 + * Foundation, version 2 of the License.
3.16 *
3.17 - * This program is distributed in the hope that it will be useful,
3.18 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
3.19 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3.20 - * GNU General Public License for more details.
3.21 + * This program is distributed in the hope that it will be useful, but WITHOUT
3.22 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
3.23 + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
3.24 + * details.
3.25 *
3.26 - * You should have received a copy of the GNU General Public License
3.27 - * along with this program. Look for COPYING file in the top folder.
3.28 - * If not, see http://opensource.org/licenses/GPL-2.0.
3.29 + * You should have received a copy of the GNU General Public License along with
3.30 + * this program. Look for COPYING file in the top folder. If not, see
3.31 + * http://opensource.org/licenses/GPL-2.0.
3.32 */
3.33 package net.java.html.canvas;
3.34
3.35 @@ -26,23 +26,89 @@
3.36 */
3.37 public interface ImageData {
3.38
3.39 + /**
3.40 + * get the height.
3.41 + *
3.42 + * @return the height
3.43 + */
3.44 public double getHeight();
3.45
3.46 + /**
3.47 + * get the width
3.48 + *
3.49 + * @return the width
3.50 + */
3.51 public double getWidth();
3.52
3.53 + /**
3.54 + * get the red value at a specified coordinate
3.55 + *
3.56 + * @param x
3.57 + * @param y
3.58 + * @return the red value as an int (0 -255)
3.59 + */
3.60 public int getR(int x, int y);
3.61
3.62 + /**
3.63 + * get the green value at a specified coordinate
3.64 + *
3.65 + * @param x
3.66 + * @param y
3.67 + * @return the green value as an int (0 -255)
3.68 + */
3.69 public int getG(int x, int y);
3.70
3.71 + /**
3.72 + * get the blue value at a specified coordinate
3.73 + *
3.74 + * @param x
3.75 + * @param y
3.76 + * @return the blue value as an int (0 -255)
3.77 + */
3.78 public int getB(int x, int y);
3.79
3.80 + /**
3.81 + * get the alpha (transparency) value at a specified coordinate
3.82 + *
3.83 + * @param x
3.84 + * @param y
3.85 + * @return the alpha value as an int (0 - 255)
3.86 + */
3.87 public int getA(int x, int y);
3.88
3.89 + /**
3.90 + * set the red value at a specified coordinate
3.91 + *
3.92 + * @param x
3.93 + * @param y
3.94 + * @param value the red value as an int (0 - 255)
3.95 + */
3.96 public void setR(int x, int y, int value);
3.97
3.98 + /**
3.99 + * set the green value at a specified coordinate
3.100 + *
3.101 + * @param x
3.102 + * @param y
3.103 + * @param value the green value as an int (0 - 255)
3.104 + */
3.105 public void setG(int x, int y, int value);
3.106
3.107 + /**
3.108 + * set the blue value at a specified coordinate
3.109 + *
3.110 + * @param x
3.111 + * @param y
3.112 + * @param value the blue value as an int (0 - 255)
3.113 + */
3.114 public void setB(int x, int y, int value);
3.115
3.116 + /**
3.117 + * set the alpha (transparency) value at a specified coordinate
3.118 + *
3.119 + * @param x
3.120 + * @param y
3.121 + * @param value the alpha value as an int (0 - 255)
3.122 + */
3.123 public void setA(int x, int y, int value);
3.124 }