2020-01-18 09:38:21 +01:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 09:38:21 +01:00
|
|
|
*/
|
|
|
|
|
|
2019-01-10 05:41:49 +01:00
|
|
|
#include "CharacterBitmap.h"
|
|
|
|
|
|
2020-02-06 11:56:38 +01:00
|
|
|
namespace Gfx {
|
|
|
|
|
|
2019-01-16 17:54:06 +01:00
|
|
|
CharacterBitmap::CharacterBitmap(const char* ascii_data, unsigned width, unsigned height)
|
|
|
|
|
: m_bits(ascii_data)
|
2019-01-10 05:41:49 +01:00
|
|
|
, m_size(width, height)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CharacterBitmap::~CharacterBitmap()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2019-06-21 18:37:47 +02:00
|
|
|
NonnullRefPtr<CharacterBitmap> CharacterBitmap::create_from_ascii(const char* asciiData, unsigned width, unsigned height)
|
2019-01-10 05:41:49 +01:00
|
|
|
{
|
2021-04-23 16:46:57 +02:00
|
|
|
return adopt_ref(*new CharacterBitmap(asciiData, width, height));
|
2019-01-10 05:41:49 +01:00
|
|
|
}
|
2020-02-06 11:56:38 +01:00
|
|
|
|
|
|
|
|
}
|