This snippet defines a field named "rasters" which is an array of bytes:
I personally don't like the c-style syntax rasters[]. I would rather write it as:
which is the same.
The second part
creates a new byte-array ant initializes it on the fly to the given values. e.g.
is the same as:
The numbers used to initialize the array specify a bitmap raster corresponding to the pixels, that form the "f" in your example. The rasters field is later used in the glBitmap() call to blit the "f" to the framebuffer of the graphics card.
| 1 | private byte rasters[]=... |
I personally don't like the c-style syntax rasters[]. I would rather write it as:
| 1 | private byte[] rasters=... |
which is the same.
The second part
| 1 | ...new byte[]{...} |
creates a new byte-array ant initializes it on the fly to the given values. e.g.
| 1 | private byte[] rasters= new byte[]{(byte)4,(byte)7}; |
is the same as:
| 1 2 3 4 | private byte[] rasters= new byte[2]; |
The numbers used to initialize the array specify a bitmap raster corresponding to the pixels, that form the "f" in your example. The rasters field is later used in the glBitmap() call to blit the "f" to the framebuffer of the graphics card.
i glad to see that you reply.
if you know c-style syntax rasters[] , please tell me ,too.
thanks to cylab.



