From fed4668fb18ba76f7d239f5a7f1a171a032dec42 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 18 Jun 2024 14:20:56 +0200 Subject: [PATCH] LibGfx: Remove unused CharacterBitmap class --- Userland/Libraries/LibGfx/CharacterBitmap.h | 40 --------------------- Userland/Libraries/LibGfx/Forward.h | 1 - Userland/Libraries/LibGfx/Painter.cpp | 1 - 3 files changed, 42 deletions(-) delete mode 100644 Userland/Libraries/LibGfx/CharacterBitmap.h diff --git a/Userland/Libraries/LibGfx/CharacterBitmap.h b/Userland/Libraries/LibGfx/CharacterBitmap.h deleted file mode 100644 index 94c4da2a58..0000000000 --- a/Userland/Libraries/LibGfx/CharacterBitmap.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2018-2020, Andreas Kling - * Copyright (c) 2022, the SerenityOS developers. - * - * SPDX-License-Identifier: BSD-2-Clause - */ - -#pragma once - -#include "Size.h" -#include -#include -#include - -namespace Gfx { - -class CharacterBitmap { -public: - CharacterBitmap() = delete; - constexpr CharacterBitmap(StringView ascii_data, unsigned width, unsigned height) - : m_bits(ascii_data) - , m_size(width, height) - { - } - - constexpr ~CharacterBitmap() = default; - - constexpr bool bit_at(unsigned x, unsigned y) const { return m_bits[y * width() + x] == '#'; } - constexpr StringView bits() const { return m_bits; } - - constexpr IntSize size() const { return m_size; } - constexpr unsigned width() const { return m_size.width(); } - constexpr unsigned height() const { return m_size.height(); } - -private: - StringView m_bits {}; - IntSize m_size {}; -}; - -} diff --git a/Userland/Libraries/LibGfx/Forward.h b/Userland/Libraries/LibGfx/Forward.h index fe2e448a81..b9d26392a7 100644 --- a/Userland/Libraries/LibGfx/Forward.h +++ b/Userland/Libraries/LibGfx/Forward.h @@ -11,7 +11,6 @@ namespace Gfx { class Bitmap; class CMYKBitmap; class ImmutableBitmap; -class CharacterBitmap; class Color; template diff --git a/Userland/Libraries/LibGfx/Painter.cpp b/Userland/Libraries/LibGfx/Painter.cpp index 3477fd479e..5b79dcab6a 100644 --- a/Userland/Libraries/LibGfx/Painter.cpp +++ b/Userland/Libraries/LibGfx/Painter.cpp @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include