image jumping canvases

BlitzMax Forums/MaxGUI Module/image jumping canvases

gameshastra(Posted 2007) [#1]
Hi,
I am creating multiple canvases. At some times an image drawing in one canvas is jumping to another canvas.
All help appreciated

Regards
jayaprada


fredborg(Posted 2007) [#2]
Hi,

Before starting drawing on a canvas use:

SetGraphics CanvasGraphics( thisCanvas )

And when you are finished drawing use:

Flip()

That should fix your problem...If I understand the question correctly.


gameshastra(Posted 2007) [#3]
The problem is if I have two canvases like below

.............
: :
:Hello :
:...........:


............
: :
:Hello :
:..........:

The Hello I am trying to draw in one canvas but it appears in another canvas also simultaneously.The canvases are spaced apart and not overlapping
Before any draw I am Disabling first canvas and Enabling second canvas using EnableGadget and DisableGadget subnsequently using SetGraphics(CanvasGraphics(second canvas)) and then drawing to the second canvas and vice versa when trying to draw to the first canvas.
In another case the object I am trying to draw in the left top of one canvas jumps to the left top of another canvas.This happens when I have overlap in canvas objects but using the same sequence of commands specified above.
i am not able to get the correct way of working with the canvas objects


All help appreciated

Regards,
Ramesh


skidracer(Posted 2007) [#4]
In OpenGL you may be able to render partially but I don't think the DirectX driver will support changing the context without a flip.

You could possibly add a small GrabImage to flush the queue which may fix your problem also...

Why are you disabling the gadgets?