Mercurial > hgrepos > Python2 > PyMuPDF
comparison mupdf-source/thirdparty/zxing-cpp/core/src/ResultPoint.h @ 2:b50eed0cc0ef upstream
ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4.
The directory name has changed: no version number in the expanded directory now.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 15 Sep 2025 11:43:07 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 1:1d09e1dec1d9 | 2:b50eed0cc0ef |
|---|---|
| 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 |
