Previous: Example usage of Video API, Up: Video Subsystem [Contents][Index]
grub_err_t grub_video_bitmap_create (struct grub_video_bitmap **bitmap, unsigned int width, unsigned int height, enum grub_video_blit_format blit_format)
Creates a new bitmap with given dimensions and blitting format. Allocated bitmap data can then be modified freely and finally blitted with grub_video_blit_bitmap
to rendering target.
grub_err_t grub_video_bitmap_destroy (struct grub_video_bitmap *bitmap);
When bitmap is no longer needed, it can be freed from memory using this command. bitmap
is previously allocated bitmap with grub_video_bitmap_create
or loaded with grub_video_bitmap_load
.
grub_err_t grub_video_bitmap_load (struct grub_video_bitmap **bitmap, const char *filename);
Tries to load given bitmap (filename
) using registered bitmap loaders. In case bitmap format is not recognized or supported error GRUB_ERR_BAD_FILE_TYPE
is returned.
unsigned int grub_video_bitmap_get_width (struct grub_video_bitmap *bitmap);
Returns bitmap width.
unsigned int grub_video_bitmap_get_height (struct grub_video_bitmap *bitmap);
Return bitmap height.
void grub_video_bitmap_get_mode_info (struct grub_video_bitmap *bitmap, struct grub_video_mode_info *mode_info);
Returns bitmap format details in form of grub_video_mode_info
.
void *grub_video_bitmap_get_data (struct grub_video_bitmap *bitmap);
Return pointer to bitmap data. Contents of the pointed data can be freely modified. There is no extra protection against going off the bounds so you have to be carefull how to access the data.
Previous: Example usage of Video API, Up: Video Subsystem [Contents][Index]