mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-28 12:54:45 +00:00
29 lines
734 B
C++
29 lines
734 B
C++
// Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
|
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
|
|
|
#pragma once
|
|
|
|
namespace slint {
|
|
|
|
/// The Point structure is used to represent a two-dimensional point
|
|
/// with x and y coordinates.
|
|
template<typename T>
|
|
struct Point
|
|
{
|
|
/// The x coordinate of the point
|
|
T x;
|
|
/// The y coordinate of the point
|
|
T y;
|
|
|
|
/// Compares with \a other and returns true if they are equal; false otherwise.
|
|
bool operator==(const Point &other) const = default;
|
|
};
|
|
|
|
namespace cbindgen_private {
|
|
// The Size types are expanded to the Point2D<...> type from the euclid crate which
|
|
// is binary compatible with Point<T>
|
|
template<typename T>
|
|
using Point2D = Point<T>;
|
|
}
|
|
|
|
}
|