Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const int spectrWidth = 1000;
- const int spectrHeight = 500;
- QPixmap spectrPixmap(spectrWidth, spectrHeight);
- QPainter p(&spectrPixmap);
- for (int ir = 0; ir < spectrHeight; ir++)
- {
- for (int ic = 0; ic < spectrWidth; ic++)
- {
- double data = getDataForCoordinates(ic, ir); // your function
- QColor color = getColorForData(data); // your function
- p.setPen(color);
- p.drawPoint(ic, ir);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement