mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 14:22:43 +00:00 
			
		
		
		
	 b91c49364d
			
		
	
	
		b91c49364d
		
	
	
	
	
		
			
			This makes it more symmetrical with adopt_own() (which is used to create a NonnullOwnPtr from the result of a naked new.)
		
			
				
	
	
		
			26 lines
		
	
	
	
		
			552 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
	
		
			552 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #include "CharacterBitmap.h"
 | |
| 
 | |
| namespace Gfx {
 | |
| 
 | |
| CharacterBitmap::CharacterBitmap(const char* ascii_data, unsigned width, unsigned height)
 | |
|     : m_bits(ascii_data)
 | |
|     , m_size(width, height)
 | |
| {
 | |
| }
 | |
| 
 | |
| CharacterBitmap::~CharacterBitmap()
 | |
| {
 | |
| }
 | |
| 
 | |
| NonnullRefPtr<CharacterBitmap> CharacterBitmap::create_from_ascii(const char* asciiData, unsigned width, unsigned height)
 | |
| {
 | |
|     return adopt_ref(*new CharacterBitmap(asciiData, width, height));
 | |
| }
 | |
| 
 | |
| }
 |