mirror of
https://github.com/xdsopl/robot36.git
synced 2025-12-06 07:12:07 +01:00
reduce black borders with split screens
This commit is contained in:
parent
23471b4246
commit
21ac7ea2f5
|
|
@ -584,12 +584,15 @@ public class MainActivity extends AppCompatActivity {
|
|||
}
|
||||
|
||||
private void createScope(Configuration config) {
|
||||
int width = scopeBuffer.width;
|
||||
int height = scopeBuffer.height / 2;
|
||||
int screenWidthDp = config.screenWidthDp;
|
||||
int screenHeightDp = config.screenHeightDp;
|
||||
int freqPlotHeightDp = 64;
|
||||
if (config.orientation == Configuration.ORIENTATION_LANDSCAPE)
|
||||
height /= 2;
|
||||
screenWidthDp /= 2;
|
||||
else
|
||||
height = Math.min(Math.max((width * (config.screenHeightDp - 101)) / config.screenWidthDp, height / 2), height);
|
||||
screenHeightDp -= freqPlotHeightDp;
|
||||
int width = scopeBuffer.width;
|
||||
int height = Math.min(Math.max((width * screenHeightDp) / screenWidthDp, 496), scopeBuffer.height / 2);
|
||||
scopeBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
|
||||
int stride = scopeBuffer.width;
|
||||
int offset = stride * (scopeBuffer.line + scopeBuffer.height / 2 - height);
|
||||
|
|
|
|||
Loading…
Reference in a new issue