~ubuntu-branches/ubuntu/hoary/kdemultimedia/hoary

« back to all changes in this revision

Viewing changes to noatun/noatun/modules/winskin/spectrumImage.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Schulze
  • Date: 2003-01-22 15:00:51 UTC
  • Revision ID: james.westby@ubuntu.com-20030122150051-uihwkdoxf15mi1tn
Tags: upstream-2.2.2
ImportĀ upstreamĀ versionĀ 2.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  creates an image of the spectrum analyser peaks
 
3
  Copyright (C) 1998  Martin Vogt
 
4
 
 
5
  This program is free software; you can redistribute it and/or modify
 
6
  it under the terms of the GNU General Public License as published by
 
7
  the Free Software Foundation.
 
8
 
 
9
  For more information look at the file COPYRIGHT in this package
 
10
 
 
11
 */
 
12
 
 
13
 
 
14
 
 
15
#ifndef __SPECTRUMIMAGE_H
 
16
#define __SPECTRUMIMAGE_H
 
17
 
 
18
#include <iostream.h>
 
19
#include <qpixmap.h> 
 
20
#include <qpainter.h> 
 
21
 
 
22
 
 
23
/*
 
24
  This class creates an image in which each column
 
25
  represent a spectrum analyser peak with.
 
26
  A 100%peak is a smooth color gradient from green-yellow-red.
 
27
  The 99% peak is the 100 percent peak shifted to left with a
 
28
  black pixel on the right.
 
29
  And so on.
 
30
 
 
31
  A spectrum drawer can access the resulting image very fast.
 
32
 
 
33
  The class has 101 entries. Each column has <width> RGB elements.
 
34
  the 0th entry is the 100% peak the 100th entry is black.
 
35
 
 
36
 
 
37
 
 
38
*/
 
39
 
 
40
 
 
41
class SpectrumImage {
 
42
  
 
43
  QPixmap* qPixmap;
 
44
  int height;
 
45
  int width;
 
46
 
 
47
 public:
 
48
  SpectrumImage(int height, int width);
 
49
  ~SpectrumImage();
 
50
 
 
51
  QPixmap* getPixmap();
 
52
  int getHeight();
 
53
  void fillImage(float *data);
 
54
 
 
55
};
 
56
 
 
57
 
 
58
#endif