toni@1302: /** toni@1303: * Back 2 Browser Bytecode Translator toni@1303: * Copyright (C) 2012 Jaroslav Tulach toni@1302: * toni@1303: * This program is free software: you can redistribute it and/or modify toni@1303: * it under the terms of the GNU General Public License as published by toni@1303: * the Free Software Foundation, version 2 of the License. toni@1302: * toni@1303: * This program is distributed in the hope that it will be useful, toni@1303: * but WITHOUT ANY WARRANTY; without even the implied warranty of toni@1303: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the toni@1303: * GNU General Public License for more details. toni@1302: * toni@1303: * You should have received a copy of the GNU General Public License toni@1303: * along with this program. Look for COPYING file in the top folder. toni@1303: * If not, see 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: }