2012-09-12 13:42:41 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
|
|
|
|
*
|
|
|
|
* GPL v2
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GRAPHIC_UTILS_H__
|
|
|
|
#define __GRAPHIC_UTILS_H__
|
|
|
|
|
2012-09-26 09:59:01 +00:00
|
|
|
#include <fb.h>
|
|
|
|
#include <gui/image.h>
|
2012-09-26 09:59:02 +00:00
|
|
|
#include <gui/gui.h>
|
2012-09-26 09:59:01 +00:00
|
|
|
|
2015-07-15 05:30:48 +00:00
|
|
|
u32 gu_hex_to_pixel(struct fb_info *info, u32 color);
|
2015-07-15 21:03:47 +00:00
|
|
|
u32 gu_rgb_to_pixel(struct fb_info *info, u8 r, u8 g, u8 b, u8 t);
|
2015-07-09 07:33:32 +00:00
|
|
|
void gu_rgba_blend(struct fb_info *info, struct image *img, void* dest, int height,
|
2012-09-12 13:42:46 +00:00
|
|
|
int width, int startx, int starty, bool is_rgba);
|
2015-07-09 07:33:32 +00:00
|
|
|
void gu_set_pixel(struct fb_info *info, void *adr, u32 px);
|
|
|
|
void gu_set_rgb_pixel(struct fb_info *info, void *adr, u8 r, u8 g, u8 b);
|
|
|
|
void gu_set_rgba_pixel(struct fb_info *info, void *adr, u8 r, u8 g, u8 b, u8 a);
|
|
|
|
void gu_memset_pixel(struct fb_info *info, void* buf, u32 color, size_t size);
|
2015-08-07 12:41:17 +00:00
|
|
|
struct screen *fb_create_screen(struct fb_info *info);
|
|
|
|
struct screen *fb_open(const char *fbdev);
|
2012-09-26 09:59:03 +00:00
|
|
|
void fb_close(struct screen *sc);
|
2015-07-09 07:33:32 +00:00
|
|
|
void gu_screen_blit(struct screen *sc);
|
2015-07-10 19:31:18 +00:00
|
|
|
void gu_invert_area(struct fb_info *info, void *buf, int startx, int starty, int width,
|
|
|
|
int height);
|
2015-08-07 12:42:58 +00:00
|
|
|
void gu_screen_blit_area(struct screen *sc, int startx, int starty, int width,
|
|
|
|
int height);
|
2012-09-12 13:42:41 +00:00
|
|
|
|
|
|
|
#endif /* __GRAPHIC_UTILS_H__ */
|