Cinder  0.8.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Resize.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2010, The Barbarian Group
3  All rights reserved.
4 
5  Redistribution and use in source and binary forms, with or without modification, are permitted provided that
6  the following conditions are met:
7 
8  * Redistributions of source code must retain the above copyright notice, this list of conditions and
9  the following disclaimer.
10  * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
11  the following disclaimer in the documentation and/or other materials provided with the distribution.
12 
13  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
14  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
15  PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
16  ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
17  TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
19  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
20  POSSIBILITY OF SUCH DAMAGE.
21 */
22 
23 #pragma once
24 
25 #include "cinder/Surface.h"
26 #include "cinder/Filter.h"
27 #include "cinder/Rect.h"
28 
29 namespace cinder { namespace ip {
30 
31 template<typename T>
32 void resize( const SurfaceT<T> &srcSurface, SurfaceT<T> *dstSurface, const FilterBase &filter = FilterTriangle() );
33 template<typename T>
34 void resize( const ChannelT<T> &srcChannel, ChannelT<T> *dstChannel, const FilterBase &filter = FilterTriangle() );
35 template<typename T>
36 void resize( const SurfaceT<T> &srcSurface, const Area &srcArea, SurfaceT<T> *dstSurface, const Area &dstArea, const FilterBase &filter = FilterTriangle() );
38 template<typename T>
39 SurfaceT<T> resizeCopy( const SurfaceT<T> &srcSurface, const Area &srcArea, const Vec2i &dstSize, const FilterBase &filter = FilterTriangle() );
40 template<typename T>
41 void resize( const ChannelT<T> &srcChannel, const Area &srcArea, ChannelT<T> *dstChannel, const Area &dstArea, const FilterBase &filter = FilterTriangle() );
42 
43 } } // namespace cinder::ip
SurfaceT< T > resizeCopy(const SurfaceT< T > &srcSurface, const Area &srcArea, const Vec2i &dstSize, const FilterBase &filter=FilterTriangle())
Returns a new Surface which is a copy of srcSurface's area srcArea scaled to size dstSize using filte...
Definition: Resize.cpp:350
void resize(const SurfaceT< T > &srcSurface, SurfaceT< T > *dstSurface, const FilterBase &filter=FilterTriangle())
Definition: Resize.cpp:344
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: GLee.h:5419
Vec2< int > Vec2i
Definition: Vector.h:1313