LEFT | RIGHT |
(Both sides are equal) |
1 /* vim:set et sts=4 sw=4: | 1 /* vim:set et sts=4 sw=4: |
2 * | 2 * |
3 * ibus - The Input Bus | 3 * ibus - The Input Bus |
4 * | 4 * |
5 * Copyright(c) 2011 Peng Huang <shawn.p.huang@gmail.com> | 5 * Copyright(c) 2011 Peng Huang <shawn.p.huang@gmail.com> |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Lesser General Public | 8 * modify it under the terms of the GNU Lesser General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or(at your option) any later version. | 10 * version 2 of the License, or(at your option) any later version. |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 float height = (float)pixbuf.get_height(); | 47 float height = (float)pixbuf.get_height(); |
48 float scale = size / (width > height ? width : height); | 48 float scale = size / (width > height ? width : height); |
49 width *= scale; | 49 width *= scale; |
50 height *= scale; | 50 height *= scale; |
51 | 51 |
52 pixbuf = pixbuf.scale_simple((int)width, (int)height, Gdk.InterpType.BIL
INEAR); | 52 pixbuf = pixbuf.scale_simple((int)width, (int)height, Gdk.InterpType.BIL
INEAR); |
53 set_from_pixbuf(pixbuf); | 53 set_from_pixbuf(pixbuf); |
54 show(); | 54 show(); |
55 } | 55 } |
56 } | 56 } |
LEFT | RIGHT |