libeg/screen.c
EG_IMAGE * egCopyScreen(VOID) {
   EG_IMAGE *Image = NULL;

   if (!egHasGraphics)
      return NULL;

   // allocate a buffer for the whole screen
   Image = egCreateImage(egScreenWidth, egScreenHeight, 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, 0, 0, 0, 0, Image->Width, Image->Height, 0);
   } else if (UgaDraw != NULL) {
      refit_call10_wrapper(UgaDraw->Blt, UgaDraw, (EFI_UGA_PIXEL *)Image->PixelData, EfiUgaVideoToBltBuffer,
                           0, 0, 0, 0, Image->Width, Image->Height, 0);
   }
   return Image;
}
// Copy the current contents of the display into an EG_IMAGE....
// Returns pointer if successful, NULL if not.
Copy the current contents of the display into an EG_IMAGE
Returns pointer if successful, NULL if not.
Copy the current contents of the display into an EG_IMAGE Returns pointer if successful NULL if not .
EG_IMAGE * egCopyScreen(VOID) {
   EG_IMAGE *Image = NULL;
   if (!egHasGraphics)
      return NULL;
   Image = egCreateImage(egScreenWidth, egScreenHeight, FALSE);
   if (Image == NULL) {
      return NULL;
   }
   if (GraphicsOutput != NULL) {
      refit_call10_wrapper(GraphicsOutput->Blt, GraphicsOutput, (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *)Image->PixelData,
                           EfiBltVideoToBltBuffer, 0, 0, 0, 0, Image->Width, Image->Height, 0);
   } else if (UgaDraw != NULL) {
      refit_call10_wrapper(UgaDraw->Blt, UgaDraw, (EFI_UGA_PIXEL *)Image->PixelData, EfiUgaVideoToBltBuffer,
                           0, 0, 0, 0, Image->Width, Image->Height, 0);
   }
   return Image;
}
EG_IMAGE * egCopyScreen ( VOID ) { EG_IMAGE * Image = NULL ; if ( ! egHasGraphics ) return NULL ; Image = egCreateImage ( egScreenWidth , egScreenHeight , FALSE ) ; if ( Image == NULL ) { return NULL ; } if ( GraphicsOutput != NULL ) { refit_call10_wrapper ( GraphicsOutput -> Blt , GraphicsOutput , ( EFI_GRAPHICS_OUTPUT_BLT_PIXEL * ) Image -> PixelData , EfiBltVideoToBltBuffer , 0 , 0 , 0 , 0 , Image -> Width , Image -> Height , 0 ) ; } else if ( UgaDraw != NULL ) { refit_call10_wrapper ( UgaDraw -> Blt , UgaDraw , ( EFI_UGA_PIXEL * ) Image -> PixelData , EfiUgaVideoToBltBuffer , 0 , 0 , 0 , 0 , Image -> Width , Image -> Height , 0 ) ; } return Image ; }
Copy the current contents of the display into an EG_IMAGE....
Returns pointer if successful, NULL if not.
Copy the current contents of the display into an EG_IMAGE .... Returns pointer if successful NULL if not .
// allocate a buffer for the whole screen // get full screen image