- Main Page
- Data Structures
- Files

- File List

# E:/DevIL/src-ILU/src/ilu_states.c

    00001 //-----------------------------------------------------------------------------
    00002 //
    00003 // ImageLib Utility Sources
    00004 // Copyright (C) 2000-2008 by Denton Woods
    00005 // Last modified: 12/17/2008
    00006 //
    00007 // Filename: src-ILU/src/ilu_states.c
    00008 //
    00009 // Description: The state machine
    00010 //
    00011 //-----------------------------------------------------------------------------
    00012
    00013
    00014 #include "ilu_internal.h"
    00015 #include "ilu_states.h"
    00016
    00017
    00018 ILconst_string _iluVendor       = IL_TEXT("Abysmal Software");
    00019 ILconst_string _iluVersion      = IL_TEXT("Developer's Image Library Utilities (ILU) 1.7.5 ");// IL_TEXT(__DATE__));
    00020
    00021
    00022 ILstring ILAPIENTRY iluGetString(ILenum StringName)
    00023 {
    00024         switch (StringName)
    00025         {
    00026                 case ILU_VENDOR:
    00027                         return (ILstring)_iluVendor;
    00028                 //changed 2003-09-04
    00029                 case ILU_VERSION_NUM:
    00030                         return (ILstring)_iluVersion;
    00031                 default:
    00032                         ilSetError(ILU_INVALID_PARAM);
    00033                         break;
    00034         }
    00035         return NULL;
    00036 }
    00037
    00038
    00039 void ILAPIENTRY iluGetIntegerv(ILenum Mode, ILint *Param)
    00040 {
    00041         switch (Mode)
    00042         {
    00043                 case ILU_VERSION_NUM:
    00044                         *Param = ILU_VERSION;
    00045                         break;
    00046
    00047                 case ILU_FILTER:
    00048                         *Param = iluFilter;
    00049                         break;
    00050
    00051                 default:
    00052                         ilSetError(ILU_INVALID_ENUM);
    00053         }
    00054         return;
    00055 }
    00056
    00057
    00058 ILint ILAPIENTRY iluGetInteger(ILenum Mode)
    00059 {
    00060         ILint Temp;
    00061         Temp = 0;
    00062         iluGetIntegerv(Mode, &Temp);
    00063         return Temp;
    00064 }
    00065
    00066
    00067 ILenum iluFilter = ILU_NEAREST;
    00068 ILenum iluPlacement = ILU_CENTER;
    00069
    00070 void ILAPIENTRY iluImageParameter(ILenum PName, ILenum Param)
    00071 {
    00072         switch (PName)
    00073         {
    00074                 case ILU_FILTER:
    00075                         switch (Param)
    00076                         {
    00077                                 case ILU_NEAREST:
    00078                                 case ILU_LINEAR:
    00079                                 case ILU_BILINEAR:
    00080                                 case ILU_SCALE_BOX:
    00081                                 case ILU_SCALE_TRIANGLE:
    00082                                 case ILU_SCALE_BELL:
    00083                                 case ILU_SCALE_BSPLINE:
    00084                                 case ILU_SCALE_LANCZOS3:
    00085                                 case ILU_SCALE_MITCHELL:
    00086                                         iluFilter = Param;
    00087                                         break;
    00088                                 default:
    00089                                         ilSetError(ILU_INVALID_ENUM);
    00090                                         return;
    00091                         }
    00092                         break;
    00093
    00094                 case ILU_PLACEMENT:
    00095                         switch (Param)
    00096                         {
    00097                                 case ILU_LOWER_LEFT:
    00098                                 case ILU_LOWER_RIGHT:
    00099                                 case ILU_UPPER_LEFT:
    00100                                 case ILU_UPPER_RIGHT:
    00101                                 case ILU_CENTER:
    00102                                         iluPlacement = Param;
    00103                                         break;
    00104                                 default:
    00105                                         ilSetError(ILU_INVALID_ENUM);
    00106                                         return;
    00107                         }
    00108                         break;
    00109
    00110                 default:
    00111                         ilSetError(ILU_INVALID_ENUM);
    00112                         return;
    00113         }
    00114         return;
    00115 }