Re: 2D graphics & speed quest
- From: "Mike Williams" <Mike@xxxxxxxxxxxxxxxxx>
- Date: Fri, 21 Apr 2006 19:20:43 +0100
"Mike D Sutton" <EDais@xxxxxxxx> wrote in message news:uvZEt0WZGHA.508@xxxxxxxxxxxxxxxxxxxxxxx
A metafile is literally just a recording of GDI calls which are
'played back' to re-render the picture, so performance will
be exactly the same in this regard.
Yes it is. But, as you almost certainly already know, much of the time that the API uses to process the various API drawing functions is spent analyzing the device context before even a single pixel gets drawn. That is why PolyLine is very much faster than using numerous seperate API calls to draw each of the lines "one at a time". As I said in my earlier response, I don't actually know whether playing a metafile will be any quicker than drawing each of the components individually (because I've never tested it) but I thought that it might be worth checking out, which is why I suggested it. If the metafile structure simply calls a "fresh" API drawing routine for every single element of a drawing then it will of course be no faster, and possibly quite a bit slower, but if it instead does all of the "analyse the device context" just once, and then draws the elements it might be faster.
Thinking some more about it, I'd probably tend to agree with you because I really cannot see a mechanism whereby it can do the "annalyze the device context" just once stuff, and in that case in it probably just draws each element seperately, so that each of the individual API routines it calls have to analyze the device context every time anyway. The simple fact is that I did not actually know what it does (which is why I said, "it might be worth looking into). However, if you already know for a fact that a metafile is simply a recording of API calls (which it appears you do, and which is something I wasn't quite sure of) then I bow to your superior knowledge ;-)
Mike
.
- Follow-Ups:
- Re: 2D graphics & speed quest
- From: Mike D Sutton
- Re: 2D graphics & speed quest
- References:
- 2D graphics & speed quest
- From: Jacquelin Hardy
- Re: 2D graphics & speed quest
- From: Mike Williams
- Re: 2D graphics & speed quest
- From: Mike D Sutton
- 2D graphics & speed quest
- Prev by Date: Re: How to simulate the double-click event?
- Next by Date: Re: Starting PPT from VB6
- Previous by thread: Re: 2D graphics & speed quest
- Next by thread: Re: 2D graphics & speed quest
- Index(es):
Relevant Pages
|