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