|
-
Nov 5th, 2005, 10:24 AM
#1
Thread Starter
Frenzied Member
Get/Set a point on a PictureBox Class
I need to set a point on a PictureBox class to a certain color. I'll also need to read this point. This point of course, has to be based on x/y coordinates.
Is there any way to do this?
Also, I'm using the freeware Mono C# compiler, so no fancy IDE for me.
-
Nov 5th, 2005, 11:12 AM
#2
Re: Get/Set a point on a PictureBox Class
You should use the Bitmap Class and call its GetPixel/SetPixel functions.
Unless you want maximum performance, in which case you should use LockBits/UnlockBits and pointers into the contiguous pixel data, this should only be done if you are setting / testing a lot of pixels.
The latter is complicated so give SetPisel a whirl first, it may be fast enough for you on its own.
I don't live here any more.
-
Nov 5th, 2005, 12:40 PM
#3
Thread Starter
Frenzied Member
Re: Get/Set a point on a PictureBox Class
Thanks, I'll check both of them out.
And yes, I will be setting/getting alot of pixels. I'm writing a stupid game that has a gameplay style similar to Sam & Max Hit the Road or Day of the TEntacle.
Thanks again. Have a good one.
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
|