/**
* SurfaceHolder.Callback function. This is called every time the dimension changes
* (and after the SurfaceView is created).
*
* @param holder reference to the surface holder
* @param format
* @param width current width of the surface view
* @param height current height of the surface view
*/
@Override
public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
if(this.width != width || this.height != height) {
this.width = width;
this.height = height;
// Recreate the shaders:
this.fftPaint.setShader(new LinearGradient(0, 0, 0, getFftHeight(), Color.WHITE, Color.parseColor(fftColor), Shader.TileMode.MIRROR));
// Recreate the waterfall bitmaps:
this.createWaterfallLineBitmaps();
// Fix the text size of the text paint objects:
this.setFontSize(fontSize);
}
}
AnalyzerSurface.java 文件源码
java
阅读 40
收藏 0
点赞 0
评论 0
项目:AndroidSdrRtlTuner
作者:
评论列表
文章目录