1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:27:43 +00:00

LibDraw: Put all classes in the Gfx namespace

I started adding things to a Draw namespace, but it somehow felt really
wrong seeing Draw::Rect and Draw::Bitmap, etc. So instead, let's rename
the library to LibGfx. :^)
This commit is contained in:
Andreas Kling 2020-02-06 11:56:38 +01:00
parent 939a605334
commit 11580babbf
269 changed files with 1513 additions and 1315 deletions

View file

@ -31,9 +31,11 @@
#include <LibDraw/GIFLoader.h>
#include <stdio.h>
static RefPtr<GraphicsBitmap> load_gif_impl(const u8*, size_t);
namespace Gfx {
RefPtr<GraphicsBitmap> load_gif(const StringView& path)
static RefPtr<Gfx::Bitmap> load_gif_impl(const u8*, size_t);
RefPtr<Gfx::Bitmap> load_gif(const StringView& path)
{
MappedFile mapped_file(path);
if (!mapped_file.is_valid())
@ -44,7 +46,7 @@ RefPtr<GraphicsBitmap> load_gif(const StringView& path)
return bitmap;
}
RefPtr<GraphicsBitmap> load_gif_from_memory(const u8* data, size_t length)
RefPtr<Gfx::Bitmap> load_gif_from_memory(const u8* data, size_t length)
{
auto bitmap = load_gif_impl(data, length);
if (bitmap)
@ -80,7 +82,7 @@ struct ImageDescriptor {
Vector<u8> lzw_encoded_bytes;
};
RefPtr<GraphicsBitmap> load_gif_impl(const u8* data, size_t data_size)
RefPtr<Gfx::Bitmap> load_gif_impl(const u8* data, size_t data_size)
{
if (data_size < 32)
return nullptr;
@ -259,3 +261,5 @@ RefPtr<GraphicsBitmap> load_gif_impl(const u8* data, size_t data_size)
return nullptr;
}
}