Hi,
I am using an off-screen context to create an image and then blitting this
image to the screen in a PtRaw widget’s draw function. For some reason, the
image only flashes up momemtarily. If I move the blitting part outside of
the draw function, it works okay.
I am using the following code to create the image:
context = PdCreateOffscreenContext( 0, WIDTH, HEIGHT, 0 );
olddc = PhDCSetCurrent( context );
//draw image
PhDCSetCurrent( olddc );
and the following code to draw the image:
area.pos.x = area.pos.y = 0;
area.size.w = WIDTH;
area.size.h = HEIGHT;
PgContextBiltArea( context, &area, NULL, &area );
PgFlush();
Any ideas why this might be happening?