mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:07:36 +00:00
LibGfx: Mark AffineTransform<T>::map()
as only working for numeric T
The implementations for these methods is manually defined in the .cpp file for `int` and `float`, meaning that other `T` values would fail - but only once we got to the linking stage. This patch makes the error happen much earlier, so it's more obvious.
This commit is contained in:
parent
732aa2c5c7
commit
e5a25171fe
1 changed files with 4 additions and 3 deletions
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <AK/Concepts.h>
|
||||||
#include <AK/Format.h>
|
#include <AK/Format.h>
|
||||||
#include <AK/Forward.h>
|
#include <AK/Forward.h>
|
||||||
#include <LibGfx/Forward.h>
|
#include <LibGfx/Forward.h>
|
||||||
|
@ -29,13 +30,13 @@ public:
|
||||||
|
|
||||||
void map(float unmapped_x, float unmapped_y, float& mapped_x, float& mapped_y) const;
|
void map(float unmapped_x, float unmapped_y, float& mapped_x, float& mapped_y) const;
|
||||||
|
|
||||||
template<typename T>
|
template<Arithmetic T>
|
||||||
Point<T> map(Point<T> const&) const;
|
Point<T> map(Point<T> const&) const;
|
||||||
|
|
||||||
template<typename T>
|
template<Arithmetic T>
|
||||||
Size<T> map(Size<T> const&) const;
|
Size<T> map(Size<T> const&) const;
|
||||||
|
|
||||||
template<typename T>
|
template<Arithmetic T>
|
||||||
Rect<T> map(Rect<T> const&) const;
|
Rect<T> map(Rect<T> const&) const;
|
||||||
|
|
||||||
Quad<float> map_to_quad(Rect<float> const&) const;
|
Quad<float> map_to_quad(Rect<float> const&) const;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue