I am trying to use the PmMem funcs. to draw a square pixel by pixel,
then display the whole image when it’s complete. I tried to follow the
steps exactly as described in the Programmer’s Guide and the Library
Reference, but I keep getting a memory fault when I run the program,
even though I get no compiler errors.
Here is the code I’ve written:
int success, i, j ;
PmMemoryContext_t *mc ;
PhImage_t *image ;
PhDim_t *dim ;
typedef struct Ph_point {
short x, y;
} PhPoint_t ;
I am very new to this application, so if anyone sees what I’m going
wrong or can help explain how I should do this, I’d be very appreciative
of the help.
I am trying to use the PmMem funcs. to draw a square pixel by pixel,
then display the whole image when it’s complete. I tried to follow the
steps exactly as described in the Programmer’s Guide and the Library
Reference, but I keep getting a memory fault when I run the program,
even though I get no compiler errors.
Here is the code I’ve written:
int success, i, j ;
PmMemoryContext_t *mc ;
PhImage_t *image ;
PhDim_t *dim ;
unitialized pointer, probably pointing to NULL
typedef struct Ph_point {
short x, y;
} PhPoint_t ;
I am very new to this application, so if anyone sees what I’m going
wrong or can help explain how I should do this, I’d be very appreciative
of the help.