Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // old school display of frequencies vertical
- if (displayType == 21) {
- fadeAmt = 255;
- double width = c.getWidth() / 8;
- if (visible) {
- for (int n = 0; n < 8; n++) {
- int h = 0;
- for (int i = n * (resolution / 8); i < ((n * resolution / 8) + resolution / 8); i++) {
- if (Math.abs(data[i]) > h) {
- h = Math.abs(data[i]);
- }
- }
- if (n == 0) {
- h = h / 4;
- }
- if (waveColor == 0) {
- p.setColor(Color.argb(255, 0, 255, 255 - 32 * n));
- }
- if (waveColor == 1) {
- p.setColor(Color.argb(255, 255, 255 - 32 * n, 0));
- }
- h = h * 20;
- if (h > c.getHeight() - 10){
- h = c.getHeight() - 10;
- }
- c.drawRect((int) ((n+1) * (width) - width + 1), c.getHeight() - h,
- (int) (((n+1) * width)), (c.getHeight()), p);
- //White blocks on top
- if (boxArray[n] < h){
- boxArray[n] = h;
- }
- int m = boxArray[n];
- c.drawRect((int) ((n+1) * (width) - width + 1), (c.getHeight() - 10) - m,
- (int) (((n+1) * width)), c.getHeight() - m, p);
- if (boxArray[n] > 0){
- boxArray[n] -= 6;
- }
- }
- }
- tempData = data;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement