Removed unused method

This commit is contained in:
Marek Ossowski 2025-08-17 00:07:15 +02:00
parent 34d34f435c
commit c002d513cb
3 changed files with 5 additions and 21 deletions

View file

@ -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);

View file

@ -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;

View file

@ -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
*/