Mercurial > geeqie.yaz
annotate src/pixbuf_util.h @ 804:e702eaa6d1df
vficon_sync speed-up
author | nadvornik |
---|---|
date | Sun, 08 Jun 2008 20:24:46 +0000 |
parents | 48c8e49b571c |
children | 14520c3a91f8 |
rev | line source |
---|---|
9 | 1 /* |
196 | 2 * Geeqie |
9 | 3 * (C) 2004 John Ellis |
475 | 4 * Copyright (C) 2008 The Geeqie Team |
9 | 5 * |
6 * Author: John Ellis | |
7 * | |
8 * This software is released under the GNU General Public License (GNU GPL). | |
9 * Please read the included file COPYING for more information. | |
10 * This software comes with no warranty of any kind, use at your own risk! | |
11 */ | |
12 | |
13 | |
14 #ifndef PIXBUF_UTIL_H | |
15 #define PIXBUF_UTIL_H | |
16 | |
17 | |
18 gboolean pixbuf_to_file_as_png (GdkPixbuf *pixbuf, const char *filename); | |
19 gboolean pixbuf_to_file_as_jpg(GdkPixbuf *pixbuf, const gchar *filename, gint quality); | |
20 | |
21 | |
22 GdkPixbuf *pixbuf_inline(const gchar *key); | |
23 | |
24 #define PIXBUF_INLINE_FOLDER_CLOSED "folder_closed" | |
25 #define PIXBUF_INLINE_FOLDER_LOCKED "folder_locked" | |
26 #define PIXBUF_INLINE_FOLDER_OPEN "folder_open" | |
27 #define PIXBUF_INLINE_FOLDER_UP "folder_up" | |
28 #define PIXBUF_INLINE_SCROLLER "scroller" | |
29 #define PIXBUF_INLINE_BROKEN "broken" | |
91
d063f97503b7
Wed Nov 1 11:39:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
82
diff
changeset
|
30 #define PIXBUF_INLINE_ICON "icon" |
9 | 31 #define PIXBUF_INLINE_LOGO "logo" |
32 | |
41
6281cc38e5ca
Wed Apr 27 15:17:57 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
33 #define PIXBUF_INLINE_ICON_FLOAT "icon_float" |
6281cc38e5ca
Wed Apr 27 15:17:57 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
34 #define PIXBUF_INLINE_ICON_THUMB "icon_thumb" |
6281cc38e5ca
Wed Apr 27 15:17:57 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
35 |
91
d063f97503b7
Wed Nov 1 11:39:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
82
diff
changeset
|
36 #define PIXBUF_INLINE_ICON_BOOK "icon_book" |
d063f97503b7
Wed Nov 1 11:39:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
82
diff
changeset
|
37 #define PIXBUF_INLINE_ICON_CONFIG "icon_config" |
d063f97503b7
Wed Nov 1 11:39:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
82
diff
changeset
|
38 #define PIXBUF_INLINE_ICON_TOOLS "icon_tools" |
d063f97503b7
Wed Nov 1 11:39:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
82
diff
changeset
|
39 #define PIXBUF_INLINE_ICON_VIEW "icon_view" |
d063f97503b7
Wed Nov 1 11:39:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
82
diff
changeset
|
40 |
9 | 41 |
42 GdkPixbuf *pixbuf_copy_rotate_90(GdkPixbuf *src, gint counter_clockwise); | |
43 GdkPixbuf *pixbuf_copy_mirror(GdkPixbuf *src, gint mirror, gint flip); | |
44 | |
45 | |
46 void pixbuf_draw_rect_fill(GdkPixbuf *pb, | |
47 gint x, gint y, gint w, gint h, | |
48 gint r, gint g, gint b, gint a); | |
49 | |
50 void pixbuf_draw_rect(GdkPixbuf *pb, | |
51 gint x, gint y, gint w, gint h, | |
52 gint r, gint g, gint b, gint a, | |
53 gint left, gint right, gint top, gint bottom); | |
54 | |
55 void pixbuf_set_rect_fill(GdkPixbuf *pb, | |
56 gint x, gint y, gint w, gint h, | |
57 gint r, gint g, gint b, gint a); | |
58 | |
59 void pixbuf_set_rect(GdkPixbuf *pb, | |
60 gint x, gint y, gint w, gint h, | |
61 gint r, gint g, gint b, gint a, | |
62 gint left, gint right, gint top, gint bottom); | |
63 | |
64 void pixbuf_pixel_set(GdkPixbuf *pb, gint x, gint y, gint r, gint g, gint b, gint a); | |
65 | |
66 | |
67 void pixbuf_draw_layout(GdkPixbuf *pixbuf, PangoLayout *layout, GtkWidget *widget, | |
68 gint x, gint y, | |
69 guint8 r, guint8 g, guint8 b, guint8 a); | |
70 | |
71 | |
33
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
72 void pixbuf_draw_triangle(GdkPixbuf *pb, |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
73 gint clip_x, gint clip_y, gint clip_w, gint clip_h, |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
74 gint x1, gint y1, gint x2, gint y2, gint x3, gint y3, |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
75 guint8 r, guint8 g, guint8 b, guint8 a); |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
76 |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
77 void pixbuf_draw_line(GdkPixbuf *pb, |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
78 gint clip_x, gint clip_y, gint clip_w, gint clip_h, |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
79 gint x1, gint y1, gint x2, gint y2, |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
80 guint8 r, guint8 g, guint8 b, guint8 a); |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
81 |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
82 void pixbuf_draw_shadow(GdkPixbuf *pb, |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
83 gint clip_x, gint clip_y, gint clip_w, gint clip_h, |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
84 gint x, gint y, gint w, gint h, gint border, |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
85 guint8 r, guint8 g, guint8 b, guint8 a); |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
86 |
82
a4c1b7014e6e
Thu Oct 19 15:20:51 2006 John Ellis <johne@verizon.net>
gqview
parents:
41
diff
changeset
|
87 void pixbuf_desaturate_rect(GdkPixbuf *pb, |
a4c1b7014e6e
Thu Oct 19 15:20:51 2006 John Ellis <johne@verizon.net>
gqview
parents:
41
diff
changeset
|
88 gint x, gint y, gint w, gint h); |
a4c1b7014e6e
Thu Oct 19 15:20:51 2006 John Ellis <johne@verizon.net>
gqview
parents:
41
diff
changeset
|
89 |
a4c1b7014e6e
Thu Oct 19 15:20:51 2006 John Ellis <johne@verizon.net>
gqview
parents:
41
diff
changeset
|
90 |
33
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
91 /* clipping utils */ |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
92 |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
93 gint util_clip_region(gint x, gint y, gint w, gint h, |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
94 gint clip_x, gint clip_y, gint clip_w, gint clip_h, |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
95 gint *rx, gint *ry, gint *rw, gint *rh); |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
96 void util_clip_triangle(gint x1, gint y1, gint x2, gint y2, gint x3, gint y3, |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
97 gint *rx, gint *ry, gint *rw, gint *rh); |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
98 |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
99 |
9 | 100 #endif |