1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-19 07:35:07 +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

@ -84,7 +84,7 @@ void Menu::realize_if_needed()
realize_menu();
}
void Menu::popup(const Point& screen_position)
void Menu::popup(const Gfx::Point& screen_position)
{
realize_if_needed();
WindowServerConnection::the().post_message(WindowServer::PopupMenu(m_menu_id, screen_position));
@ -123,12 +123,12 @@ int Menu::realize_menu()
auto& action = *item.action();
int icon_buffer_id = -1;
if (action.icon()) {
ASSERT(action.icon()->format() == GraphicsBitmap::Format::RGBA32);
ASSERT(action.icon()->format() == Gfx::Bitmap::Format::RGBA32);
ASSERT(action.icon()->size() == Size(16, 16));
if (action.icon()->shared_buffer_id() == -1) {
auto shared_buffer = SharedBuffer::create_with_size(action.icon()->size_in_bytes());
ASSERT(shared_buffer);
auto shared_icon = GraphicsBitmap::create_with_shared_buffer(GraphicsBitmap::Format::RGBA32, *shared_buffer, action.icon()->size());
auto shared_icon = Gfx::Bitmap::create_with_shared_buffer(Gfx::Bitmap::Format::RGBA32, *shared_buffer, action.icon()->size());
memcpy(shared_buffer->data(), action.icon()->bits(0), action.icon()->size_in_bytes());
shared_buffer->seal();
shared_buffer->share_with(WindowServerConnection::the().server_pid());