App

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

- File List
- File Members

mhr_appcore_blending_Blender.cpp
Go to the documentation of this file.
1 #include "mhr_appcore_blending_Blender.hpp"
2 #include "../app/app_all.hpp"
3
4 using namespace app;
5
9 JNIEXPORT jint JNICALL Java_mhr_appcore_blending_Blender_blendTo__IIJJIIIIII(JNIEnv * pEnv, jclass pThisClass, jint nativeType, jint mode, jlong dstAdress, jlong srcAdress,
10 jint srcTlx, jint srcTly, jint srcBrx, jint srcBry, jint srcOrigX, jint srcOrigY) {
11 int retVal = 0;
12 switch ((BitmapNativeType) nativeType) {
13 case rgba_8_bit: {
14 retVal = Blender::blendTo((BlendMode) mode, *((rgba_8bit_bitmap *) dstAdress), *((rgba_8bit_bitmap *) srcAdress), Rect(srcTlx, srcTly, srcBrx, srcBry),
15 Point(srcOrigX, srcOrigY));
16 break;
17 }
18 default:
19 retVal = -1;
20 break;
21 }
22 return retVal;
23 }
24
28 JNIEXPORT jint JNICALL Java_mhr_appcore_blending_Blender_blendTo__IIJJIIIIIID(JNIEnv * pEnv, jclass pThisClass, jint nativeType, jint mode, jlong dstAdress, jlong srcAdress,
29 jint srcTlx, jint srcTly, jint srcBrx, jint srcBry, jint srcOrigX, jint srcOrigY, jdouble alpha) {
30 int retVal = 0;
31 switch ((BitmapNativeType) nativeType) {
32 case rgba_8_bit: {
33 retVal = Blender::blendTo((BlendMode) mode, *((rgba_8bit_bitmap *) dstAdress), *((rgba_8bit_bitmap *) srcAdress), Rect(srcTlx, srcTly, srcBrx, srcBry),
34 Point(srcOrigX, srcOrigY), alpha);
35 break;
36 }
37 default:
38 retVal = -1;
39 break;
40 }
41 return retVal;
42 }
43
44
45
46
47
48
49
50
51
52
53
54
55
59 JNIEXPORT jint JNICALL Java_mhr_appcore_blending_Blender_blendTo__IIJIIIII(JNIEnv * pEnv, jclass pThisClass, jint nativeType, jint mode, jlong dstAdress, jint color, jint dstTlx, jint dstTly, jint dstBrx, jint dstBry) {
60 int retVal = 0;
61 switch ((BitmapNativeType) nativeType) {
62 case rgba_8_bit: {
63 px_4x8bit src = color;
64 retVal = Blender::blendTo((BlendMode) mode, *((rgba_8bit_bitmap *) dstAdress), &src, Rect(dstTlx, dstTly, dstBrx, dstBry));
65 break;
66 }
67 default:
68 retVal = -1;
69 break;
70 }
71 return retVal;
72 }
73
77 JNIEXPORT jint JNICALL Java_mhr_appcore_blending_Blender_blendTo__IIJIIIIID(JNIEnv * pEnv, jclass pThisClass, jint nativeType, jint mode, jlong dstAdress, jint color, jint dstTlx, jint dstTly, jint dstBrx, jint dstBry, jdouble alpha) {
78 int retVal = 0;
79 switch ((BitmapNativeType) nativeType) {
80 case rgba_8_bit: {
81 px_4x8bit src = color;
82 retVal = Blender::blendTo((BlendMode) mode, *((rgba_8bit_bitmap *) dstAdress), &src, Rect(dstTlx, dstTly, dstBrx, dstBry), alpha);
83 break;
84 }
85 default:
86 retVal = -1;
87 break;
88 }
89 return retVal;
90
91 }
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
135 JNIEXPORT jint JNICALL Java_mhr_appcore_blending_Blender_addTo__IJJIIIIII(JNIEnv * pEnv, jclass pThisClass, jint nativeType, jlong dstAdress, jlong srcAdress, jint srcTlx,
136 jint srcTly, jint srcBrx, jint srcBry, jint srcOrigX, jint srcOrigY) {
137 int retVal = 0;
138 switch ((BitmapNativeType) nativeType) {
139 case mono_8_bit: {
140 retVal = Blender::addTo(*((mono_8bit_bitmap *) dstAdress), *((mono_8bit_bitmap *) srcAdress), Rect(srcTlx, srcTly, srcBrx, srcBry), Point(srcOrigX, srcOrigY));
141 break;
142 }
143 default:
144 retVal = -1;
145 break;
146 }
147 return retVal;
148 }
149
153 JNIEXPORT jint JNICALL Java_mhr_appcore_blending_Blender_addTo__IJJIIIIIID(JNIEnv * pEnv, jclass pThisClass, jint nativeType, jlong dstAdress, jlong srcAdress, jint srcTlx,
154 jint srcTly, jint srcBrx, jint srcBry, jint srcOrigX, jint srcOrigY, jdouble alpha) {
155 int retVal = 0;
156 switch ((BitmapNativeType) nativeType) {
157 case mono_8_bit: {
158 retVal = Blender::addTo(*((mono_8bit_bitmap *) dstAdress), *((mono_8bit_bitmap *) srcAdress), Rect(srcTlx, srcTly, srcBrx, srcBry), Point(srcOrigX, srcOrigY), alpha);
159 break;
160 }
161 default:
162 retVal = -1;
163 break;
164 }
165 return retVal;
166 }
167
171 JNIEXPORT jint JNICALL Java_mhr_appcore_blending_Blender_addTo__IJJJIIIIIIII(JNIEnv * pEnv, jclass pThisClass, jint nativeType, jlong dstAdress, jlong mskAdress, jlong srcAdress,
172 jint mskTlx, jint mskTly, jint mskBrx, jint mskBry, jint srcOrigX, jint srcOrigY, jint mskOrigX, jint mskOrigY) {
173 int retVal = 0;
174 switch ((BitmapNativeType) nativeType) {
175 case mono_8_bit: {
176 retVal = Blender::addTo(*((mono_8bit_bitmap *) dstAdress), *((mono_8bit_bitmap *) mskAdress), *((mono_8bit_bitmap *) srcAdress), Rect(mskTlx, mskTly, mskBrx, mskBry),
177 Point(srcOrigX, srcOrigY), Point(mskOrigX, mskOrigY));
178 break;
179 }
180 default:
181 retVal = -1;
182 break;
183 }
184 return retVal;
185 }
186
190 JNIEXPORT jint JNICALL Java_mhr_appcore_blending_Blender_addTo__IJJJIIIIIIIID(JNIEnv * pEnv, jclass pClass, jint nativeType, jlong dstAdress, jlong mskAdress, jlong srcAdress,
191 jint mskTlx, jint mskTly, jint mskBrx, jint mskBry, jint srcOrigX, jint srcOrigY, jint mskOrigX, jint mskOrigY, jdouble alpha) {
192 int retVal = 0;
193 switch ((BitmapNativeType) nativeType) {
194 case mono_8_bit: {
195 retVal = Blender::addTo(*((mono_8bit_bitmap *) dstAdress), *((mono_8bit_bitmap *) mskAdress), *((mono_8bit_bitmap *) srcAdress), Rect(mskTlx, mskTly, mskBrx, mskBry),
196 Point(srcOrigX, srcOrigY), Point(mskOrigX, mskOrigY), alpha);
197 break;
198 }
199 default:
200 retVal = -1;
201 break;
202 }
203 return retVal;
204 }
205
209 JNIEXPORT jint JNICALL Java_mhr_appcore_blending_Blender_removeFrom__IJJIIIIII(JNIEnv * pEnv, jclass pThisClass, jint nativeType, jlong dstAdress, jlong srcAdress, jint srcTlx,
210 jint srcTly, jint srcBrx, jint srcBry, jint srcOrigX, jint srcOrigY) {
211 int retVal = 0;
212 switch ((BitmapNativeType) nativeType) {
213 case mono_8_bit: {
214 retVal = Blender::removeFrom(*((mono_8bit_bitmap *) dstAdress), *((mono_8bit_bitmap *) srcAdress), Rect(srcTlx, srcTly, srcBrx, srcBry), Point(srcOrigX, srcOrigY));
215 break;
216 }
217 default:
218 retVal = -1;
219 break;
220 }
221 return retVal;
222 }
223
227 JNIEXPORT jint JNICALL Java_mhr_appcore_blending_Blender_removeFrom__IJJIIIIIID(JNIEnv * pEnv, jclass pThisClass, jint nativeType, jlong dstAdress, jlong srcAdress, jint srcTlx,
228 jint srcTly, jint srcBrx, jint srcBry, jint srcOrigX, jint srcOrigY, jdouble alpha) {
229 int retVal = 0;
230 switch ((BitmapNativeType) nativeType) {
231 case mono_8_bit: {
232 retVal = Blender::removeFrom(*((mono_8bit_bitmap *) dstAdress), *((mono_8bit_bitmap *) srcAdress), Rect(srcTlx, srcTly, srcBrx, srcBry), Point(srcOrigX, srcOrigY), alpha);
233 break;
234 }
235 default:
236 retVal = -1;
237 break;
238 }
239 return retVal;
240 }
241
245 JNIEXPORT jint JNICALL Java_mhr_appcore_blending_Blender_removeFrom__IJJJIIIIIIII(JNIEnv * pEnv, jclass pThisClass, jint nativeType, jlong dstAdress, jlong mskAdress,
246 jlong srcAdress, jint mskTlx, jint mskTly, jint mskBrx, jint mskBry, jint srcOrigX, jint srcOrigY, jint mskOrigX, jint mskOrigY) {
247 int retVal = 0;
248 switch ((BitmapNativeType) nativeType) {
249 case mono_8_bit: {
250 retVal = Blender::removeFrom(*((mono_8bit_bitmap *) dstAdress), *((mono_8bit_bitmap *) mskAdress), *((mono_8bit_bitmap *) srcAdress), Rect(mskTlx, mskTly, mskBrx, mskBry),
251 Point(srcOrigX, srcOrigY), Point(mskOrigX, mskOrigY));
252 break;
253 }
254 default:
255 retVal = -1;
256 break;
257 }
258 return retVal;
259 }
260
264 JNIEXPORT jint JNICALL Java_mhr_appcore_blending_Blender_removeFrom__IJJJIIIIIIIID(JNIEnv * pEnv, jclass pClass, jint nativeType, jlong dstAdress, jlong mskAdress, jlong srcAdress,
265 jint mskTlx, jint mskTly, jint mskBrx, jint mskBry, jint srcOrigX, jint srcOrigY, jint mskOrigX, jint mskOrigY, jdouble alpha) {
266 int retVal = 0;
267 switch ((BitmapNativeType) nativeType) {
268 case mono_8_bit: {
269 retVal = Blender::removeFrom(*((mono_8bit_bitmap *) dstAdress), *((mono_8bit_bitmap *) mskAdress), *((mono_8bit_bitmap *) srcAdress), Rect(mskTlx, mskTly, mskBrx, mskBry),
270 Point(srcOrigX, srcOrigY), Point(mskOrigX, mskOrigY), alpha);
271 break;
272 }
273 default:
274 retVal = -1;
275 break;
276 }
277 return retVal;
278 }
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
302 JNIEXPORT jint JNICALL Java_mhr_appcore_blending_Blender_addTo4ch__IJJIIIIII(JNIEnv * pEnv, jclass pThisClass, jint nativeType, jlong dstAdress, jlong srcAdress, jint srcTlx,
303 jint srcTly, jint srcBrx, jint srcBry, jint srcOrigX, jint srcOrigY) {
304 int retVal = 0;
305 switch ((BitmapNativeType) nativeType) {
306 case mono_8_bit: {
307 retVal = Blender::addTo(*((rgba_8bit_bitmap *) dstAdress), *((mono_8bit_bitmap *) srcAdress), Rect(srcTlx, srcTly, srcBrx, srcBry), Point(srcOrigX, srcOrigY));
308 break;
309 }
310 default:
311 retVal = -1;
312 break;
313 }
314 return retVal;
315 }
316
320 JNIEXPORT jint JNICALL Java_mhr_appcore_blending_Blender_addTo4ch__IJJIIIIIID(JNIEnv * pEnv, jclass pThisClass, jint nativeType, jlong dstAdress, jlong srcAdress, jint srcTlx,
321 jint srcTly, jint srcBrx, jint srcBry, jint srcOrigX, jint srcOrigY, jdouble alpha) {
322 int retVal = 0;
323 switch ((BitmapNativeType) nativeType) {
324 case mono_8_bit: {
325 retVal = Blender::addTo(*((rgba_8bit_bitmap *) dstAdress), *((mono_8bit_bitmap *) srcAdress), Rect(srcTlx, srcTly, srcBrx, srcBry), Point(srcOrigX, srcOrigY), alpha);
326 break;
327 }
328 default:
329 retVal = -1;
330 break;
331 }
332 return retVal;
333 }
334
338 JNIEXPORT jint JNICALL Java_mhr_appcore_blending_Blender_addTo4ch__IJJJIIIIIIII(JNIEnv * pEnv, jclass pThisClass, jint nativeType, jlong dstAdress, jlong mskAdress,
339 jlong srcAdress, jint mskTlx, jint mskTly, jint mskBrx, jint mskBry, jint srcOrigX, jint srcOrigY, jint mskOrigX, jint mskOrigY) {
340 int retVal = 0;
341 switch ((BitmapNativeType) nativeType) {
342 case mono_8_bit: {
343 retVal = Blender::addTo(*((rgba_8bit_bitmap *) dstAdress), *((mono_8bit_bitmap *) mskAdress), *((mono_8bit_bitmap *) srcAdress), Rect(mskTlx, mskTly, mskBrx, mskBry),
344 Point(srcOrigX, srcOrigY), Point(mskOrigX, mskOrigY));
345 break;
346 }
347 default:
348 retVal = -1;
349 break;
350 }
351 return retVal;
352 }
353
357 JNIEXPORT jint JNICALL Java_mhr_appcore_blending_Blender_addTo4ch__IJJJIIIIIIIID(JNIEnv * pEnv, jclass pClass, jint nativeType, jlong dstAdress, jlong mskAdress, jlong srcAdress,
358 jint mskTlx, jint mskTly, jint mskBrx, jint mskBry, jint srcOrigX, jint srcOrigY, jint mskOrigX, jint mskOrigY, jdouble alpha) {
359 int retVal = 0;
360 switch ((BitmapNativeType) nativeType) {
361 case mono_8_bit: {
362 retVal = Blender::addTo(*((rgba_8bit_bitmap *) dstAdress), *((mono_8bit_bitmap *) mskAdress), *((mono_8bit_bitmap *) srcAdress), Rect(mskTlx, mskTly, mskBrx, mskBry),
363 Point(srcOrigX, srcOrigY), Point(mskOrigX, mskOrigY), alpha);
364 break;
365 }
366 default:
367 retVal = -1;
368 break;
369 }
370 return retVal;
371 }
372
376 JNIEXPORT jint JNICALL Java_mhr_appcore_blending_Blender_removeFrom4ch__IJJIIIIII(JNIEnv * pEnv, jclass pThisClass, jint nativeType, jlong dstAdress, jlong srcAdress, jint srcTlx,
377 jint srcTly, jint srcBrx, jint srcBry, jint srcOrigX, jint srcOrigY) {
378 int retVal = 0;
379 switch ((BitmapNativeType) nativeType) {
380 case mono_8_bit: {
381 retVal = Blender::removeFrom(*((rgba_8bit_bitmap *) dstAdress), *((mono_8bit_bitmap *) srcAdress), Rect(srcTlx, srcTly, srcBrx, srcBry), Point(srcOrigX, srcOrigY));
382 break;
383 }
384 default:
385 retVal = -1;
386 break;
387 }
388 return retVal;
389 }
390
394 JNIEXPORT jint JNICALL Java_mhr_appcore_blending_Blender_removeFrom4ch__IJJIIIIIID(JNIEnv * pEnv, jclass pThisClass, jint nativeType, jlong dstAdress, jlong srcAdress, jint srcTlx,
395 jint srcTly, jint srcBrx, jint srcBry, jint srcOrigX, jint srcOrigY, jdouble alpha) {
396 int retVal = 0;
397 switch ((BitmapNativeType) nativeType) {
398 case mono_8_bit: {
399 retVal = Blender::removeFrom(*((rgba_8bit_bitmap *) dstAdress), *((mono_8bit_bitmap *) srcAdress), Rect(srcTlx, srcTly, srcBrx, srcBry), Point(srcOrigX, srcOrigY), alpha);
400 break;
401 }
402 default:
403 retVal = -1;
404 break;
405 }
406 return retVal;
407 }
408
412 JNIEXPORT jint JNICALL Java_mhr_appcore_blending_Blender_removeFrom4ch__IJJJIIIIIIII(JNIEnv * pEnv, jclass pThisClass, jint nativeType, jlong dstAdress, jlong mskAdress,
413 jlong srcAdress, jint mskTlx, jint mskTly, jint mskBrx, jint mskBry, jint srcOrigX, jint srcOrigY, jint mskOrigX, jint mskOrigY) {
414 int retVal = 0;
415 switch ((BitmapNativeType) nativeType) {
416 case mono_8_bit: {
417 retVal = Blender::removeFrom(*((rgba_8bit_bitmap *) dstAdress), *((mono_8bit_bitmap *) mskAdress), *((mono_8bit_bitmap *) srcAdress), Rect(mskTlx, mskTly, mskBrx, mskBry),
418 Point(srcOrigX, srcOrigY), Point(mskOrigX, mskOrigY));
419 break;
420 }
421 default:
422 retVal = -1;
423 break;
424 }
425 return retVal;
426 }
427
431 JNIEXPORT jint JNICALL Java_mhr_appcore_blending_Blender_removeFrom4ch__IJJJIIIIIIIID(JNIEnv * pEnv, jclass pClass, jint nativeType, jlong dstAdress, jlong mskAdress,
432 jlong srcAdress, jint mskTlx, jint mskTly, jint mskBrx, jint mskBry, jint srcOrigX, jint srcOrigY, jint mskOrigX, jint mskOrigY, jdouble alpha) {
433 int retVal = 0;
434 switch ((BitmapNativeType) nativeType) {
435 case mono_8_bit: {
436 retVal = Blender::removeFrom(*((rgba_8bit_bitmap *) dstAdress), *((mono_8bit_bitmap *) mskAdress), *((mono_8bit_bitmap *) srcAdress), Rect(mskTlx, mskTly, mskBrx, mskBry),
437 Point(srcOrigX, srcOrigY), Point(mskOrigX, mskOrigY), alpha);
438 break;
439 }
440 default:
441 retVal = -1;
442 break;
443 }
444 return retVal;
445 }
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
474 JNIEXPORT jint JNICALL Java_mhr_appcore_blending_Blender_drawTo__IIJJIIIIIII(JNIEnv * pEnv, jclass pClass, jint nativeType, jint mode, jlong dstAdress, jlong mskAdress, jint color,
475 jint mskTlx, jint mskTly, jint mskBrx, jint mskBry, jint mskOrigX, jint mskOrigY) {
476 int retVal = 0;
477 switch ((BitmapNativeType) nativeType) {
478 case rgba_8_bit: {
479 px_4x8bit src = color;
480 retVal = Blender::drawTo((BlendMode) mode, *((rgba_8bit_bitmap *) dstAdress), *((mono_8bit_bitmap *) mskAdress), &src, Rect(mskTlx, mskTly, mskBrx, mskBry),
481 Point(mskOrigX, mskOrigY));
482 break;
483 }
484 default:
485 retVal = -1;
486 break;
487 }
488 return retVal;
489 }
490
494 JNIEXPORT jint JNICALL Java_mhr_appcore_blending_Blender_drawTo__IIJJIIIIIIID(JNIEnv * pEnv, jclass pClass, jint nativeType, jint mode, jlong dstAdress, jlong mskAdress,
495 jint color, jint mskTlx, jint mskTly, jint mskBrx, jint mskBry, jint mskOrigX, jint mskOrigY, jdouble alpha) {
496 int retVal = 0;
497 switch ((BitmapNativeType) nativeType) {
498 case rgba_8_bit: {
499 px_4x8bit src = color;
500 retVal = Blender::drawTo((BlendMode) mode, *((rgba_8bit_bitmap *) dstAdress), *((mono_8bit_bitmap *) mskAdress), &src, Rect(mskTlx, mskTly, mskBrx, mskBry),
501 Point(mskOrigX, mskOrigY), alpha);
502 break;
503 }
504 default:
505 retVal = -1;
506 break;
507 }
508 return retVal;
509 }
510
514 JNIEXPORT jint JNICALL Java_mhr_appcore_blending_Blender_drawTo__IIJJJIIIIIIII(JNIEnv * pEnv, jclass pClass, jint nativeType, jint mode, jlong dstAdress, jlong mskAdress,
515 jlong srcAdress, jint mskTlx, jint mskTly, jint mskBrx, jint mskBry, jint srcOrigX, jint srcOrigY, jint mskOrigX, jint mskOrigY) {
516 int retVal = 0;
517 switch ((BitmapNativeType) nativeType) {
518 case rgba_8_bit: {
519 retVal = Blender::drawTo((BlendMode) mode, *((rgba_8bit_bitmap *) dstAdress), *((mono_8bit_bitmap *) mskAdress), *((rgba_8bit_bitmap *) srcAdress),
520 Rect(mskTlx, mskTly, mskBrx, mskBry), Point(srcOrigX, srcOrigY), Point(mskOrigX, mskOrigY));
521 break;
522 }
523 default:
524 retVal = -1;
525 break;
526 }
527 return retVal;
528 }
529
533 JNIEXPORT jint JNICALL Java_mhr_appcore_blending_Blender_drawTo__IIJJJIIIIIIIID(JNIEnv * pEnv, jclass pClass, jint nativeType, jint mode, jlong dstAdress, jlong mskAdress,
534 jlong srcAdress, jint mskTlx, jint mskTly, jint mskBrx, jint mskBry, jint srcOrigX, jint srcOrigY, jint mskOrigX, jint mskOrigY, jdouble alpha) {
535 int retVal = 0;
536 switch ((BitmapNativeType) nativeType) {
537 case rgba_8_bit: {
538 retVal = Blender::drawTo((BlendMode) mode, *((rgba_8bit_bitmap *) dstAdress), *((mono_8bit_bitmap *) mskAdress), *((rgba_8bit_bitmap *) srcAdress),
539 Rect(mskTlx, mskTly, mskBrx, mskBry), Point(srcOrigX, srcOrigY), Point(mskOrigX, mskOrigY), alpha);
540 break;
541 }
542 default:
543 retVal = -1;
544 break;
545 }
546 return retVal;
547 }