|
-
Apr 14th, 2007, 03:01 PM
#1
Thread Starter
New Member
Graphics Help
Hello,
There might be an answer to a problem similar to this on the forums, but I couldn't find one using the Search feature. So I'm sorry if there is already an answer on here.
Anyway, I have a problem concerning drawing graphics onto a PictureBox in J# (I figured I'd put J# problems in the Java forum considering there is no J# forum).
I have this program that draws several different things onto this PictureBox (some text drawings and line drawings) and I want this feature so that when a user clicks on the mouse and holds it the program will draw a line from the original point to the new point of the mouse, and whenever the mouse moves the line will be redrawn. However I have not figured out a way to do this without redrawing everything else on the PictureBox already (which is something I don't want to have to do).
Is there some way to just redraw that line, or do I have to do something like save the drawings that are already on there as an image then try redrawing the line?
Thanks for any help!
-
Apr 15th, 2007, 03:53 AM
#2
Re: Graphics Help
Typically, graphics programs use color negation for temporary lines. In classic Win32, they set the raster operation to NOT, which means the colors of the source are inverted. Not sure how to do that in a PictureBox.
The cool thing is that if you draw the line again, it's gone.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|