mirror of
https://github.com/xdsopl/robot36.git
synced 2026-01-25 09:00:17 +01:00
Removed unused method
This commit is contained in:
parent
34d34f435c
commit
c002d513cb
|
|
@ -3,11 +3,6 @@ package xdsopl.robot36;
|
|||
import android.graphics.Bitmap;
|
||||
|
||||
public abstract class BaseMode implements Mode {
|
||||
@Override
|
||||
public int getEstimatedHorizontalShift() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Bitmap postProcessScopeImage(Bitmap bmp) {
|
||||
return Bitmap.createScaledBitmap(bmp, bmp.getWidth() / 3, bmp.getHeight() / 3, true);
|
||||
|
|
|
|||
|
|
@ -61,30 +61,24 @@ public class HFFax extends BaseMode {
|
|||
return sampleRate / 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEstimatedHorizontalShift() {
|
||||
return horizontalShift;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reset() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Bitmap postProcessScopeImage(Bitmap bmp) {
|
||||
int shift = getEstimatedHorizontalShift();
|
||||
if (shift > 0) {
|
||||
if (horizontalShift > 0) {
|
||||
Bitmap bmpMutable = Bitmap.createBitmap(getWidth(), bmp.getHeight(), Bitmap.Config.ARGB_8888);
|
||||
Canvas canvas = new Canvas(bmpMutable);
|
||||
canvas.drawBitmap(
|
||||
bmp,
|
||||
new Rect(0, 0, shift, bmp.getHeight()),
|
||||
new Rect(getWidth() - shift, 0, getWidth(), bmp.getHeight()),
|
||||
new Rect(0, 0, horizontalShift, bmp.getHeight()),
|
||||
new Rect(getWidth() - horizontalShift, 0, getWidth(), bmp.getHeight()),
|
||||
null);
|
||||
canvas.drawBitmap(
|
||||
bmp,
|
||||
new Rect(shift, 0, getWidth(), bmp.getHeight()),
|
||||
new Rect(0, 1, getWidth() - shift, bmp.getHeight() + 1),
|
||||
new Rect(horizontalShift, 0, getWidth(), bmp.getHeight()),
|
||||
new Rect(0, 1, getWidth() - horizontalShift, bmp.getHeight() + 1),
|
||||
null);
|
||||
|
||||
return bmpMutable;
|
||||
|
|
|
|||
|
|
@ -44,11 +44,6 @@ public interface Mode {
|
|||
*/
|
||||
int getScanLineSamples();
|
||||
|
||||
/**
|
||||
* @return number of pixels of horizontal shift based on recent data, nonzero for HF Fax
|
||||
*/
|
||||
int getEstimatedHorizontalShift();
|
||||
|
||||
/**
|
||||
* Adjust scope image before saving
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue