Home | History | Annotate | Download | only in skin
      1 /* Copyright (C) 2007-2008 The Android Open Source Project
      2 **
      3 ** This software is licensed under the terms of the GNU General Public
      4 ** License version 2, as published by the Free Software Foundation, and
      5 ** may be copied, distributed, and modified under those terms.
      6 **
      7 ** This program is distributed in the hope that it will be useful,
      8 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
      9 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     10 ** GNU General Public License for more details.
     11 */
     12 #ifndef _ANDROID_SKIN_SCALER_H
     13 #define _ANDROID_SKIN_SCALER_H
     14 
     15 #include "android/skin/image.h"
     16 
     17 typedef struct SkinScaler   SkinScaler;
     18 
     19 /* create a new image scaler. by default, it uses a scale of 1.0 */
     20 extern SkinScaler*  skin_scaler_create( void );
     21 
     22 /* change the scale of a given scaler. returns 0 on success, or -1 in case of
     23  * problem (unsupported scale) */
     24 extern int          skin_scaler_set( SkinScaler*  scaler,
     25                                      double       scale,
     26                                      double       xDisp,
     27                                      double       yDisp );
     28 
     29 extern void         skin_scaler_free( SkinScaler*  scaler );
     30 
     31 extern void         skin_scaler_scale( SkinScaler*   scaler,
     32                                        SDL_Surface*  dst,
     33                                        SDL_Surface*  src,
     34                                        int           sx,
     35                                        int           sy,
     36                                        int           sw,
     37                                        int           sh );
     38 
     39 #endif /* _ANDROID_SKIN_SCALER_H */
     40