Re: 2D graphics & speed quest

Tech-Archive recommends: Fix windows errors by optimizing your registry



"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



.



Relevant Pages

  • Re: 2D graphics & speed quest
    ... that the API uses to process the various API drawing functions is spent ... analyzing the device context before even a single pixel gets drawn. ... Private Declare Function MoveToEx Lib "GDI32.dll" (ByVal hDC As Long, ...
    (microsoft.public.vb.general.discussion)
  • Re: Cant include gdiplus.h
    ... Windows Mobile since 5.0, but why Microsoft does not want to release the ... case around the GDI+ API. ... that is all you require is the COM based Imaging API. ... // Draw an alpha blended image on the device context 'hdc' ...
    (microsoft.public.pocketpc.developer)
  • Re: How do you MAGNIFY the view?
    ... isn't much to be gained from moving to a metafile. ... respect of the graph lines. ... magnification is very clear and will fit my needs. ... It is API intensive, and stepping through the ...
    (microsoft.public.vb.general.discussion)
  • Re: Getting the color profile of the screen
    ... > for painting text or graphics in the client area of the window. ... > the API CreateDC() creates a device context for a device and it ...
    (microsoft.public.win32.programmer.gdi)
  • Re: How to get the status of device handle in windows ce?
    ... you could try using the printer API to get information about whether ... > device context once and save it in memory for later use. ... >> Paul T. ...
    (microsoft.public.windowsce.app.development)