App
GammaLUTCancelableTool.java
Go to the documentation of this file.
1 package mhr.appcore.tools.cancelable.lut;
2 
3 import android.graphics.Canvas;
4 import mhr.appcore.bitmap.BitmapInfo;
5 import mhr.appcore.bitmap.ChannelCount;
6 import mhr.appcore.bitmap.NBitmap;
7 import mhr.appcore.blending.BlendMode;
8 import mhr.appcore.blending.Blender;
9 import mhr.appcore.image.Image;
10 import mhr.appcore.image.layers.RasterLayer;
11 import mhr.appcore.pointops.LUT;
12 import mhr.appcore.tools.actiondata.BrightnessLUTCancelableToolActionData;
13 import mhr.appcore.tools.actiondata.BrushLikeToolActionData;
14 import mhr.appcore.tools.actiondata.CancelableToolActionData;
15 import mhr.appcore.tools.actiondata.GammaLUTCancelableToolActionData;
16 import mhr.appcore.tools.actiondata.ToolActionData;
17 import mhr.appcore.utils.LinearInt;
18 import mhr.appcore.utils.Rect;
19 
24 
25  //===== INTERFACES, CLASSES, ENUMS ==========================================================================================================//
26  //----- NON-PUBLIC --------------------------------------------------------------------------------------------------------------------------//
27  //----- PUBLIC ------------------------------------------------------------------------------------------------------------------------------//
28 
29  //===== FIELDS ==============================================================================================================================//
30  //----- NON-PUBLIC --------------------------------------------------------------------------------------------------------------------------//
31 
32  //----- PUBLIC ------------------------------------------------------------------------------------------------------------------------------//
33 
34  //===== CONSTRUCTORS, DESTRUCTORS, RELATED METHODS ==========================================================================================//
35  //----- NON-PUBLIC --------------------------------------------------------------------------------------------------------------------------//
36  @Override
37  protected void finalize() throws Throwable {
38  dispose();
39  super.finalize();
40  }
41 
42  //----- PUBLIC ------------------------------------------------------------------------------------------------------------------------------//
44 
45  }
46 
47  @Override
48  public void dispose() {
49  super.dispose();
50  }
51 
52  //===== METHODS =============================================================================================================================//
53  //----- NON-PUBLIC --------------------------------------------------------------------------------------------------------------------------//
54  @Override
55  protected void onPreview(Image img, CancelableToolActionData data) {
56  if (!(data instanceof GammaLUTCancelableToolActionData)) {
57  throw new IllegalArgumentException("Received data for different tool");
58  } else {
59  lut.fillGammaLut(((GammaLUTCancelableToolActionData)data).gamma);
60  }
61  }
62  //----- PUBLIC ------------------------------------------------------------------------------------------------------------------------------//
63 
64  //===== CALLBACKS ===========================================================================================================================//
65 
66  //----- destruktory -------------------------------------------------------------------------------------------------------------------------//
67 
68  //----- metody ------------------------------------------------------------------------------------------------------------------------------//
69 
70 }