1 /*
2  * Copyright (C) 2014 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.camera.ui;
18 
19 /**
20  * Touch coordinate.
21  */
22 public class TouchCoordinate {
23     private float x;
24     private float y;
25     private float maxX;
26     private float maxY;
27 
28     /**
29      * Constructor.
30      * @param x X value for the touch, with 0 typically the lowest value.
31      * @param y Y value for the touch, with 0 typically the lowest value.
32      * @param maxX Highest X value possible for any touch.
33      * @param maxY Highest Y value possible for any touch.
34      */
TouchCoordinate(float x, float y, float maxX, float maxY)35     public TouchCoordinate(float x, float y, float maxX, float maxY) {
36         this.x = x;
37         this.y = y;
38         this.maxX = maxX;
39         this.maxY = maxY;
40     }
41 
getX()42     public float getX() {
43         return this.x;
44     }
45 
getY()46     public float getY() {
47         return this.y;
48     }
49 
getMaxX()50     public float getMaxX() {
51         return this.maxX;
52     }
53 
getMaxY()54     public float getMaxY() {
55         return this.maxY;
56     }
57 }
58