#ifndef BP_LIB_GRAPHIC_H
#define BP_LIB_GRAPHIC_H
#include <Uefi.h>
#include <Library/UefiLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Protocol/GraphicsOutput.h>
typedef struct {
  UINT8 r,g,b,a;
} bp_graphic_COLOR_RGBA;
typedef struct {
  UINT8 r,g,b;
} bp_graphic_COLOR_RGB;
EFI_STATUS bp_graphic_get_mode_count(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop,UINT32 *output);
EFI_STATUS bp_graphic_get_highest_resolution_index(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop,UINT32 *output);
EFI_STATUS bp_graphic_get_index_by_resolution(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop,UINT64 hor_res,UINT64 vert_res,UINT32 *output);
UINT32 bp_graphic_get_pixel_by_color(bp_graphic_COLOR_RGB *color,UINT32 red_bits,UINT32 green_bits,UINT32 blue_bits);
EFI_STATUS bp_graphic_copy_frame_part(UINT32 *fb_base,UINT32 *from_base,UINTN height_out,UINTN width_out,UINTN x,UINTN y,UINTN height_from,UINTN width_from);
#endif
