Page 2 of 2

Posted: Fri Oct 31, 2003 6:36 pm
by blueznl
> Ok, as pointed by Danilo on IRC, painting directly on the Window
> is bad as the debugger erase it... Use an ImageGadget() to get
> a refresh persistent image...

i agree with you that painting on the window might not be the wisest thing to do, but that doesn't explain the strange behaviour

1. it works when done indirectly (not to the screen)
2. it works when the debugger is off
3. it works if those unneccesary lines are added
4. bitblit works anyway

and, if i understood correctly, drawing directly to the screen is acceptable, there's simply no guarantee it stays visible

personally, i think there's something weird with the debugger... i mean, using an imagegadget is, on a low level, a call to bitblt as well, isn't it?

Posted: Fri Oct 31, 2003 9:46 pm
by geoff
fsw wrote:But if anybody has a faster way to do it, please let me know.
blade wrote:BitBlt perhaps is meant for large screen area...
For single pixel I'd use peeks/pokes.
Yes, it is slow because of all the baggage of calling an API function.
You don't want to do this for every pixel of a bitmap.

Better to move memory values or array elements.

My code, using array elements rotates an image of this size in a small fraction of a second.
You can restore the image to a Windows bitmap by using a single API call.