mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
git-svn-id: svn://ultimatepp.org/upp/trunk@1781 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
9d361f342c
commit
e9e3035441
1 changed files with 25 additions and 0 deletions
25
bazaar/Functions4U/Functions4U_Gui.cpp
Normal file
25
bazaar/Functions4U/Functions4U_Gui.cpp
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#ifdef flagGUI
|
||||
|
||||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
#include "Functions4U.h"
|
||||
#include "Functions4U/Functions4U_Gui.h"
|
||||
|
||||
inline const RGBA *GetPixel(Image &img, int x, int y) {
|
||||
return img + x + y*img.GetWidth();
|
||||
}
|
||||
|
||||
inline RGBA *GetPixel(ImageBuffer &img, int x, int y) {
|
||||
return img + x + y*img.GetWidth();
|
||||
}
|
||||
|
||||
Image Rotate180(const Image& orig) {
|
||||
Size sz = orig.GetSize();
|
||||
ImageBuffer dest(sz);
|
||||
for(int rw = 0; rw < sz.cy; rw++)
|
||||
for(int cl = 0; cl < sz.cx; cl++)
|
||||
dest[rw][cl] = orig[sz.cy - rw - 1][sz.cx - cl - 1];
|
||||
return dest;
|
||||
}
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue