mirror of
https://github.com/xdsopl/robot36.git
synced 2026-01-02 22:50:01 +01:00
added manual adjustment of blur
This commit is contained in:
parent
5c85f130b1
commit
48deba6305
|
|
@ -124,6 +124,16 @@ public class ImageView extends SurfaceView implements SurfaceHolder.Callback {
|
|||
|
||||
thread.start();
|
||||
}
|
||||
void softer_image() {
|
||||
synchronized (thread) {
|
||||
rsDecoder.invoke_incr_blur();
|
||||
}
|
||||
}
|
||||
void sharper_image() {
|
||||
synchronized (thread) {
|
||||
rsDecoder.invoke_decr_blur();
|
||||
}
|
||||
}
|
||||
void debug_sync() {
|
||||
synchronized (thread) {
|
||||
rsDecoder.invoke_debug_sync();
|
||||
|
|
|
|||
|
|
@ -61,6 +61,12 @@ public class MainActivity extends Activity {
|
|||
|
||||
//noinspection SimplifiableIfStatement
|
||||
switch (id) {
|
||||
case R.id.action_softer_image:
|
||||
view.softer_image();
|
||||
return true;
|
||||
case R.id.action_sharper_image:
|
||||
view.sharper_image();
|
||||
return true;
|
||||
case R.id.action_robot36_mode:
|
||||
view.robot36_mode();
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools" tools:context=".MainActivity">
|
||||
|
||||
<item android:id="@+id/action_softer_image" android:title="@string/action_softer_image"
|
||||
android:orderInCategory="100" android:showAsAction="never" />
|
||||
<item android:id="@+id/action_sharper_image" android:title="@string/action_sharper_image"
|
||||
android:orderInCategory="100" android:showAsAction="never" />
|
||||
<item android:id="@+id/action_robot36_mode" android:title="@string/action_robot36_mode"
|
||||
android:orderInCategory="100" android:showAsAction="never" />
|
||||
<item android:id="@+id/action_robot72_mode" android:title="@string/action_robot72_mode"
|
||||
|
|
|
|||
|
|
@ -14,5 +14,7 @@
|
|||
<string name="action_scottie2_mode">Scottie2 Mode</string>
|
||||
<string name="action_scottieDX_mode">ScottieDX Mode</string>
|
||||
<string name="action_wrasseSC2_180_mode">WrasseSC2-180 Mode</string>
|
||||
<string name="action_softer_image">Softer Image</string>
|
||||
<string name="action_sharper_image">Sharper Image</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -19,6 +19,16 @@ limitations under the License.
|
|||
|
||||
#include "exports.rsh"
|
||||
|
||||
void incr_blur()
|
||||
{
|
||||
blur_power = blur_power < 6 ? blur_power + 1 : blur_power;
|
||||
}
|
||||
|
||||
void decr_blur()
|
||||
{
|
||||
blur_power = blur_power >= 0 ? blur_power - 1 : blur_power;
|
||||
}
|
||||
|
||||
/* used the following code generator:
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
|
|
|
|||
Loading…
Reference in a new issue