Dots in C# and Slow Graphics - HELP - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Dots in C# and Slow Graphics - HELP

horatiu665horatiu665 Posts: 4Member
Hi there. I'm new here.

I have a form application in Visual C# where I draw lots of dots. I mean about the whole screen, full of individual dots with area of 1 pixel. I am using FillRectangle() for this purpose, as DrawLine() is more than 10 times slower, plus it can only draw 2 pixels minimum.[b] My problem is that it takes a while to draw them. [/b]

First I thought it's the calculation for what color the dots will have (it's just black and white btw), but then I made it so the calculation's results are saved in a matrix of screen size, with values of 0 and 1, and then the matrix is "drawn" onto the screen.[b] This doesn't make the problem go away.[/b]

If you want details about the actual code, I can post them/it, just ask so.

I realized that the problem is with the actual rendering of graphics. I read on a lot of different sites, and searched different queries, but [b]never found anything[/b] remotely related to my problem. Usually people draw images or animations, not individual pixels, and that may make my problem so unique.

I have had other problems with this, solved them, but I have reached 3 conclusions:
1. C# sucks at drawing dots
2. There may well be no way to draw graphics faster in C#
3. My Computer Science teacher sucks monkey b@llz

I have nowhere else to search, so I will start as of today writing in forums (for now only this one) and hopefully, someone will help me figure this out, and potentially help others with the same type of problem.

[b]How do you hardware-accelerate the graphics rendering in C#?[/b] Would that be a solution? I hope to receive answers from friendly, competent programmers.
Sign In or Register to comment.