I'm building a bitmapmanipulat ion-component in C++Builder6
After loading a bitmap in my component, I then can make a selection, which can be moved around.
The problem I have is in my OnPaint-event. I paint the topmost bitmap first(the selection), then find the parts that not have been painted, and paint those parts from the original bitmap.
If the bitmaps are zoomed-out (smaller on the screen) the original bitmap right to the selection-and selection itself sometimes are distorted.
I tested this with a Zoom of 4 and found distortion only occurs if the rect.left is odd. If it's even all is well. I tried to shift the bitmaps by odd numbers but then the errors occur when zoomed different.
This also happen when no rounding errors by zooming occur.
Can anyone help??
After loading a bitmap in my component, I then can make a selection, which can be moved around.
The problem I have is in my OnPaint-event. I paint the topmost bitmap first(the selection), then find the parts that not have been painted, and paint those parts from the original bitmap.
If the bitmaps are zoomed-out (smaller on the screen) the original bitmap right to the selection-and selection itself sometimes are distorted.
I tested this with a Zoom of 4 and found distortion only occurs if the rect.left is odd. If it's even all is well. I tried to shift the bitmaps by odd numbers but then the errors occur when zoomed different.
This also happen when no rounding errors by zooming occur.
Can anyone help??
Comment