author | Anton Epple <toni.epple@eppleton.de> |
Thu, 26 Sep 2013 14:20:18 -0700 | |
branch | canvas |
changeset 1302 | e67363288df1 |
parent 1154 | 2bdd1eba1880 |
child 1303 | 3d62ad46d744 |
permissions | -rw-r--r-- |
toni@1302 | 1 |
/** |
toni@1302 | 2 |
* Back 2 Browser Bytecode Translator Copyright (C) 2012 Jaroslav Tulach |
toni@1302 | 3 |
* <jaroslav.tulach@apidesign.org> |
toni@1302 | 4 |
* |
toni@1302 | 5 |
* This program is free software: you can redistribute it and/or modify it under |
toni@1302 | 6 |
* the terms of the GNU General Public License as published by the Free Software |
toni@1302 | 7 |
* Foundation, version 2 of the License. |
toni@1302 | 8 |
* |
toni@1302 | 9 |
* This program is distributed in the hope that it will be useful, but WITHOUT |
toni@1302 | 10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
toni@1302 | 11 |
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
toni@1302 | 12 |
* details. |
toni@1302 | 13 |
* |
toni@1302 | 14 |
* You should have received a copy of the GNU General Public License along with |
toni@1302 | 15 |
* this program. Look for COPYING file in the top folder. If not, see |
toni@1302 | 16 |
* http://opensource.org/licenses/GPL-2.0. |
toni@1302 | 17 |
*/ |
toni@1137 | 18 |
/* |
toni@1137 | 19 |
* To change this template, choose Tools | Templates |
toni@1137 | 20 |
* and open the template in the editor. |
toni@1137 | 21 |
*/ |
toni@1137 | 22 |
package net.java.html.canvas; |
toni@1137 | 23 |
|
toni@1137 | 24 |
/** |
toni@1302 | 25 |
* Just a simple class to replace the need of java.awt.Dimension, since we only |
toni@1154 | 26 |
* want to use Java core APIs to keep porting simple. |
toni@1302 | 27 |
* |
toni@1137 | 28 |
* @author antonepple |
toni@1137 | 29 |
*/ |
toni@1302 | 30 |
public final class Dimension { |
toni@1302 | 31 |
|
toni@1302 | 32 |
final double width, height; |
toni@1137 | 33 |
|
toni@1137 | 34 |
public Dimension(double width, double height) { |
toni@1137 | 35 |
this.width = width; |
toni@1137 | 36 |
this.height = height; |
toni@1137 | 37 |
} |
toni@1137 | 38 |
|
toni@1302 | 39 |
/** |
toni@1302 | 40 |
* Returns the height of this Dimension in double precision |
toni@1302 | 41 |
* |
toni@1302 | 42 |
* @return the width of this Dimension. |
toni@1302 | 43 |
*/ |
toni@1137 | 44 |
public double getWidth() { |
toni@1137 | 45 |
return width; |
toni@1137 | 46 |
} |
toni@1137 | 47 |
|
toni@1302 | 48 |
/** |
toni@1302 | 49 |
* Returns the width of this Dimension in double precision. |
toni@1302 | 50 |
* |
toni@1302 | 51 |
* @return the height of this Dimension. |
toni@1302 | 52 |
*/ |
toni@1137 | 53 |
public double getHeight() { |
toni@1137 | 54 |
return height; |
toni@1137 | 55 |
} |
toni@1137 | 56 |
} |