2
This file is part of Caelum.
3
See http://www.ogre3d.org/wiki/index.php/Caelum
5
Copyright (c) 2006-2007 Caelum team. See Contributors.txt for details.
7
Caelum is free software: you can redistribute it and/or modify
8
it under the terms of the GNU Lesser General Public License as published
9
by the Free Software Foundation, either version 3 of the License, or
10
(at your option) any later version.
12
Caelum is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU Lesser General Public License for more details.
17
You should have received a copy of the GNU Lesser General Public License
18
along with Caelum. If not, see <http://www.gnu.org/licenses/>.
21
#ifndef CAELUM_HEADER__IMAGE_HELPER_H
22
#define CAELUM_HEADER__IMAGE_HELPER_H
24
#include "CaelumPrerequisites.h"
28
/** Gets the interpolated colour between two pixels from an image.
29
Interpolate a texture pixel by hand. (fx, fy) are in texture coordinates,
30
ranging [0-1] across the entire texture.
31
Smooth blending is only done on the x coordinate.
32
Wrapping is only supported on X as well.
34
@param fx Horizontal coordinate.
35
@param fy Vertical coordiate.
36
@param img The lookup image.
37
@param wrapX To wrap the x coordinate.
38
@return The interpolated colour.
40
CAELUM_EXPORT Ogre::ColourValue getInterpolatedColour (float fx, float fy, Ogre::Image *img,
44
#endif // CAELUM_HEADER__IMAGE_HELPER_H