diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-07-29 15:25:37 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-07-29 15:25:37 +0000 |
commit | 3e1846025a4c064570c985a286e0effa73f95ed9 (patch) | |
tree | a0cd627db33f7daa74b011c0f51d53f2b0d5a9b5 /w3mimg/fb/fb_imlib2.c | |
parent | [w3m-dev 03280] w3m-img without w3mimgsize (diff) | |
download | w3m-3e1846025a4c064570c985a286e0effa73f95ed9.tar.gz w3m-3e1846025a4c064570c985a286e0effa73f95ed9.zip |
[w3m-dev 03282] Re: w3m-img for framebuffer update
* w3mimg/fb/fb.c (fb_image_new): ignore no image
calloc multiple images
(fb_image_fill): added
(fb_image_draw): width, height fix
(fb_image_rotate): fix typo
(fb_image_copy): added
(fb_frame_new): added
(fb_freme_free): added
(fb_frame_rotate): added
* w3mimg/fb/fb.h (FB_IMAGE): add num, id, delay
(fb_frame_new): added
(fb_frame_free): added
(fb_frame_rotate): added
* w3mimg/fb/fb_gdkpixbuf.c (get_image_size): animation support
(fb_image_load): animation support
(draw): add bg, x, y, w, h args
* w3mimg/fb/fb_img.h (fb_image_load): return FB_IMAGE**
* w3mimg/fb/fb_imlib2.c (fb_image_load): return FB_IMAGE**
* w3mimg/fb/fb_w3mimg.c (w3mfb_show_image): animation support
From: Hiroyuki Ito <hito@crl.go.jp>
Diffstat (limited to '')
-rw-r--r-- | w3mimg/fb/fb_imlib2.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/w3mimg/fb/fb_imlib2.c b/w3mimg/fb/fb_imlib2.c index 44633a3..a8371ff 100644 --- a/w3mimg/fb/fb_imlib2.c +++ b/w3mimg/fb/fb_imlib2.c @@ -1,4 +1,4 @@ -/* $Id: fb_imlib2.c,v 1.6 2002/07/22 16:17:32 ukai Exp $ */ +/* $Id: fb_imlib2.c,v 1.7 2002/07/29 15:25:37 ukai Exp $ */ /************************************************************************** fb_imlib2.c 0.3 Copyright (C) 2002, hito **************************************************************************/ @@ -31,11 +31,11 @@ get_image_size(char *filename, int *w, int *h) return 0; } -FB_IMAGE * +FB_IMAGE ** fb_image_load(char *filename, int w, int h) { Imlib_Image image; - FB_IMAGE *img; + FB_IMAGE **frame; if (filename == NULL) return NULL; @@ -53,18 +53,18 @@ fb_image_load(char *filename, int w, int h) w = imlib_image_get_width(); h = imlib_image_get_height(); - img = fb_image_new(w, h); + frame = fb_frame_new(w, h, 1); - if (img == NULL) { + if (frame == NULL) { imlib_free_image(); return NULL; } - draw(img, image); + draw(frame[0], image); imlib_free_image(); - return img; + return frame; } static void @@ -87,10 +87,11 @@ draw(FB_IMAGE * img, Imlib_Image image) g = (data[offset + i] >> 8) & 0x000000ff; b = (data[offset + i]) & 0x000000ff; - if (a == 0) + if (a == 0) { fb_image_pset(img, i, j, bg_r, bg_g, bg_b); - else + } else { fb_image_pset(img, i, j, r, g, b); + } } } return; @@ -115,7 +116,7 @@ resize_image(Imlib_Image image, int width, int height) if (w == width && h == height) return image; - resized_image = + resized_image = imlib_create_cropped_scaled_image(0, 0, w, h, width, height); imlib_free_image(); |