summaryrefslogtreecommitdiff
path: root/Libraries/LibGfx/Size.h
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibGfx/Size.h')
-rw-r--r--Libraries/LibGfx/Size.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/Libraries/LibGfx/Size.h b/Libraries/LibGfx/Size.h
index f91887900d..7b0cbe96fc 100644
--- a/Libraries/LibGfx/Size.h
+++ b/Libraries/LibGfx/Size.h
@@ -26,7 +26,7 @@
#pragma once
-#include <AK/Forward.h>
+#include <AK/Format.h>
#include <LibGfx/Orientation.h>
#include <LibIPC/Forward.h>
@@ -159,6 +159,18 @@ using FloatSize = Size<float>;
}
+namespace AK {
+
+template<typename T>
+struct Formatter<Gfx::Size<T>> : Formatter<StringView> {
+ void format(FormatBuilder& builder, const Gfx::Size<T>& value)
+ {
+ Formatter<StringView>::format(builder, value.to_string());
+ }
+};
+
+}
+
namespace IPC {
bool encode(Encoder&, const Gfx::IntSize&);