Screenshot.h 461 B

12345678910111213141516171819
  1. /*
  2. * Copyright (c) 2022, Tim Flynn <trflynn89@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/Function.h>
  8. #include <LibGfx/Forward.h>
  9. #include <LibWeb/Forward.h>
  10. #include <LibWeb/WebDriver/Response.h>
  11. namespace Web::WebDriver {
  12. using Painter = Function<void(Gfx::IntRect const&, Gfx::Bitmap&)>;
  13. Response capture_element_screenshot(Painter const& painter, Page& page, DOM::Element& element, Gfx::IntRect& rect);
  14. }