View Javadoc

1   package org.molwind.model;
2   
3   /*
4    * This file is part of Molwind.
5    *
6    * Molwind is free software: you can redistribute it and/or modify
7    * it under the terms of the GNU General Public License as published by
8    * the Free Software Foundation, either version 3 of the License, or
9    * (at your option) any later version.
10   *
11   * Molwind is distributed in the hope that it will be useful,
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14   * GNU General Public License for more details.
15   *
16   * You should have received a copy of the GNU General Public License
17   * along with Molwind. If not, see <http://www.gnu.org/licenses/>.
18   */
19  
20  import java.io.IOException;
21  import java.io.OutputStream;
22  
23  /**
24   * Tile interface represents information used for tile rendering.
25   *
26   * @author <a href="mailto:oliver.karch@molwind.org">Oliver Karch</a>
27   * @version 1.0
28   */
29  public interface Tile {
30  
31      /**
32       * Get the layered coordinates of this tile.
33       *
34       * @return
35       *      the layered position of this tile
36       */
37      LayeredPosition getPosition();
38  
39      /**
40       * Writes tile image data to the given output stream.
41       *
42       * @param output
43       *      the output stream to write to
44       * @throws java.io.IOException
45       *      is thrown upon i/o error
46       */
47      void writeTo(OutputStream output)
48      throws IOException;
49  
50  }