javaquery/canvas/src/main/java/net/java/html/canvas/Dimension.java
author Anton Epple <toni.epple@eppleton.de>
Thu, 26 Sep 2013 14:26:58 -0700
branchcanvas
changeset 1303 3d62ad46d744
parent 1302 e67363288df1
child 1445 493cae4fd458
permissions -rw-r--r--
license fixes
toni@1302
     1
/**
toni@1303
     2
 * Back 2 Browser Bytecode Translator
toni@1303
     3
 * Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
toni@1302
     4
 *
toni@1303
     5
 * This program is free software: you can redistribute it and/or modify
toni@1303
     6
 * it under the terms of the GNU General Public License as published by
toni@1303
     7
 * the Free Software Foundation, version 2 of the License.
toni@1302
     8
 *
toni@1303
     9
 * This program is distributed in the hope that it will be useful,
toni@1303
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
toni@1303
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
toni@1303
    12
 * GNU General Public License for more details.
toni@1302
    13
 *
toni@1303
    14
 * You should have received a copy of the GNU General Public License
toni@1303
    15
 * along with this program. Look for COPYING file in the top folder.
toni@1303
    16
 * If not, see 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
}