draw multiple lines and move then on screen
I am writing a pure C based win32 applications. I have drawn line. Now i want to translate that line, move the line whereved user wants to move on screen. Then again I drawn another line, I am drawing multiple lines.
I have created rectangle region for each line and trying to move the line.
When I move the 2nd line over the 1st line on screen the 1st line is getting wiped out. Because I am InvalidateRect() of the rect for the line being moved, so when that rectangle is crossing the other line then the other line is getting removed from the screen.
How can I rectify it. How can I have all the lined being on the screen and moved according to the user's wish. The code should be pure C and win32 no MFC. Please help me how can I do it. Any help is highly appreciated. Thanks Sujan
Re: draw multiple lines and move then on screen
You need to keep track of all the lines you want displayed and redraw them as needed. You can either test each line for intersection with the invalidated rectangle, or you can just redraw them all anyway as Windows clips updates to the invalidated rectangle (assuming you're using BeginPaint and EndPaint).
|All times are GMT +5.5. The time now is 07:20.|