author | viric@llimona |
Mon, 22 Jan 2007 00:45:57 +0100 | |
changeset 76 | 9cbf4c7e7986 |
permissions | -rw-r--r-- |
76 | 1 |
#include "FloatPlane.h" |
2 |
||
3 |
int main() |
|
4 |
{ |
|
5 |
FloatPlane a; |
|
6 |
||
7 |
a.allocate(100,100); |
|
8 |
||
9 |
float *p = a.getPtr(); |
|
10 |
unsigned int w = a.getWidth(); |
|
11 |
||
12 |
for(int j=0; j < 100; j++) |
|
13 |
for(int i=0; i < 100; i++) |
|
14 |
p[j*w + i] = (float) ((i+j) % 255); |
|
15 |
||
16 |
a.writePGM("prova.pgm"); |
|
17 |
||
18 |
a.free(); |
|
19 |
} |