What do you mean with 'erase a line' on a BitmapEx object?
If you mean remove a drawn line and get back the previous colors the pixels of the line had before, this is not possible.
You can only draw a line with a given color.
But you can 'play' with the transparent color of the form's Forelayer.
I had a similar problem and solved it by drawing the line on the ForeLayer and erased that when I wanted to remove the line. Search for the thread "Frame object" to see the whole discussion. Success
I had a similar problem and solved it by drawing the line on the ForeLayer and erased that when I wanted to remove the line. Search for the thread "Frame object" to see the whole discussion. Success
What do you mean with 'erase a line' on a BitmapEx object?
If you mean remove a drawn line and get back the previous colors the pixels of the line had before, this is not possible.
You can only draw a line with a given color.
But you can 'play' with the transparent color of the form's Forelayer.
I would like to draw a line from a starting point (mouse/finger down) to the current finger location. this has to be done dynamically - continuously displaying a single line that follows the finger position.
All this is done over an image control that is related to a panel. the image control image is a bitmap.
I was thinking about a solution that is based on erasing line to previous finger location and drawing a new line to current location.
Could you explain what the reasons are why you need a Panel.
I had also begun with an Image on a Panel to show an image bigger than the screen. But as there is no mean to draw 'transparent' other than on a form's forelayer, I use now a BitmapEx object for drawing the image and copy the desired part of the image onto the desired area of the form's background and use the form's forelayer for rubberbanding or temporary drawings.
Good points to think about, I may have to consider again forms vs. panels. this may solve some issues I'm encountering this days.
I'm deeply in a big project, this may cost a lot of efforts and time...