Index:
[thread]
[date]
[subject]
[author]
From: Marcus Sundberg <mackan@stacken.kth.se>
To : ggi-develop@eskimo.com
Date: Thu, 13 May 1999 19:49:19 +0200
Re: Semi-Snag in PyGGI...
Jim Meier wrote:
> Would it be a reasonable course of action to do something like the following:
> int block_size=(number_of_pixels*actual_pixel_size_in_bytes);
> ggi_pixel p=ggiMapColor(vis, &color);
> ggi_pixel *pixel_buffer=(ggi_pixel*)malloc(block_size);
> ggi_pixel *p=pixel_buffer
> for(i=0;i<number_of_pixels;i++){
> *pixel_buffer=p;
> p+=actual_pixel_size_in_bytes;
> }
>
> I'm thinking there's something wrong with my pointer arithmetic there.. but that's
> a small detail to iron out.
That code won't even compile because you have two declarations of 'p'.
If you tell my exactly what you're trying to achieve I can give you a
working code example.
//Marcus
--
-------------------------------+------------------------------------
Marcus Sundberg | http://www.stacken.kth.se/~mackan
Royal Institute of Technology | Phone: +46 707 295404
Stockholm, Sweden | E-Mail: mackan@stacken.kth.se
Index:
[thread]
[date]
[subject]
[author]