Direct2D "Advanced Path Geometries" Win7 SDK Example Translated to Delphi 2010

Posted by on in Blogs
In two days I'm talking about Windows 7 development at Delphi 2010 HandsOn Workshop with Bob Swart and Bruno Fierens from TMS Software.

One of the cool new features introduced in Delphi 2010 specifically for Windows 7 is support for native Direct2D development. Direct2D is very interesting, new graphics subsystem that utilizies GPU processing power for rendering regular operating system windows.

Because of the performance considerations Direct2D has been implemented in native code in Windows 7 and Delphi VCL provides superior object oriented abstractions on top of raw Windows API.

I have decided to give it a try and translated to Delphi from C++ code the "Advanced Geometries" example that ships with Windows 7 SDK.

[caption id="attachment_38865" align="alignnone" width="300" caption="Delphi 2010 version of Windows 7 SDK Direct2D Advanced Geometries Example"]Delphi 2010 version of Windows 7 SDK Direct2D Advanced Geometries Example[/caption]

The main form in my "DelphiAdvD2DGeometries" Delphi 2010 project has been structured based on information provided by Chris Bensen in his blog post http://chrisbensen.blogspot.com/2009/09/touch-demo-part-i.html.

Delphi 2010 version of Direct2D "Advanced Geometries" Windows 7 SDK example is available for download from EDN Code Central.


About
Gold User, Rank: 9, Points: 364
Crazy about Delphi Programming!

Comments

  • Guest
    B.J. Rao Tuesday, 8 December 2009

    The D2D takes Windows one step closer to the Mac and its certainly a big+ that Delphi now supports this very much needed "graphics subsystem". It will be most interesting to see how this may be used for graphic overlays on video.

  • Guest
    Moritz Beutel Tuesday, 8 December 2009

    From what I've seen until now, Direct2D looks much like Java2D done right.
    If it only were supported on Windows XP :(

  • Guest
    Konstantin Wednesday, 3 February 2010

    Thanks for your example!
    But I try use [Image1.Picture.Bitmap.Canvas] as render target instead HWND in example — as result I have nothing on my canvas, drawing don't work.
    What happend with user canvas in Direct2D?

  • Guest
    Mohammad Ehs heidari Wednesday, 13 February 2013

    Hi And thanks because of example in Delphi
    So I Wanna to know can i take it in Java2D?

  • Please login first in order for you to submit comments
  • Page :
  • 1

Check out more tips and tricks in this development video: