X-Git-Url: http://git.maemo.org/git/?p=lordsawar;a=blobdiff_plain;f=src%2Fgui%2Fimage-helpers.h;fp=src%2Fgui%2Fimage-helpers.h;h=f7d5f3bc3705e91d316fef3197e93ca241dc4394;hp=0000000000000000000000000000000000000000;hb=9eda00ff73353c55ecef6f82131166d5d4a85e29;hpb=3d34d4aa85a929f912464f71158396a388274f27;ds=sidebyside diff --git a/src/gui/image-helpers.h b/src/gui/image-helpers.h new file mode 100644 index 0000000..f7d5f3b --- /dev/null +++ b/src/gui/image-helpers.h @@ -0,0 +1,39 @@ +// Copyright (C) 2007 Ole Laursen +// Copyright (C) 2009 Ben Asselstine +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Library General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +// 02110-1301, USA. + +#ifndef IMAGE_HELPERS_H +#define IMAGE_HELPERS_H + +#include +#include +#include "PixMask.h" + +// convert a file containing one large image with subimages, each of the same +// width, to an array of pixbufs corresponding to the subimages +std::vector +disassemble_row(const std::string &file, int no); +std::vector +disassemble_row(const std::string &file, int no, bool first_half_height); + +Glib::RefPtr to_pixmap(Glib::RefPtr pixbuf); + +int get_pwidth(Glib::RefPtr pixmap); +int get_pheight(Glib::RefPtr pixmap); +Glib::RefPtr to_pixbuf(Glib::RefPtr pixmap); +Glib::RefPtr scale (Glib::RefPtr pixmap, int w, int h); +#endif