toni@1302: /** toni@1302: * Back 2 Browser Bytecode Translator Copyright (C) 2012 Jaroslav Tulach toni@1302: * toni@1302: * toni@1302: * This program is free software: you can redistribute it and/or modify it under toni@1302: * the terms of the GNU General Public License as published by the Free Software toni@1302: * Foundation, version 2 of the License. toni@1302: * toni@1302: * This program is distributed in the hope that it will be useful, but WITHOUT toni@1302: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS toni@1302: * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more toni@1302: * details. toni@1302: * toni@1302: * You should have received a copy of the GNU General Public License along with toni@1302: * this program. Look for COPYING file in the top folder. If not, see toni@1302: * http://opensource.org/licenses/GPL-2.0. toni@1302: */ toni@1137: /* toni@1137: * To change this template, choose Tools | Templates toni@1137: * and open the template in the editor. toni@1137: */ toni@1137: package net.java.html.canvas; toni@1137: toni@1137: /** toni@1302: * Just a simple class to replace the need of java.awt.Dimension, since we only toni@1154: * want to use Java core APIs to keep porting simple. toni@1302: * toni@1137: * @author antonepple toni@1137: */ toni@1302: public final class Dimension { toni@1302: toni@1302: final double width, height; toni@1137: toni@1137: public Dimension(double width, double height) { toni@1137: this.width = width; toni@1137: this.height = height; toni@1137: } toni@1137: toni@1302: /** toni@1302: * Returns the height of this Dimension in double precision toni@1302: * toni@1302: * @return the width of this Dimension. toni@1302: */ toni@1137: public double getWidth() { toni@1137: return width; toni@1137: } toni@1137: toni@1302: /** toni@1302: * Returns the width of this Dimension in double precision. toni@1302: * toni@1302: * @return the height of this Dimension. toni@1302: */ toni@1137: public double getHeight() { toni@1137: return height; toni@1137: } toni@1137: }