Need help with graphics redrawing dilemma....

PaulR

Active Member
Licensed User
Longtime User
Hi... I have an issue with a graphical control I am writing.

The control has a couple of backgrounds shapes and a waveform display, calculated by going through a byte array, on top of those.

On top of those three are a couple of cursors which I need to update regularly.

My question is,

1. How to I redraw the cursors without having to Invalidate everything in that area?

2. If this is not possible, what would the most efficient way of redrawing the waveform. For example, is it possible to draw into a temporary bitmap?

Cheers

Paul
 

PaulR

Active Member
Licensed User
Longtime User
Thanks for that, I had actually tried that but wasn't having any success. The secret turned out to be drawing a transparent rect over the areas that had been drawn on in the top view to delete what had been there before.

:sign0161:
 
Upvote 0

PaulR

Active Member
Licensed User
Longtime User
No, I hadn't until now.

What distracted me was the different behaviour of Activity.Invalidate which does not require any transparent panel to be drawn to erase the pixels in the upper layer, it clears and redraws automatically, and (View).Invalidate which requires manual erasing before the redraw.

I'll have a good read through the User Guide now though. Thanks!
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…