Revision b1e91f2c
Added by Leszek Koltunski about 8 years ago
src/main/java/org/distorted/library/DistortedObject.java | ||
---|---|---|
881 | 881 |
* |
882 | 882 |
* @param t 1-dimensional Interpolator that returns the level of blend a given pixel will be |
883 | 883 |
* mixed with the next parameter 'color': pixel = (1-level)*pixel + level*color |
884 |
* @param color Color to mix.
|
|
884 |
* @param color Color to mix. (1,0,0) is RED.
|
|
885 | 885 |
* @param region Region this Effect is limited to. |
886 | 886 |
* Null here means 'apply the Effect to the whole Bitmap'. |
887 | 887 |
* @param i 2-dimensional Interpolator which, at any given time, returns a Float2D representing |
... | ... | |
901 | 901 |
* |
902 | 902 |
* @param t 1-dimensional Interpolator that returns the level of blend a given pixel will be |
903 | 903 |
* mixed with the next parameter 'color': pixel = (1-level)*pixel + level*color |
904 |
* @param color Color to mix.
|
|
904 |
* @param color Color to mix. (1,0,0) is RED.
|
|
905 | 905 |
* @param region Region this Effect is limited to. |
906 | 906 |
* Null here means 'apply the Effect to the whole Bitmap'. |
907 | 907 |
* @param point Center of the Effect. |
... | ... | |
918 | 918 |
* |
919 | 919 |
* @param t Level of blend a given pixel will be mixed with the next parameter 'color': |
920 | 920 |
* pixel = (1-t)*pixel + t*color |
921 |
* @param color Color to mix.
|
|
921 |
* @param color Color to mix. (1,0,0) is RED.
|
|
922 | 922 |
* @param region Region this Effect is limited to. |
923 | 923 |
* Null here means 'apply the Effect to the whole Bitmap'. |
924 | 924 |
* @param i 2-dimensional Interpolator which, at any given time, returns a Float2D representing the |
... | ... | |
938 | 938 |
* |
939 | 939 |
* @param t Level of blend a given pixel will be mixed with the next parameter 'color': |
940 | 940 |
* pixel = (1-t)*pixel + t*color |
941 |
* @param color Color to mix.
|
|
941 |
* @param color Color to mix. (1,0,0) is RED.
|
|
942 | 942 |
* @param region The Region this Effect is limited to. |
943 | 943 |
* Null here means 'apply the Effect to the whole Bitmap'. |
944 | 944 |
* @param point Center of the Effect. |
... | ... | |
957 | 957 |
* |
958 | 958 |
* @param t Level of blend a given pixel will be mixed with the next parameter 'color': |
959 | 959 |
* pixel = (1-t)*pixel + t*color |
960 |
* @param color Color to mix.
|
|
960 |
* @param color Color to mix. (1,0,0) is RED.
|
|
961 | 961 |
* @return ID of the effect added, or -1 if we failed to add one. |
962 | 962 |
*/ |
963 | 963 |
public long chroma(float t, Float3D color) |
... | ... | |
2412 | 2412 |
* @param region Region that masks the effect of the Swirl. |
2413 | 2413 |
* @param point 2-dimensional Interpolator that, at any given time, returns a Point2D representing |
2414 | 2414 |
* the Center of the Effect. |
2415 |
* @param duration Time, in milliseconds, it takes to do one full interpolation. |
|
2416 |
* @param count Controls how many interpolations we want to do. See {@link Interpolator#setCount(float)} |
|
2417 |
* @return ID of the effect added, or -1 if we failed to add one. |
|
2415 |
* @return ID of the effect added, or -1 if we failed to add one. |
|
2418 | 2416 |
*/ |
2419 |
public long swirl(int degree, Float4D region, Interpolator2D point, int duration, float count)
|
|
2417 |
public long swirl(int degree, Float4D region, Interpolator2D point) |
|
2420 | 2418 |
{ |
2421 |
Interpolator1D di = new Interpolator1D();
|
|
2422 |
di.setCount(count);
|
|
2423 |
di.setDuration(duration);
|
|
2419 |
Interpolator1D di = new Interpolator1D(); |
|
2420 |
di.setCount(0.5f);
|
|
2421 |
di.setDuration(0);
|
|
2424 | 2422 |
di.add(new Float1D(0)); |
2425 | 2423 |
di.add(new Float1D(degree)); |
2426 | 2424 |
|
Also available in: Unified diff
Improce the 'Check' App.