Project

General

Profile

« Previous | Next » 

Revision 66466936

Added by Leszek Koltunski over 8 years ago

Fix the 'Fragment3D' app

View differences:

src/main/java/org/distorted/examples/fragment3d/Fragment3DActivity.java
292 292

  
293 293
    setContentView(view);
294 294

  
295
    String[] effects = new String[] { "MACROBLOCK",
296
                                      "ALPHA",
295
    String[] effects = new String[] { "ALPHA",
297 296
                                      "SMOOTH_ALPHA",
298 297
                                      "CHROMA",
299 298
                                      "SMOOTH_CHROMA",
......
322 321

  
323 322
    switch(mEffectAdd)
324 323
      {
325
      case 0 : name = EffectNames.MACROBLOCK       ; break;
326
      case 1 : name = EffectNames.ALPHA            ; break;
327
      case 2 : name = EffectNames.SMOOTH_ALPHA     ; break;
328
      case 3 : name = EffectNames.CHROMA           ; break;
329
      case 4 : name = EffectNames.SMOOTH_CHROMA    ; break;
330
      case 5 : name = EffectNames.BRIGHTNESS       ; break;
331
      case 6 : name = EffectNames.SMOOTH_BRIGHTNESS; break;
332
      case 7 : name = EffectNames.SATURATION       ; break;
333
      case 8 : name = EffectNames.SMOOTH_SATURATION; break;
334
      case 9 : name = EffectNames.CONTRAST         ; break;
335
      case 10: name = EffectNames.SMOOTH_CONTRAST  ; break;
324
      case 0 : name = EffectNames.ALPHA            ; break;
325
      case 1 : name = EffectNames.SMOOTH_ALPHA     ; break;
326
      case 2 : name = EffectNames.CHROMA           ; break;
327
      case 3 : name = EffectNames.SMOOTH_CHROMA    ; break;
328
      case 4 : name = EffectNames.BRIGHTNESS       ; break;
329
      case 5 : name = EffectNames.SMOOTH_BRIGHTNESS; break;
330
      case 6 : name = EffectNames.SATURATION       ; break;
331
      case 7 : name = EffectNames.SMOOTH_SATURATION; break;
332
      case 8 : name = EffectNames.CONTRAST         ; break;
333
      case 9 : name = EffectNames.SMOOTH_CONTRAST  ; break;
336 334
      default: return;
337 335
      }
338 336

  
......
351 349

  
352 350
    switch(mEffectAdd)
353 351
      {
354
      case 0: mObject.macroblock(dyn1,       regi       ); break;
355
      case 1: mObject.alpha     (dyn1,       regi, false); break;
356
      case 2: mObject.alpha     (dyn1,       regi, true ); break;
357
      case 3: mObject.chroma    (dyn1, dyn3, regi, false); break;
358
      case 4: mObject.chroma    (dyn1, dyn3, regi, true ); break;
359
      case 5: mObject.brightness(dyn1,       regi, false); break;
360
      case 6: mObject.brightness(dyn1,       regi, true ); break;
361
      case 7: mObject.saturation(dyn1,       regi, false); break;
362
      case 8: mObject.saturation(dyn1,       regi, true ); break;
363
      case 9: mObject.contrast  (dyn1,       regi, false); break;
364
      case 10:mObject.contrast  (dyn1,       regi, true ); break;
352
      case 0: mObject.alpha     (dyn1,       regi, false); break;
353
      case 1: mObject.alpha     (dyn1,       regi, true ); break;
354
      case 2: mObject.chroma    (dyn1, dyn3, regi, false); break;
355
      case 3: mObject.chroma    (dyn1, dyn3, regi, true ); break;
356
      case 4: mObject.brightness(dyn1,       regi, false); break;
357
      case 5: mObject.brightness(dyn1,       regi, true ); break;
358
      case 6: mObject.saturation(dyn1,       regi, false); break;
359
      case 7: mObject.saturation(dyn1,       regi, true ); break;
360
      case 8: mObject.contrast  (dyn1,       regi, false); break;
361
      case 9: mObject.contrast  (dyn1,       regi, true ); break;
365 362
      }
366 363
    }
367 364

  
src/main/java/org/distorted/examples/fragment3d/Fragment3DEffect.java
101 101
    {
102 102
    switch(mName)
103 103
      {
104
      case MACROBLOCK       : Fragment3DActivity act = mAct.get();
105
                              mSta1.set(mInter[0]*act.getWidth() / 100.0f);
106
                              break;
107 104
      case ALPHA            :
108 105
      case SMOOTH_ALPHA     :
109 106
      case BRIGHTNESS       :
......
129 126
    {
130 127
    switch(mName)
131 128
      {
132
      case MACROBLOCK       : mInter[0] =  3;
133
                              break;
134 129
      case ALPHA            :
135 130
      case SMOOTH_ALPHA     :
136 131
      case BRIGHTNESS       :

Also available in: Unified diff