libeg/screen.c
EG_IMAGE * egCopyScreenArea(UINTN XPos, UINTN YPos, UINTN Width, UINTN Height) {
    EG_IMAGE *Image = NULL;

    if (!egHasGraphics)
        return NULL;

    // allocate a buffer for the screen area
    Image = egCreateImage(Width, Height, FALSE);
    if (Image == NULL) {
        return NULL;
    }

    // get full screen image
    if (GraphicsOutput != NULL) {
        refit_call10_wrapper(GraphicsOutput->Blt, GraphicsOutput, (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) Image->PixelData,
            EfiBltVideoToBltBuffer, XPos, YPos, 0, 0, Image->Width, Image->Height, 0);
    } else if (UgaDraw != NULL) {
        refit_call10_wrapper(UgaDraw->Blt, UgaDraw, (EFI_UGA_PIXEL *) Image->PixelData, EfiUgaVideoToBltBuffer,
            XPos, YPos, 0, 0, Image->Width, Image->Height, 0);
    }
    return Image;
}
// Copy the current contents of the specified display area into an EG_IMAGE....
// Returns pointer if successful, NULL if not.
Copy the current contents of the specified display area into an EG_IMAGE
Returns pointer if successful, NULL if not.
Copy the current contents of the specified display area into an EG_IMAGE Returns pointer if successful NULL if not .
EG_IMAGE * egCopyScreenArea(UINTN XPos, UINTN YPos, UINTN Width, UINTN Height) {
    EG_IMAGE *Image = NULL;
    if (!egHasGraphics)
        return NULL;
    Image = egCreateImage(Width, Height, FALSE);
    if (Image == NULL) {
        return NULL;
    }
    if (GraphicsOutput != NULL) {
        refit_call10_wrapper(GraphicsOutput->Blt, GraphicsOutput, (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) Image->PixelData,
            EfiBltVideoToBltBuffer, XPos, YPos, 0, 0, Image->Width, Image->Height, 0);
    } else if (UgaDraw != NULL) {
        refit_call10_wrapper(UgaDraw->Blt, UgaDraw, (EFI_UGA_PIXEL *) Image->PixelData, EfiUgaVideoToBltBuffer,
            XPos, YPos, 0, 0, Image->Width, Image->Height, 0);
    }
    return Image;
}
EG_IMAGE * egCopyScreenArea ( UINTN XPos , UINTN YPos , UINTN Width , UINTN Height ) { EG_IMAGE * Image = NULL ; if ( ! egHasGraphics ) return NULL ; Image = egCreateImage ( Width , Height , FALSE ) ; if ( Image == NULL ) { return NULL ; } if ( GraphicsOutput != NULL ) { refit_call10_wrapper ( GraphicsOutput -> Blt , GraphicsOutput , ( EFI_GRAPHICS_OUTPUT_BLT_PIXEL * ) Image -> PixelData , EfiBltVideoToBltBuffer , XPos , YPos , 0 , 0 , Image -> Width , Image -> Height , 0 ) ; } else if ( UgaDraw != NULL ) { refit_call10_wrapper ( UgaDraw -> Blt , UgaDraw , ( EFI_UGA_PIXEL * ) Image -> PixelData , EfiUgaVideoToBltBuffer , XPos , YPos , 0 , 0 , Image -> Width , Image -> Height , 0 ) ; } return Image ; }
Copy the current contents of the specified display area into an EG_IMAGE....
Returns pointer if successful, NULL if not.
Copy the current contents of the specified display area into an EG_IMAGE .... Returns pointer if successful NULL if not .
// allocate a buffer for the screen area // get full screen image