473,378 Members | 1,134 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

What paint faster than Graphics.Draw?

What paint faster than Graphics.Draw?

http://www.alvas.net - Audio tools for C# and VB.Net developers + Christmas
discount
Dec 20 '07 #1
3 6113
It's not really a matter of what paints faster. You really have little
choice (other than using the API directly on the device context handle, in
which case, I don't know that it will do much for you).

It's usually more a matter of how you are using the Graphics instance.
Are you double buffering? Are you repainting the entire area when only a
portion of it needs to be repainted?

What is it that you are doing which is not fast enough?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Alexander Vasilevsky" <ma**@alvas.netwrote in message
news:fk**********@behemoth.volia.net...
What paint faster than Graphics.Draw?

http://www.alvas.net - Audio tools for C# and VB.Net developers +
Christmas discount


Dec 20 '07 #2
I agree with the first part of that answer. Draw is one case where the .Net
Framework really stands out: calls to .Net Draw methods can be coded 50
times faster than calls to Win32 APIs, but they execute 50 times slower.
(Well, experts could code calls to Win32 APIs almost as fast as calls to
..Net Draw methods.) StretchBlt is likely to be useful.

I don't understand how it would help to use double buffering. That could
solve flashing and tearing but not speed.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote in
message news:Oe**************@TK2MSFTNGP05.phx.gbl...
It's not really a matter of what paints faster. You really have little
choice (other than using the API directly on the device context handle, in
which case, I don't know that it will do much for you).

It's usually more a matter of how you are using the Graphics instance.
Are you double buffering? Are you repainting the entire area when only a
portion of it needs to be repainted?

What is it that you are doing which is not fast enough?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Alexander Vasilevsky" <ma**@alvas.netwrote in message
news:fk**********@behemoth.volia.net...
>What paint faster than Graphics.Draw?

http://www.alvas.net - Audio tools for C# and VB.Net developers +
Christmas discount


Dec 25 '07 #3
Norman Diamond wrote:
I don't understand how it would help to use double buffering. That could
solve flashing and tearing but not speed.
Not exactly double-buffering, but using a back buffer can help to cache
the representation of a complex end-result image.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote in
message news:Oe**************@TK2MSFTNGP05.phx.gbl...
It's not really a matter of what paints faster. You really have little
choice (other than using the API directly on the device context handle, in
which case, I don't know that it will do much for you).

It's usually more a matter of how you are using the Graphics instance.
Are you double buffering? Are you repainting the entire area when only a
portion of it needs to be repainted?

What is it that you are doing which is not fast enough?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Alexander Vasilevsky" <ma**@alvas.netwrote in message
news:fk**********@behemoth.volia.net...
What paint faster than Graphics.Draw?

http://www.alvas.net - Audio tools for C# and VB.Net developers +
Christmas discount

-- Barry

--
http://barrkel.blogspot.com/
Dec 25 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Tamir Khason | last post by:
How I can paint something onClick event? I need PaintEventArgs event in order to paint and raise Graphics, but onClick I have only EventArgs Event... Thanx
2
by: Serge Klokov | last post by:
Hi! 1. Please, help with example "paint on form by mouse" 2. Below is my example, but it clear the line after each Refresh()... how to fix? 3. How to draw the line in Mouse_Move event? ...
6
by: Noozer | last post by:
If I draw on a form, then place another form on top of it, all the drawings on the first form are erased. VB.Net doesn't have an AutoRedraw function. How do I get graphics on a form to persist?
4
by: Aaron Smith | last post by:
I have a panel that I have in the paint event to draw a Raised 3d border around it.. The problem is, if a msgbox is popped up or a tooltip is displayed, it leaves lines on the panel. I've tried...
7
by: Dennis | last post by:
I am trying to implement drawing on a bitmap and using bitblt to transfer it to the control graphics object in the paint event. It seems to draw on the bitmap ok but doesn't get transferred to the...
7
by: hamil | last post by:
The following code will display a tif file on a form. When another form is moved over the tif image, the tif image is erased where the form was moved. A paint event occurs when this happens. My...
2
by: ofiras | last post by:
Hello, I have a problem in C# programming. I'm using paint event to draw something with graphics, but sometimes, it draws it in a wrong place - like he think that the form starts in minus, he...
9
by: Tom P. | last post by:
I am creating a custom control and I'm trying to get the painting of it correct. I'd like to simply use: e.Graphics.FillRectangle(Brushes.White, DisplayRectangle); .... or ......
8
by: ofiras | last post by:
Hi, I made a "Paint" program, but I couldn't find a method to paint 1 pixel using graphic state ("Graphics g = Graphics.FromHwnd(this.Handle);") How can I paint 1 pixel? I guess I can make a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.