2020-02-14 23:58:14 +00:00
|
|
|
/*
|
2023-07-15 10:33:22 +00:00
|
|
|
* Copyright (c) 2020, Shannon Booth <shannon@serenityos.org>
|
2024-10-04 11:19:50 +00:00
|
|
|
* Copyright (c) 2022, Andreas Kling <andreas@ladybird.org>
|
2020-02-14 23:58:14 +00:00
|
|
|
*
|
2021-04-22 08:24:48 +00:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-02-14 23:58:14 +00:00
|
|
|
*/
|
|
|
|
|
2023-12-16 14:19:34 +00:00
|
|
|
#include <AK/ByteString.h>
|
2020-02-14 23:58:14 +00:00
|
|
|
#include <LibGfx/Triangle.h>
|
|
|
|
|
|
|
|
namespace Gfx {
|
|
|
|
|
2022-04-07 11:59:16 +00:00
|
|
|
template<>
|
2023-12-16 14:19:34 +00:00
|
|
|
ByteString Triangle<int>::to_byte_string() const
|
2022-04-07 11:59:16 +00:00
|
|
|
{
|
2023-12-16 14:19:34 +00:00
|
|
|
return ByteString::formatted("({},{},{})", m_a, m_b, m_c);
|
2022-04-07 11:59:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
template<>
|
2023-12-16 14:19:34 +00:00
|
|
|
ByteString Triangle<float>::to_byte_string() const
|
2020-02-14 23:58:14 +00:00
|
|
|
{
|
2023-12-16 14:19:34 +00:00
|
|
|
return ByteString::formatted("({},{},{})", m_a, m_b, m_c);
|
2020-02-14 23:58:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|