App

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

Functions
mhr_appcore_interpolators_Interpolator.cpp File Reference
`#include "mhr_appcore_interpolators_Interpolator.hpp"`
`#include "../app/app_all.hpp"`

Go to the source code of this file.

## Functions
JNIEXPORT jint JNICALL | Java_mhr_appcore_interpolators_Interpolator_resampleTo__IJJ (JNIEnv *pEnv, jclass pThisClass, jint nativeType, jlong srcAdress, jlong dstAdress)
JNIEXPORT jint JNICALL | Java_mhr_appcore_interpolators_Interpolator_resampleTo__IJJI (JNIEnv *pEnv, jclass pThisClass, jint nativeType, jlong srcAdress, jlong dstAdress, jint iType)
JNIEXPORT jint JNICALL | Java_mhr_appcore_interpolators_Interpolator_resampleTo__IJJID (JNIEnv *pEnv, jclass pThisClass, jint nativeType, jlong srcAdress, jlong dstAdress, jint iType, jdouble force)

## Function Documentation

JNIEXPORT jint JNICALL Java_mhr_appcore_interpolators_Interpolator_resampleTo__IJJ | ( | JNIEnv * | pEnv,
|  | jclass | pThisClass,
|  | jint | nativeType,
|  | jlong | srcAdress,
|  | jlong | dstAdress
| ) |  |

protected static native int resampleTo(int nativeType, long srcAdress, long dstAdress);

Definition at line 9 of file mhr_appcore_interpolators_Interpolator.cpp.

{
int retVal = 0;
switch ((BitmapNativeType) nativeType) {
case mono_8_bit:
{
TNearestFInt<px_1x8bit, px_1x8bit> * i = new TNearestFInt<px_1x8bit, px_1x8bit>(*((mono_8bit_bitmap *)srcAdress));
retVal = i->resampleTo(*((mono_8bit_bitmap *)dstAdress));
delete i;
break;
}
case rgba_8_bit:
{
TNearestFInt<px_4x8bit, px_1x8bit> * i = new TNearestFInt<px_4x8bit, px_1x8bit>(*((rgba_8bit_bitmap *)srcAdress));
retVal = i->resampleTo(*((rgba_8bit_bitmap *)dstAdress));
delete i;
break;
}
default:
retVal = -1;
break;
}
return retVal;
}

JNIEXPORT jint JNICALL Java_mhr_appcore_interpolators_Interpolator_resampleTo__IJJI | ( | JNIEnv * | pEnv,
|  | jclass | pThisClass,
|  | jint | nativeType,
|  | jlong | srcAdress,
|  | jlong | dstAdress,
|  | jint | iType
| ) |  |

Definition at line 33 of file mhr_appcore_interpolators_Interpolator.cpp.

{
int retVal = 0;
switch ((BitmapNativeType) nativeType) {
case mono_8_bit:
{
TFInterpolator<px_1x8bit, px_1x8bit> * i = NULL;
switch ((InterpolatorNativeType)iType) {
case NEAREST_NEIGHBOUR:
i = new TNearestFInt<px_1x8bit, px_1x8bit>(*((mono_8bit_bitmap *)srcAdress));
break;
case LINEAR:
i = new TLinearFInt<px_1x8bit, px_1x8bit>(*((mono_8bit_bitmap *)srcAdress));
break;
case CUBIC:
i = new TCubicFInt<px_1x8bit, px_1x8bit>(*((mono_8bit_bitmap *)srcAdress));
break;
default:
break;
}
if (i != NULL) {
retVal = i->resampleTo(*((mono_8bit_bitmap *)dstAdress));
delete i;
}
break;
}
case rgba_8_bit:
{
TFInterpolator<px_4x8bit, px_1x8bit> * i = NULL;
switch ((InterpolatorNativeType)iType) {
case NEAREST_NEIGHBOUR:
i = new TNearestFInt<px_4x8bit, px_1x8bit>(*((rgba_8bit_bitmap *)srcAdress));
break;
case LINEAR:
i = new TLinearFInt<px_4x8bit, px_1x8bit>(*((rgba_8bit_bitmap *)srcAdress));
break;
case CUBIC:
i = new TCubicFInt<px_4x8bit, px_1x8bit>(*((rgba_8bit_bitmap *)srcAdress));
break;
default:
break;
}
if (i != NULL) {
retVal = i->resampleTo(*((rgba_8bit_bitmap *)dstAdress));
delete i;
}
break;
}
default:
retVal = -1;
break;
}
return retVal;
}

JNIEXPORT jint JNICALL Java_mhr_appcore_interpolators_Interpolator_resampleTo__IJJID | ( | JNIEnv * | pEnv,
|  | jclass | pThisClass,
|  | jint | nativeType,
|  | jlong | srcAdress,
|  | jlong | dstAdress,
|  | jint | iType,
|  | jdouble | force
| ) |  |

Definition at line 87 of file mhr_appcore_interpolators_Interpolator.cpp.

{
int retVal = 0;
switch ((BitmapNativeType) nativeType) {
case mono_8_bit:
{
TFInterpolator<px_1x8bit, px_1x8bit> * i = NULL;
switch ((InterpolatorNativeType)iType) {
case NEAREST_NEIGHBOUR:
i = new TNearestFInt<px_1x8bit, px_1x8bit>(*((mono_8bit_bitmap *)srcAdress));
break;
case LINEAR:
i = new TLinearFInt<px_1x8bit, px_1x8bit>(*((mono_8bit_bitmap *)srcAdress));
break;
case CUBIC:
i = new TCubicFInt<px_1x8bit, px_1x8bit>(*((mono_8bit_bitmap *)srcAdress));
break;
default:
break;
}
if (i != NULL) {
retVal = i->resampleTo_aliased(*((mono_8bit_bitmap *)dstAdress), force);
delete i;
}
break;
}
case rgba_8_bit:
{
TFInterpolator<px_4x8bit, px_1x8bit> * i = NULL;
switch ((InterpolatorNativeType)iType) {
case NEAREST_NEIGHBOUR:
i = new TNearestFInt<px_4x8bit, px_1x8bit>(*((rgba_8bit_bitmap *)srcAdress));
break;
case LINEAR:
i = new TLinearFInt<px_4x8bit, px_1x8bit>(*((rgba_8bit_bitmap *)srcAdress));
break;
case CUBIC:
i = new TCubicFInt<px_4x8bit, px_1x8bit>(*((rgba_8bit_bitmap *)srcAdress));
break;
default:
break;
}
if (i != NULL) {
retVal = i->resampleTo_aliased(*((rgba_8bit_bitmap *)dstAdress), force);
delete i;
}
break;
}
default:
retVal = -1;
break;
}
return retVal;
}