App

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

- File List
- File Members

mhr_appcore_generators_BrushGenerator.cpp
Go to the documentation of this file.
1 #include "mhr_appcore_generators_BrushGenerator.hpp"
2 #include "../app/app_all.hpp"
3
4 using namespace app;
5
9 JNIEXPORT jlong JNICALL Java_mhr_appcore_generators_BrushGenerator_createRoundBrush(JNIEnv * pEnv, jclass pThisClass, jint nativeType, jint size, jdouble hardness) {
10 void * vPtr = NULL;
11 switch ((BitmapNativeType) nativeType) {
12 case mono_8_bit:
13 vPtr = TBrushGenerator::createRoundBrush<px_1x8bit, px_1x8bit>(size, hardness);
14 if (vPtr == NULL) {
15 return 0;
16 }
17 // Alokaci dat si hlida TBrushGenerator
18 break;
19 default:
20 break;
21 }
22 return (long long) vPtr;
23 }
24
28 JNIEXPORT jint JNICALL Java_mhr_appcore_generators_BrushGenerator_createRoundBrushIn(JNIEnv * pEnv, jclass pThisClass, jint nativeType, jlong dstAdress, jint size, jdouble hardness) {
29 int retVal = 0;
30 switch ((BitmapNativeType) nativeType) {
31 case mono_8_bit: {
32 retVal = TBrushGenerator::createRoundBrushIn(*(mono_8bit_bitmap *)dstAdress, size, hardness);
33 break;
34 }
35 default:
36 retVal = -1;
37 break;
38 }
39 return retVal;
40 }