Mercurial > hgrepos > Python2 > PyMuPDF
comparison mupdf-source/thirdparty/zxing-cpp/core/src/ResultPoint.h @ 3:2c135c81b16c
MERGE: upstream PyMuPDF 1.26.4 with MuPDF 1.26.7
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 15 Sep 2025 11:44:09 +0200 |
| parents | b50eed0cc0ef |
| children |
comparison
equal
deleted
inserted
replaced
| 0:6015a75abc2d | 3:2c135c81b16c |
|---|---|
| 1 /* | |
| 2 * Copyright 2016 Nu-book Inc. | |
| 3 * Copyright 2016 ZXing authors | |
| 4 */ | |
| 5 // SPDX-License-Identifier: Apache-2.0 | |
| 6 | |
| 7 #pragma once | |
| 8 | |
| 9 #include "Point.h" | |
| 10 | |
| 11 namespace ZXing { | |
| 12 | |
| 13 /** | |
| 14 * <p>Encapsulates a point of interest in an image containing a barcode. Typically, this | |
| 15 * would be the location of a finder pattern or the corner of the barcode, for example.</p> | |
| 16 * | |
| 17 * @author Sean Owen | |
| 18 */ | |
| 19 class ResultPoint : public PointF | |
| 20 { | |
| 21 public: | |
| 22 ResultPoint() = default; | |
| 23 ResultPoint(float x, float y) : PointF(x, y) {} | |
| 24 ResultPoint(int x, int y) : PointF(x, y) {} | |
| 25 template <typename T> ResultPoint(PointT<T> p) : PointF(p) {} | |
| 26 | |
| 27 float x() const { return static_cast<float>(PointF::x); } | |
| 28 float y() const { return static_cast<float>(PointF::y); } | |
| 29 | |
| 30 void set(float x, float y) { *this = PointF(x, y); } | |
| 31 | |
| 32 static float Distance(int aX, int aY, int bX, int bY); | |
| 33 }; | |
| 34 | |
| 35 } // ZXing |
