]> git.basschouten.com Git - openhab-addons.git/blob
b07e0e466f26f03e14d0948d560e483de253bb91
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
7  * This program and the accompanying materials are made available under the
8  * terms of the Eclipse Public License 2.0 which is available at
9  * http://www.eclipse.org/legal/epl-2.0
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13
14 package org.openhab.binding.nanoleaf.internal.layout;
15
16 import org.eclipse.jdt.annotation.NonNullByDefault;
17
18 /**
19  * Coordinate in the 2D space of the image.
20  *
21  * @author Jørgen Austvik - Initial contribution
22  */
23 @NonNullByDefault
24 public class ImagePoint2D {
25     private final int x;
26     private final int y;
27
28     public ImagePoint2D(int x, int y) {
29         this.x = x;
30         this.y = y;
31     }
32
33     public int getX() {
34         return x;
35     }
36
37     public int getY() {
38         return y;
39     }
40
41     @Override
42     public String toString() {
43         return String.format("image coordinate x:%d, y:%d", x, y);
44     }
45 }