> 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?
Speed of Image manipulation
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
fsw wrote:But if anybody has a faster way to do it, please let me know.
Yes, it is slow because of all the baggage of calling an API function.blade wrote:BitBlt perhaps is meant for large screen area...
For single pixel I'd use peeks/pokes.
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.

