Epee Engine  0.40
The Epee Engine is an open source cross platform graphics engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
EEImage.h
Go to the documentation of this file.
1 /*
2 * EEImage.h
3 *
4 *
5 * Epee Engine
6 * Created by Alan Uthoff on 3/12/06.
7 Copyright (C) 2011
8 
9 This Code is free software; you can redistribute it and/or
10 modify it under the terms of the zlib/libpng License as published
11 by the Free Software Foundation; either
12 version 2.1 of the License, or (at your option) any later version.
13 This software is provided 'as-is', without any express or implied warranty.
14 
15 In no event will the authors be held liable for any damages arising from the use of this software.
16 
17 Permission is granted to anyone to use this software for any purpose,
18 including commercial applications, and to alter it and redistribute
19 it freely, subject to the following restrictions:
20 
21 1. The origin of this software must not be misrepresented;
22 you must not claim that you wrote the original software.
23 If you use this software in a product, an acknowledgment
24 in the product documentation would be appreciated but is not required.
25 
26 2. Altered source versions must be plainly marked as such,
27 and must not be misrepresented as being the original software.
28 
29 3. This notice may not be removed or altered from any source distribution.
30 
31 
32 */
33 
34 #ifndef EEIMAGE_H
35 #define EEIMAGE_H
36 
38 #include <string>
39 #include <iostream>
40 #include "EEWidget.h"
41 
42 //***********************Begin of image Class****************************
43 
44 class image :public EEWidget
45 { SDL_Rect m_cOrgialDem;
46 std::string m_sFileName;
47 bool m_bClip;
48 bool m_bTransparency;
49 
50 public:
51  image (const std::string & _FileNameImage,const std::string & _NameImageHere,int _x,int _y,int _z,bool _Transparency=false);//:EEWidget( _NameImageHere,Type_Image ,_x, _y, _z)
52  friend class EpeeEngine;
53  virtual SDL_Surface * LoadSurface();
54  virtual void LoadTexture();
55  std::string GetFileName();
56  void SetClippingRect(int _x,int _y,int _w,int _h);
57  bool GetClip();
58  int GetClippingX();
59  int GetClippingY();
60  int GetClippingW();
61  int GetClippingH();
62  void SetTransparency (bool _Transparency);
63  bool GetTransparency();
64 protected:
65  SDL_Rect ClipingRect;
66 
67  image (const std::string & _FileNameImage,const std::string & _NameImageHere,int _x,int _y,int _z,int _type,bool _Transparency=false);//:EEWidget( _NameImageHere,_type ,_x, _y, _z)
68  image();
69  image(const std::string & _FileNameImage);
70  SDL_Rect * GetClippingRect();
71  SDL_Rect * GetOrignalRect();
72 
73 
74 
75 
76 };
77 
78 //***********************End of image Class*********************************
79 #endif // EEIMAGE_H
virtual SDL_Surface * LoadSurface()
Definition: EEImage.cpp:105
SDL_Rect * GetClippingRect()
Definition: EEImage.cpp:165
void SetTransparency(bool _Transparency)
Definition: EEImage.cpp:94
bool GetTransparency()
Definition: EEImage.cpp:99
Definition: EpeeEngine.h:101
Definition: EEImage.h:44
int GetClippingW()
Definition: EEImage.cpp:84
SDL_Rect * GetOrignalRect()
Definition: EEImage.cpp:170
image()
Definition: EEImage.cpp:153
int GetClippingY()
Definition: EEImage.cpp:79
virtual void LoadTexture()
Definition: EEImage.cpp:50
bool GetClip()
Definition: EEImage.cpp:69
void SetClippingRect(int _x, int _y, int _w, int _h)
Definition: EEImage.cpp:60
SDL_Rect ClipingRect
Definition: EEImage.h:65
Definition: EEWidget.h:43
std::string GetFileName()
Definition: EEImage.cpp:55
int GetClippingH()
Definition: EEImage.cpp:89
int GetClippingX()
Definition: EEImage.cpp:74