PGE Engine
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
graphics_funcs.h
1 /*
2  * Platformer Game Engine by Wohlstand, a free platform for game making
3  * Copyright (c) 2015 Vitaly Novichkov <admin@wohlnet.ru>
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #include <QPixmap>
20 #include <QPainter>
21 #include <QImage>
22 
23 #include "size.h"
24 
25 #define SDL_MAIN_HANDLED
26 #include <SDL2/SDL.h> // SDL 2 Library
27 #include <SDL2/SDL_opengl.h>
28 
29 #ifndef GRAPHICS_FUNCS_H
30 #define GRAPHICS_FUNCS_H
31 
32 
34 {
35 public:
36  static QImage setAlphaMask(QImage image, QImage mask);
37  static QImage fromBMP(QString& file);
38  static QImage loadQImage(QString file);
39  static QPixmap squareImage(QPixmap image, QSize targetSize);
40  static SDL_Surface *QImage_toSDLSurface(const QImage &sourceImage);
41  static void loadMaskedImage(QString rootDir, QString in_imgName, QString &out_maskName, QString &out_errStr, PGE_Size* imgSize=0);
42  static QImage convertToGLFormat(const QImage &img);//Taken from QGLWidget
43 };
44 
45 #endif // GRAPHICS_FUNCS_H
Definition: size.h:23
Definition: graphics_funcs.h:33