<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>DirectX Developer Blog</title><link>http://blogs.msdn.com/b/directx/</link><description /><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>Introducing the DirectCompute Lecture Series! </title><link>http://blogs.msdn.com/b/directx/archive/2010/06/15/introducing-the-directcompute-lecture-series.aspx</link><pubDate>Wed, 16 Jun 2010 01:17:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10025527</guid><dc:creator>Kam VedBrat</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/directx/rsscomments.aspx?WeblogPostID=10025527</wfw:commentRss><comments>http://blogs.msdn.com/b/directx/archive/2010/06/15/introducing-the-directcompute-lecture-series.aspx#comments</comments><description>&lt;p&gt;We are very excited to announce the DirectCompute Lecture Series, which starts today, June 14th, and runs for the next three weeks. A component of DirectX, DirectCompute is Microsoft&amp;rsquo;s GPGPU programming solution that enables developers to utilize the GPU for general purpose computing on Windows. In today&amp;rsquo;s opening video lecture, Robert Hess hosts a round table discussion of thought leaders in parallel computing. Six lectures will follow about DirectCompute, developing DirectCompute applications, and tips for optimizing performance and integrating the DirectCompute data into the graphics pipeline. &lt;/p&gt;
&lt;p&gt;Each week we will release two new lectures, Mondays and Fridays, that are presented by developers experienced with parallel computing and DirectCompute. Several lectures will address key parallel programing scenarios. The series will begin with high-level topics common to most DirectCompute scenarios, and continue into deeper lectures that examine more complex problems and algorithms.&lt;/p&gt;
&lt;p&gt;With the realization that GPUs are useful for purposes other than graphics, the need for APIs to harness their potential has grown rapidly over the last several years.&amp;nbsp; Microsoft developed DirectCompute in response to this need. Its benefits for mass-market applications are numerous. Because it can run on all DirectX 11 hardware and most DirectX 10.1 hardware, you can safely use DirectCompute for core application functionality across many customer segments.&amp;nbsp; Additionally, as part of the Direct3D API, DirectCompute can be seamlessly integrated with games, CAD tools, and other graphics applications.&lt;/p&gt;
&lt;p&gt;The integration with Direct3D makes DirectCompute an attractive choice for any scientific computing applications that require data visualization. The Compute Shader Extensions library provides access to high-performance implementations of common computing algorithms, such as parallel prefix reduction and multi-dimensional fast Fourier transform.&lt;/p&gt;
&lt;p&gt;If you are interested in doing some GPU computing, look for our video lectures at &lt;a href="http://go.microsoft.com/fwlink/?LinkId=194362"&gt;http://go.microsoft.com/fwlink/?LinkId=194362&lt;/a&gt;, which will point to the lectures as they become available. &lt;/p&gt;
&lt;p&gt;Currently, the following lectures are planned:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Direct Compute Expert Roundtable&lt;/li&gt;
&lt;li&gt;Lecture Course Level - 100&lt;/li&gt;
&lt;li&gt;Recommended Prerequisite:&amp;nbsp; N/A&lt;/li&gt;
&lt;li&gt;Mediator: Robert Hess (Director, Platform Evangelism, Microsoft Corporation)&lt;/li&gt;
&lt;li&gt;Participants: 
&lt;ul&gt;
&lt;li&gt;Eric Young (Manager of Developer Technology, NVIDIA Corporation)&lt;/li&gt;
&lt;li&gt;Chas Boyd (Program Manager Architect&amp;nbsp; Windows Graphics,&amp;nbsp; Microsoft Corporation)&lt;/li&gt;
&lt;li&gt;Justin Hensley (Senior MTS, AMD Office of CTO, ATI/AMD)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Lecture Length: 45 Minutes&lt;/li&gt;
&lt;li&gt;Web Release Date:&amp;nbsp; Monday 6/14/2010&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;Introduction to DirectCompute&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Lecture Course Level:&amp;nbsp; 101&lt;/li&gt;
&lt;li&gt;Recommended Prerequisite:&amp;nbsp; None&lt;/li&gt;
&lt;li&gt;Presenter: Chas Boyd (Program Manager Architect Windows Graphics, Microsoft Corporation)&lt;/li&gt;
&lt;li&gt;Lecture Length: 25 minutes&lt;/li&gt;
&lt;li&gt;Web Release Date:&amp;nbsp; Friday 6/18/2010&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;DirectCompute Memory Patterns&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Presenter: Matt Sandy (Program Manager Microsoft Graphics, Microsoft Corporation)&lt;/li&gt;
&lt;li&gt;Lecture Course Level:&amp;nbsp; 110&lt;/li&gt;
&lt;li&gt;Recommended Prerequisite: Introduction to DirectCompute&lt;/li&gt;
&lt;li&gt;Lecture Length: 15 Minutes&lt;/li&gt;
&lt;li&gt;Web Release Date:&amp;nbsp; Monday 6/21/2010&amp;nbsp; &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;Basics of DirectCompute Application Development&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Presenter: Jason Yang (MTS Software Engineer, ATI/AMD)&lt;/li&gt;
&lt;li&gt;Lecture Course Level:&amp;nbsp; 120&lt;/li&gt;
&lt;li&gt;Recommended Prerequisite:&amp;nbsp; Introduction to DirectCompute&lt;/li&gt;
&lt;li&gt;Lecture Length: 30 minutes&lt;/li&gt;
&lt;li&gt;Web Release Date:&amp;nbsp; Friday 6/25/2010&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;DirectCompute GPU Optimizations and Performance&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Presenter: James Fung (Developer Technology, NVIDIA Corporation)&lt;/li&gt;
&lt;li&gt;Lecture Corse Level:&amp;nbsp; 210&lt;/li&gt;
&lt;li&gt;Recommended Prerequisite:&amp;nbsp; DirectCompute Memory Patterns&lt;/li&gt;
&lt;li&gt;Lecture Length: 22 minutes&lt;/li&gt;
&lt;li&gt;Web Release Date: Monday 6/28/2010&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;DirectCompute GPU Accelerated Physics&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Presenter:&amp;nbsp; Lee Howes (Sr. Software Development Engineer, ATI/AMD)&lt;/li&gt;
&lt;li&gt;Lecture Course Level:&amp;nbsp; 230&lt;/li&gt;
&lt;li&gt;Recommended Prerequisite:&amp;nbsp; DirectCompute Memory Patterns and Basics of DirectCompute Application Development &lt;/li&gt;
&lt;li&gt;Lecture Length: 30 minutes&lt;/li&gt;
&lt;li&gt;Web Release Date: Friday 7/1/2010&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;DirectCompute - Integration with the Graphics Pipeline&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Presenter: James Fung (Developer Technology, NVIDIA Corporation)&lt;/li&gt;
&lt;li&gt;Lecture Course Level:&amp;nbsp; 250&lt;/li&gt;
&lt;li&gt;Recommended Prerequisite:&amp;nbsp; &lt;/li&gt;
&lt;li&gt;Lecture Length: 18 minutes&lt;/li&gt;
&lt;li&gt;Web Release Date:&amp;nbsp; Monday 7/5/2010&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10025527" width="1" height="1"&gt;</description></item><item><title>New DirectX Whitepapers and Samples Published for Windows 7 and Windows Vista</title><link>http://blogs.msdn.com/b/directx/archive/2010/01/06/direct3d-whitepapers-and-samples-published-for-windows-7.aspx</link><pubDate>Wed, 06 Jan 2010 21:17:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9944819</guid><dc:creator>maryluo</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/directx/rsscomments.aspx?WeblogPostID=9944819</wfw:commentRss><comments>http://blogs.msdn.com/b/directx/archive/2010/01/06/direct3d-whitepapers-and-samples-published-for-windows-7.aspx#comments</comments><description>&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraph&gt;&lt;A href="http://code.msdn.microsoft.com/D3D9ExFlipEx/"&gt;&lt;FONT size=3 face=Calibri&gt;&lt;/FONT&gt;&lt;/A&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;&lt;B&gt;Surface Sharing Support for Windows Graphics Applications Whitepaper and Samples&lt;/B&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="COLOR: black"&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="COLOR: black"&gt;&lt;o:p&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: black; FONT-SIZE: 12pt"&gt;A whitepaper and two&amp;nbsp;samples were published to showcase interoperability support using&amp;nbsp;surface sharing between Windows graphics APIs: Direct3D 11, Direct2D, Direct3D 10, and Direct3D 9Ex.&amp;nbsp; The interoperability support explained applies to both Windows 7 and Windows Client Platform Update for Windows Vista.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: black; FONT-SIZE: 12pt"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: black; FONT-SIZE: 12pt"&gt;Both the whitepaper and sample applications help developers use multiple APIs to render to the same surface in an application designed for Windows 7 or Windows Vista operating systems. &amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-ansi-language: EN" lang=EN&gt;&lt;FONT face=Calibri&gt;-&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Times New Roman','serif'; FONT-SIZE: 7pt; mso-ansi-language: EN" lang=EN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="COLOR: black; FONT-SIZE: 12pt; mso-ansi-language: EN" lang=EN&gt;Best practice guidelines and pointers to additional resources are available in this whitepaper &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Times New Roman','serif'; FONT-SIZE: 12pt; mso-ansi-language: EN" lang=EN&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/ee913554(VS.85).aspx"&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'"&gt;http://msdn.microsoft.com/en-us/library/ee913554(VS.85).aspx&lt;/SPAN&gt;&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-ansi-language: EN" lang=EN&gt;&lt;FONT face=Calibri&gt;-&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Times New Roman','serif'; FONT-SIZE: 7pt; mso-ansi-language: EN" lang=EN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-ansi-language: EN" lang=EN&gt;Sample application for synchronized shared surface support is available on &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Times New Roman','serif'; FONT-SIZE: 12pt; mso-ansi-language: EN" lang=EN&gt;&lt;A href="http://code.msdn.microsoft.com/DXGISyncSharedSurf"&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'"&gt;http://code.msdn.microsoft.com/DXGISyncSharedSurf&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-ansi-language: EN" lang=EN&gt;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-ansi-language: EN" lang=EN&gt;&lt;FONT face=Calibri&gt;-&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Times New Roman','serif'; FONT-SIZE: 7pt; mso-ansi-language: EN" lang=EN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-ansi-language: EN" lang=EN&gt;Sample application using the shared surface queue helper utility&amp;nbsp;is available on &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Times New Roman','serif'; FONT-SIZE: 12pt; mso-ansi-language: EN" lang=EN&gt;&lt;A href="http://code.msdn.microsoft.com/D3D9ExDXGISharedSurf"&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'"&gt;http://code.msdn.microsoft.com/D3D9ExDXGISharedSurf&lt;/SPAN&gt;&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo2" class=MsoListParagraph&gt;&lt;A href="http://code.msdn.microsoft.com/D3D9ExDXGISharedSurf"&gt;&lt;FONT size=3 face=Calibri&gt;&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;o:p&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B&gt;Windows 7 Direct3D9Ex Presentation Improvements for Video Applications Whitepaper and Sample&lt;o:p&gt;&lt;/o:p&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;SPAN style="COLOR: black"&gt;&lt;FONT face=Calibri&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;SPAN style="COLOR: black"&gt;Flip Mode Present and its associated Present Statistics in Direct3D 9Ex and Desktop Window Manager were added in Windows 7 to allow applications to reduce the system resource load when DWM is enabled.&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: black; mso-ansi-language: EN" lang=EN&gt;Present Statistics enhancements associated with Flip Mode Present enable Direct3D 9Ex applications to better control the rate of presentation by providing real-time feedback and correction mechanisms. &lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraph&gt;&lt;SPAN style="COLOR: black; mso-fareast-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3 face=Calibri&gt;-&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;&lt;FONT size=3 face=Calibri&gt;Detailed explanations and pointers to sample resources are included in this&amp;nbsp;whitepaper &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/ee890072(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/ee890072(VS.85).aspx"&gt;&lt;FONT size=3 face=Calibri&gt;http://msdn.microsoft.com/en-us/library/ee890072(VS.85).aspx&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraph&gt;&lt;SPAN style="mso-fareast-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3 face=Calibri&gt;-&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;&lt;FONT size=3 face=Calibri&gt;Sample application using Direct3D9Ex Flip Mode Present and its Present Statisics is available on &lt;/FONT&gt;&lt;/SPAN&gt;&lt;A href="http://code.msdn.microsoft.com/D3D9ExFlipEx/"&gt;&lt;FONT size=3 face=Calibri&gt;http://code.msdn.microsoft.com/D3D9ExFlipEx/&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9944819" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/directx/archive/tags/DX/">DX</category><category domain="http://blogs.msdn.com/b/directx/archive/tags/Graphics/">Graphics</category><category domain="http://blogs.msdn.com/b/directx/archive/tags/DirectX/">DirectX</category><category domain="http://blogs.msdn.com/b/directx/archive/tags/GDI/">GDI</category><category domain="http://blogs.msdn.com/b/directx/archive/tags/Direct2D/">Direct2D</category><category domain="http://blogs.msdn.com/b/directx/archive/tags/direct3d/">direct3d</category></item><item><title>Direct2D and DirectWrite</title><link>http://blogs.msdn.com/b/directx/archive/2009/12/18/direct2d-and-directwrite.aspx</link><pubDate>Fri, 18 Dec 2009 02:04:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9938514</guid><dc:creator>Mark Lawrence1</dc:creator><slash:comments>69</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/directx/rsscomments.aspx?WeblogPostID=9938514</wfw:commentRss><comments>http://blogs.msdn.com/b/directx/archive/2009/12/18/direct2d-and-directwrite.aspx#comments</comments><description>&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;One of the more interesting aspects of Direct2D is that it cooperates with another API, DirectWrite in order to handle text. This is unlike other monolithic APIs, such as GDI, GDI+ or WPF. This post explores why these components are separated in this way, as well as differences and similarities between them.&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;H1 style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;SPAN style="TEXT-DECORATION: none"&gt;&lt;U&gt;&lt;FONT size=4 face=Calibri&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/H1&gt;
&lt;H1 style="MARGIN: 0in 0in 0pt"&gt;&lt;U&gt;&lt;FONT size=4&gt;&lt;FONT face=Calibri&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/U&gt;&amp;nbsp;&lt;/H1&gt;
&lt;H1 style="MARGIN: 0in 0in 0pt"&gt;&lt;U&gt;&lt;FONT size=4&gt;&lt;FONT face=Calibri&gt;Incremental Adoption&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;/H1&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;One of the lessons learned by the DirectX team is that many applications cannot move completely over to a new graphics API in one release. This might be because they need to support plug-ins that still take the older interfaces, because the application itself is too large to port over to a new API in one release or because some part of the newer API is really desirable but the older API is working well enough for other parts of the application. Providing a separate component dedicated to text allows a component to adopt DirectWrite while still leaving their application GDI or GDI+ based. Having two distinct but highly interoperable APIs allows customers to only pay for the IO and working set of the APIs they use in their application.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;H1 style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=4&gt;&lt;U&gt;&lt;FONT face=Calibri&gt;Text Services versus Rendering&lt;/FONT&gt;&lt;/U&gt;&lt;/FONT&gt;&lt;/H1&gt;
&lt;P style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=4&gt;&lt;U&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="TEXT-DECORATION: none; text-underline: none"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2 style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;SPAN style="TEXT-DECORATION: none"&gt;&lt;U&gt;&lt;FONT size=3 face=Calibri&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/H2&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;As applications have evolved, their text processing requirements have grown increasingly complex. Initially, text was generally confined to statically laid-out UI, and the text was rendered within a well-defined box, such as a button. As applications had to be shipped in more languages this approach became more difficult to sustain since both the width and height of the translated text can vary substantially between different languages. To adapt, applications started having to dynamically lay out their UI depending on the actual rendered size of the text, rather than the other way around.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;To help applications with this task, DirectWrite provides the &lt;/FONT&gt;&lt;SPAN class=codeChar&gt;&lt;FONT face="Courier New"&gt;IDWriteTextLayout&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt; interface. This API allows an application to specify a piece of text with complex characteristics such as: different fonts and font sizes, underlines, strikethroughs, bi-directional text, effects, ellipsis and even embedded non-glyph characters (such as a bitmap emoticon or an icon). The application can then change various characteristics of the text as it iteratively determines its UI layout. The layout can either position the glyphs ideally based on their widths (as WPF does), or, it can snap the glyphs to the nearest pixel positions (as GDI does). As well as obtaining text measurements, the application can hit test various parts of the text. For example, it might wish to know that a hyperlink in the text has been clicked on.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;The text layout interface is completely decoupled from the input technology and the rendering API the application chooses to use. As shown below:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;H2 style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;&lt;SPAN style="TEXT-DECORATION: none; mso-no-proof: yes; text-underline: none"&gt;&lt;?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /&gt;&lt;v:shapetype id=_x0000_t75 coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"&gt;&lt;v:stroke joinstyle="miter"&gt;&lt;/v:stroke&gt;&lt;v:formulas&gt;&lt;v:f eqn="if lineDrawn pixelLineWidth 0"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum @0 1 0"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum 0 0 @1"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @2 1 2"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @3 21600 pixelWidth"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @3 21600 pixelHeight"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum @0 0 1"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @6 1 2"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @7 21600 pixelWidth"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum @8 21600 0"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @7 21600 pixelHeight"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum @10 21600 0"&gt;&lt;/v:f&gt;&lt;/v:formulas&gt;&lt;v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"&gt;&lt;/v:path&gt;&lt;o:lock v:ext="edit" aspectratio="t"&gt;&lt;/o:lock&gt;&lt;/v:shapetype&gt;&lt;v:shape style="WIDTH: 468pt; HEIGHT: 200.25pt; VISIBILITY: visible" id=Object_x0020_2 type="#_x0000_t75" o:gfxdata="UEsDBBQABgAIAAAAIQC75UiUBQEAAB4CAAATAAAAW0NvbnRlbnRfVHlwZXNdLnhtbKSRvU7DMBSF&amp;#13;&amp;#10;dyTewfKKEqcMCKEmHfgZgaE8wMW+SSwc27JvS/v23KTJgkoXFsu+P+c7Ol5vDoMTe0zZBl/LVVlJ&amp;#13;&amp;#10;gV4HY31Xy4/tS3EvRSbwBlzwWMsjZrlprq/W22PELHjb51r2RPFBqax7HCCXIaLnThvSAMTP1KkI&amp;#13;&amp;#10;+gs6VLdVdad08ISeCho1ZLN+whZ2jsTzgcsnJwldluLxNDiyagkxOquB2Knae/OLUsyEkjenmdzb&amp;#13;&amp;#10;mG/YhlRnCWPnb8C898bRJGtQvEOiVxjYhtLOxs8AySiT4JuDystlVV4WPeM6tK3VaILeDZxIOSsu&amp;#13;&amp;#10;ti/jidNGNZ3/J08yC1dNv9v8AAAA//8DAFBLAwQUAAYACAAAACEArTA/8cEAAAAyAQAACwAAAF9y&amp;#13;&amp;#10;ZWxzLy5yZWxzhI/NCsIwEITvgu8Q9m7TehCRpr2I4FX0AdZk2wbbJGTj39ubi6AgeJtl2G9m6vYx&amp;#13;&amp;#10;jeJGka13CqqiBEFOe2Ndr+B03C3WIDihMzh6RwqexNA281l9oBFTfuLBBhaZ4ljBkFLYSMl6oAm5&amp;#13;&amp;#10;8IFcdjofJ0z5jL0MqC/Yk1yW5UrGTwY0X0yxNwri3lQgjs+Qk/+zfddZTVuvrxO59CNCmoj3vCwj&amp;#13;&amp;#10;MfaUFOjRhrPHaN4Wv0VV5OYgm1p+LW1eAAAA//8DAFBLAwQUAAYACAAAACEAHUR4w0YLAADvewAA&amp;#13;&amp;#10;HwAAAGNsaXBib2FyZC9kcmF3aW5ncy9kcmF3aW5nMS54bWzsnVlv2zgQx98X2O9A6HXRxjp8BXWL&amp;#13;&amp;#10;Nm2KBdJuEKfoMyPRsba6lqIdp59+Z3hYlmtVSXooalkUiR2RFPkXJc9vhhw/e7FJE7JmvIzzbOa4&amp;#13;&amp;#10;TwcOYVmYR3F2PXM+XJ4+mTikFDSLaJJnbObcstJ58fzPP57R42tOi2UcEmghK4/pzFkKURwfHZXh&amp;#13;&amp;#10;kqW0fJoXLINji5ynVMBbfn0UcXoDLafJkTcYjI5SGmfO86qp11RQsuLxA5pK8vATi05otqYlNJmE&amp;#13;&amp;#10;x7t/0X1Mwm9vmR5n67e8mBfnHHsevl+fcxJHMweUy2gKEjlH+oAuBm+P9mpdVw1sFjzF8vliQTay&amp;#13;&amp;#10;lVv8KdtgG0FC+ONkMHDhv0NCOOYH3nQw0CXC5T+q3mgyHE+nDoEC3sSdBlWBNy2NQN9UH+DFTr/K&amp;#13;&amp;#10;AnuVrb8cKMwINdCLfJVFLCIXLIQZcp0wMt6OHauZgZsmSq3Z3pA9bzLCAWHf/UEAg90b/ghGA3/V&amp;#13;&amp;#10;w4eZo0e37Tk9Lngp3rI8Jfhi5nDsGXZLzi66PiuF6owpJy+J6Y/YzOVgxeZVHt3isK/gN1xWLpKT&amp;#13;&amp;#10;PJEXhWbhMuczJxRcjTEpxVzcJgyLR2xxrqYDvLqAignIMXNY9uTDHEtDR6siyTpxQQiSUn6mmk6u&amp;#13;&amp;#10;4dZLHAJlLunV/PPMmboBjhE7IIswepa94p/gBnWgbRFn+i0UWcKp4JY6X2UhDNyVA9a9KKElVwr3&amp;#13;&amp;#10;iXG8u0E6ebzMkzg6jZMEOy9vV3aScLKmcLbok6u7XCslz0rEbcEWNIRJ/leaPUmEkoLRvQOMqgNh&amp;#13;&amp;#10;uXcgLCs5QCepjNYDuwIvvUqaYDjGDhP62+uDomh9/EofM0msPiiK1ieo9HH9sQsPFjuB1gmqogUa&amp;#13;&amp;#10;7gg08Sby8WBnEKqiBRpVAm0/maxAqIoWaLwj0Djw7TNafnChKlqgSSUQqiM/ye0MQlW0QNMdgUbD&amp;#13;&amp;#10;sX1IyxmEqiiLaMe0lIYpyqUm0Nb8ZFl0TjndNzZJFHNhAALMTqgOPyvDdlWyeYGGsbJKjeVbGks2&amp;#13;&amp;#10;yS7YAnAGoMNz8GrtWYc0DFkmRtqKk6Wx1AJsyW1FZYPuVUyEMSt1WazGFgvoyraiNk4RHyt7tH7G&amp;#13;&amp;#10;bQ151jyrKqdxlvNDXa4M2oUqLyXRIwZxFOg0486oGXeG2sx9LynpEO6Qq5t3eQT2Ml2JXPZuH340&amp;#13;&amp;#10;rEn48QFzAs1Qhv0C10UkUvAzmXjToa/VNy0ZpmlmHxTrOtLURqN/HbJIEwB2MPjJdOCbBiUnSXVM&amp;#13;&amp;#10;k1ixhgF7V1VdnEB3qFYyybDyktHoTRZJDJg5GbgQHHIzc1IWAcgwYBJ8BcLBHKVxcpeScMWwaXnh&amp;#13;&amp;#10;1APFTOJqlmt8A7cGIBFg22c4KTgrZk7534py6ELyd1ZKyvLh6gr5BmjDBbLlu0eudo9kq/QEYRAQ&amp;#13;&amp;#10;rIELiYLEEwGciBcsTwsqzrJ5AW4HdVOgrpebj5QX+mIJuMzv8/mSFkzOjj1UVWXlaNWYUKlflTyr&amp;#13;&amp;#10;R0R9IiHv7nHkb0meXejTJ/LsQp9ekWcXAvWKPLsQqFfk2YVAvSLPLgTqFXl2IVCvyLMLge5KnvUI&amp;#13;&amp;#10;xQDiTdJ052iV8r2wB8Hog+cjuWyZlJSpOEkYBbv/UCCCX19twxCn8t8hsFAICBEdPGu+EozPl9EN&amp;#13;&amp;#10;uUpW/IJCHM6fQKwMT4qBoO0bMMm9MUSWKn+wSBQt7p5VFlBdo0mxpCokEvjgSjZdUcWlSb49uXxX&amp;#13;&amp;#10;69d+uOSSs6sVgK0g7+YOKWIRLk9pGicyngeosKS8ZNBfGfkCtgE1JRQ9v0QOPKO3cC5J8vJUcAzK&amp;#13;&amp;#10;fAPbf4W0DcwdZntfaXYI0U3FZr6/Q+UH8H11wzyM78fNfC/9HDLGOwcXzN35nvAcruUQHH843+Q8&amp;#13;&amp;#10;1VHawPPdcSBDnYE7mow8qRp4QnSQ1huNcJY+Zto3fpw6pFnat7TvkHvEmavbtj6RLO2rD50u9LG0&amp;#13;&amp;#10;r1c2NKxTsLRvln40CGRpv0UgS/stAlnabxHI0n6LQJb2WwSytK+XOko8e1S0fwoRajK/LQVLLe0f&amp;#13;&amp;#10;jOZXZvHDaB+WSDctXp4obxas6L4f7e/wvWfWQ4FfRy1f3VvK7Jold7iS+3FG8z3j6dpdJGyj+Taa&amp;#13;&amp;#10;D14py/ffbZ199SD7ef4Py/eW72s7OO67UcPyfYttbfm+RSDL9y0CWb5vEcjyfYtAlu8fLd/PQx4X&amp;#13;&amp;#10;gpzzPGRlmXML+T8E8l1AlSbK12tWvoXycT2+3LPSRPme6/uywOOlfLOFow4fNopvo/iW8r/jbnpL&amp;#13;&amp;#10;+V/fQNSFPjaK32JAWspvEchSfotAlvJbBLKU3yKQpfwWgSzlP1rKl1H8GtrDgn6MEt9pjwTjsFcB&amp;#13;&amp;#10;NhnbvRL33StxQWHhBI8/s7pfBVbXNyRLsFtUdvZV33eLSiWq3Y1SpauogOZh61NcuPOV6wp3/rzK&amp;#13;&amp;#10;NwScWXKXlfZYEUxzAOk5zDaMKkNfKfOHmGx+24yC2wQS4K0ajnyZ8Uk2aPac1NakBCN3NJJ5LWCH&amp;#13;&amp;#10;UVOGia8m1oOkgTnmllPbZUynGpM01BMzVJkV8HlZFi8hbcZprLOV/PopEMTGXNa6X85uilCbIrrQ&amp;#13;&amp;#10;p0+LJrrQp1fulC4E6pU7pQuBeuVO6UKgXrlTuhCoV+6ULgTqlTulC4Ga3SlfIXeZ2bHKbnCI3KWl&amp;#13;&amp;#10;LZ6/jjkYzR95LNieY6DCqFrWaJU+oX4CZVHfadu/TI+mTGj8WUFCla/c9QxpfJnHGyhEdvzeUfLG&amp;#13;&amp;#10;ne9PIBPmEHa7Y567wIM0dl/sfJ9Mh488Zm6wqG6b25i5jZnbmLmNmf+0DP2Vi6n+IPqRToJeQV4X&amp;#13;&amp;#10;AvUK8roQqFeQ14VAvYK8LgTqFeR1IVCvIK8LgZohr55h3ea5Oy5/cp67t+rLxEry8vzvGiHbRHfm&amp;#13;&amp;#10;m5mqO+ZhoUUA8O26eIyryazjRG733ua4Uy6DM/gytZJk+Ql+uRR7yXl+g4ncIWW6CU9px4CM/FbO&amp;#13;&amp;#10;BQz2Hc543+gXcCfDQH6DCPgF4LuqfPR4SNeDiU4GkPDeJMTzht7Y/x8AAP//7JZRb5swEMe/iuXX&amp;#13;&amp;#10;qWqAkKRRqbRm6zQpmqLSas8XcIDVGGY7NO2n351xC+n6EeCFs+7P+e7HGW4245c315ewPh10fXMN&amp;#13;&amp;#10;61Yb+0M0NSMj4dlRdyK/r4rSftW6eeakgW5rLBlFzhTUIuGQ/wk4O9QSEt6BZFF0tYgo8rkmHGtW&amp;#13;&amp;#10;s3gR/6+JxpqILp+h3xVzfcuRwptGVvldJaVb6GK/kZphCgm/c5d/+EwmFXtO+FUcxq6cM58Zh5i5&amp;#13;&amp;#10;67MQdWWFZrKqE756F8G6FJB/V7kr3EIlextTlspRNu1OU6L2lLb9/bbJX8ja432HmQuN1MtGv3L2&amp;#13;&amp;#10;rKFNuPl7BC04kz+VwaSD+XzGmXWLebwMcaHHnv3Yo471pkEU+G5AZRg14fbN3Fhc4dNZU7dgtypt&amp;#13;&amp;#10;MxJSLsT34fQbdOu7wIqT/dWkJbRiaIC+bwatK7Avg4JIY1P7IgXZuTjs+sLRuscyJagi4UJdPKae&amp;#13;&amp;#10;7iCRnQwQE6tBb12GIAuVcMkZah5gn756DFS6xerwLmCrbvWTq1SCrZRfoqvErSpV7I4qQ7J9gT4L&amp;#13;&amp;#10;g5ECfH2cPQmNWwQh2pTveUdkpajFe1vZU/BZQ7hdmX1pxQEyPBFfanUhLSlhLeCDQ0DvyMwHR2YG&amp;#13;&amp;#10;HMjJIfU8HNNOhgMa9/ox+YkPQfF8ooGPOysTH+wfguL5zAc+QbQMFtT9UwMRFQ8oHgFahSv3eZgA&amp;#13;&amp;#10;ERUPaDEACsMVNtDUQXjEiIoHtBwBWs4j+qlMR0wSFQ9oNQAiOvMJ0Bo7iKh4QFcjQIt4OX2kcZzs&amp;#13;&amp;#10;JFHpJ6LRaOnGaKHyHWj4fLJEBQ7g9vQ2aR+NSNt7kdl+gO1HcVQYEspsLZvsSeQbUB0Y92iBc3hZ&amp;#13;&amp;#10;Zd/Awnh98w8AAP//AwBQSwMEFAAGAAgAAAAhAOFRNx/PBgAA5hsAABoAAABjbGlwYm9hcmQvdGhl&amp;#13;&amp;#10;bWUvdGhlbWUxLnhtbOxZzW/cRBS/I/E/jHxvs9/NRt1U2c1uA23aKNkW9Thrz9rTjD3WzGzSvaH2&amp;#13;&amp;#10;iISEKIgDlbhxQEClVuJS/ppAERSp/wJvZmyvJ+uQtI2gguaQtZ9/877fm6/LV+7FDB0QISlPel79&amp;#13;&amp;#10;Ys1DJPF5QJOw590ajy6sekgqnASY8YT0vDmR3pX199+7jNd8RtMJxyIYRyQmCBglcg33vEipdG1l&amp;#13;&amp;#10;RfpAxvIiT0kC36ZcxFjBqwhXAoEPQUDMVhq1WmclxjTx1oGj0oyGDP4lSmqCz8SeZkNQgmOQfnM6&amp;#13;&amp;#10;pT4x2GC/rhFyLgdMoAPMeh7wDPjhmNxTHmJYKvjQ82rmz1tZv7yC17JBTJ0wtjRuZP6ycdmAYL9h&amp;#13;&amp;#10;ZIpwUgitj1rdS5sFfwNgahk3HA4Hw3rBzwCw74OlVpcyz9Zotd7PeZZA9nGZ96DWrrVcfIl/c0nn&amp;#13;&amp;#10;br/fb3czXSxTA7KPrSX8aq3T2mg4eAOy+PYSvtXfGAw6Dt6ALL6zhB9d6nZaLt6AIkaT/SW0Duho&amp;#13;&amp;#10;lHEvIFPOtirhqwBfrWXwBQqyocguLWLKE3VSrsX4LhcjAGggw4omSM1TMsU+5OQAxxNBsRaA1wgu&amp;#13;&amp;#10;fbEkXy6RtCwkfUFT1fM+THHilSAvn33/8tkTdHT/6dH9n44ePDi6/6Nl5IzawklYHvXi28/+fPQx&amp;#13;&amp;#10;+uPJNy8eflGNl2X8rz988svPn1cDoXwW5j3/8vFvTx8//+rT3797WAHfEHhSho9pTCS6QQ7RLo/B&amp;#13;&amp;#10;MOMVV3MyEa82YhxhWh6xkYQSJ1hLqeA/VJGDvjHHLIuOo0efuB68LaB9VAGvzu46Cu9FYqZoheRr&amp;#13;&amp;#10;UewAtzlnfS4qvXBNyyq5eTxLwmrhYlbG7WJ8UCV7gBMnvsNZCn0zT0vH8EFEHDV3GE4UDklCFNLf&amp;#13;&amp;#10;+D4hFdbdodTx6zb1BZd8qtAdivqYVrpkTCdONi0GbdEY4jKvshni7fhm+zbqc1Zl9SY5cJFQFZhV&amp;#13;&amp;#10;KD8mzHHjVTxTOK5iOcYxKzv8OlZRlZJ7c+GXcUOpINIhYRwNAyJl1ZibAuwtBf0aho5VGfZtNo9d&amp;#13;&amp;#10;pFB0v4rndcx5GbnJ9wcRjtMq7B5NojL2A7kPKYrRDldV8G3uVoh+hzjg5MRw36bECffp3eAWDR2V&amp;#13;&amp;#10;Fgmiv8yEjiW0aqcDxzT5u3bMKPRjmwPn146hAT7/+lFFZr2tjXgD5qSqStg61n5Pwh1vugMuAvr2&amp;#13;&amp;#10;99xNPEt2CKT58sTzruW+a7nef77lnlTPZ220i94KbVevG+yi2CyR4xNXyFPK2J6aM3JdmkWyhHki&amp;#13;&amp;#10;GAFRjzM7QVLsmNIIHrO+7uBCgc0YJLj6iKpoL8IpLLDrnmYSyox1KFHKJWzsDLmSt8bDIl3ZbWFb&amp;#13;&amp;#10;bxhsP5BYbfPAkpuanO8LCjZmtgnN5jMX1NQMziqseSljCma/jrC6VurM0upGNdPqHGmFyRDDZdOA&amp;#13;&amp;#10;WHgTFiAIli3g5Q7sxbVo2JhgRgLtdzv35mExUTjPEMkIBySLkbZ7OUZ1E6Q8V8xJAORORYz0Ju8U&amp;#13;&amp;#10;r5WkdTXbN5B2liCVxbVOEJdH702ilGfwIkq6bo+VI0vKxckSdNjzuu1G20M+TnveFPa08BinEHWp&amp;#13;&amp;#10;13yYhXAa5Cth0/7UYjZVvohmNzfMLYI6HFNYvy8Z7PSBVEi1iWVkU8N8ylKAJVqS1b/RBreelwE2&amp;#13;&amp;#10;019Di+YqJMO/pgX40Q0tmU6Jr8rBLlG07+xr1kr5TBGxFwWHaMJmYhdD+HWqgj0BlXA0YTqCfoFz&amp;#13;&amp;#10;NO1t88ltzlnRlU+vDM7SMUsjnLVbXaJ5JVu4qeNCB/NWUg9sq9TdGPfqppiSPydTymn8PzNFzydw&amp;#13;&amp;#10;UtAMdAR8OJQVGOl67XlcqIhDF0oj6o8ELBxM74BsgbNY+AxJBSfI5leQA/1ra87yMGUNGz61S0Mk&amp;#13;&amp;#10;KMxHKhKE7EBbMtl3CrN6NndZlixjZDKqpK5MrdoTckDYWPfAjp7bPRRBqptukrUBgzuef+57VkGT&amp;#13;&amp;#10;UC9yyvXm9JBi7rU18E+vfGwxg1FuHzYLmtz/hYoVs6odb4bnc2/ZEP1hscxq5VUBwkpTQTcr+9dU&amp;#13;&amp;#10;4RWnWtuxlixutHPlIIrLFgOxWBClcN6D9D+Y/6jwmb1t0BPqmO9Cb0Vw0aCZQdpAVl+wCw+kG6Ql&amp;#13;&amp;#10;TmDhZIk2mTQr69ps6aS9lk/W57zSLeQec7bW7CzxfkVnF4szV5xTi+fp7MzDjq8t7URXQ2SPlyiQ&amp;#13;&amp;#10;pvlGxgSm6tZpG6doEtZ7Htz8QKDvwRPcHXlAa2haQ9PgCS6EYLFkb3F6XvaQU+C7pRSYZk5p5phW&amp;#13;&amp;#10;TmnllHZOgcVZdl+SUzrQqfQVB1yx6R8P5bcZsILLbj/ypupcza3/BQAA//8DAFBLAwQUAAYACAAA&amp;#13;&amp;#10;ACEAnGZGQbsAAAAkAQAAKgAAAGNsaXBib2FyZC9kcmF3aW5ncy9fcmVscy9kcmF3aW5nMS54bWwu&amp;#13;&amp;#10;cmVsc4SPzQrCMBCE74LvEPZu0noQkSa9iNCr1AcIyTYtNj8kUezbG+hFQfCyMLPsN7NN+7IzeWJM&amp;#13;&amp;#10;k3ccaloBQae8npzhcOsvuyOQlKXTcvYOOSyYoBXbTXPFWeZylMYpJFIoLnEYcw4nxpIa0cpEfUBX&amp;#13;&amp;#10;NoOPVuYio2FBqrs0yPZVdWDxkwHii0k6zSF2ugbSL6Ek/2f7YZgUnr16WHT5RwTLpRcWoIwGMwdK&amp;#13;&amp;#10;V2edNS1dgYmGff0m3gAAAP//AwBQSwECLQAUAAYACAAAACEAu+VIlAUBAAAeAgAAEwAAAAAAAAAA&amp;#13;&amp;#10;AAAAAAAAAAAAW0NvbnRlbnRfVHlwZXNdLnhtbFBLAQItABQABgAIAAAAIQCtMD/xwQAAADIBAAAL&amp;#13;&amp;#10;AAAAAAAAAAAAAAAAADYBAABfcmVscy8ucmVsc1BLAQItABQABgAIAAAAIQAdRHjDRgsAAO97AAAf&amp;#13;&amp;#10;AAAAAAAAAAAAAAAAACACAABjbGlwYm9hcmQvZHJhd2luZ3MvZHJhd2luZzEueG1sUEsBAi0AFAAG&amp;#13;&amp;#10;AAgAAAAhAOFRNx/PBgAA5hsAABoAAAAAAAAAAAAAAAAAow0AAGNsaXBib2FyZC90aGVtZS90aGVt&amp;#13;&amp;#10;ZTEueG1sUEsBAi0AFAAGAAgAAAAhAJxmRkG7AAAAJAEAACoAAAAAAAAAAAAAAAAAqhQAAGNsaXBi&amp;#13;&amp;#10;b2FyZC9kcmF3aW5ncy9fcmVscy9kcmF3aW5nMS54bWwucmVsc1BLBQYAAAAABQAFAGcBAACtFQAA&amp;#13;&amp;#10;AAA=&amp;#13;&amp;#10;" o:spid="_x0000_i1026"&gt;&lt;v:imagedata mce_src="file:///C:\Users\mlawrenc\AppData\Local\Temp\msohtmlclip1\01\clip_image001.png" src="file:///C:\Users\mlawrenc\AppData\Local\Temp\msohtmlclip1\01\clip_image001.png" o:title="" cropleft="-133f" cropbottom="-279f"&gt;&lt;/v:imagedata&gt;&lt;o:lock v:ext="edit" aspectratio="f"&gt;&lt;/o:lock&gt;&lt;/v:shape&gt;&lt;/SPAN&gt;&lt;SPAN style="TEXT-DECORATION: none; text-underline: none"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/H2&gt;
&lt;H2 style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;SPAN style="TEXT-DECORATION: none"&gt;&lt;U&gt;&lt;FONT size=3 face=Calibri&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/H2&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;IMG style="WIDTH: 631px; HEIGHT: 278px" title="Text separated from rendering" alt="Text separated from rendering" src="http://blogs.msdn.com/photos/directx/images/9938516/original.aspx" width=631 height=278 mce_src="http://blogs.msdn.com/photos/directx/images/9938516/original.aspx"&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;This separation is accomplished by allowing an application to implement a callback interface (&lt;/FONT&gt;&lt;SPAN class=codeChar&gt;&lt;FONT face="Courier New"&gt;IDWriteTextRenderer&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt;) and then target a particular glyph rendering API to render the laid-out glyphs. For GDI, this would be &lt;/FONT&gt;&lt;SPAN class=codeChar&gt;&lt;FONT face="Courier New"&gt;ExtTextOut&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt;, for Direct2D &lt;/FONT&gt;&lt;SPAN class=codeChar&gt;&lt;FONT face="Courier New"&gt;ID2D1RenderTarget::DrawGlyphRun&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt; and for DirectWrite &lt;/FONT&gt;&lt;SPAN class=codeChar&gt;&lt;FONT face="Courier New"&gt;IDWriteBitmapRenderTarget::DrawGlyphRun&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt;. Conveniently, &lt;/FONT&gt;&lt;SPAN class=codeChar&gt;&lt;FONT face="Courier New"&gt;DrawGlyphRun&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt; in both Direct2D and DirectWrite have exactly compatible parameters to the &lt;/FONT&gt;&lt;SPAN class=codeChar&gt;&lt;FONT face="Courier New"&gt;DrawGlyphRun&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt; method that the application implements on &lt;/FONT&gt;&lt;SPAN class=codeChar&gt;&lt;FONT face="Courier New"&gt;IDWriteTextRenderer&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Following a similar separation, text specific features such as font enumeration and management, glyph analysis, etc. are handled by DirectWrite rather than Direct2D. The DirectWrite objects are accepted directly by Direct2D. To help existing GDI applications to take advantage of DirectWrite, it provides the &lt;/FONT&gt;&lt;SPAN class=codeChar&gt;&lt;FONT face="Courier New"&gt;IDWriteGDIInteropMethod&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt; interface with methods to:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpFirst&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;·&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Create a DirectWrite Font from a GDI Logical Font (&lt;/FONT&gt;&lt;SPAN class=codeChar&gt;&lt;FONT face="Courier New"&gt;CreateFontFromLOGFONT&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt;).&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;·&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Convert from a DirectWrite Font Face to a GDI Logical Font (&lt;/FONT&gt;&lt;SPAN class=codeChar&gt;&lt;FONT face="Courier New"&gt;ConvertFontFacetoLOGFONT&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt;).&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;·&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Retrieve the Direct Write Font Face from the one currently selected into an HDC. (&lt;/FONT&gt;&lt;SPAN class=codeChar&gt;&lt;FONT face="Courier New"&gt;CreateFontFaceFromHDC&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt;).&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpLast&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;·&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Create a DirectWrite bitmap render target in system memory (&lt;/FONT&gt;&lt;SPAN class=codeChar&gt;&lt;FONT face="Courier New"&gt;CreateBitmapRenderTarget&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt;).&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;H2 style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;SPAN style="TEXT-DECORATION: none"&gt;&lt;FONT size=3 face=Calibri&gt;&lt;U&gt;&lt;/U&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/H2&gt;
&lt;H1 style="MARGIN: 0in 0in 0pt"&gt;&lt;U&gt;&lt;FONT size=4&gt;&lt;FONT face=Calibri&gt;Glyphs versus Text&lt;SPAN style="TEXT-DECORATION: none; text-underline: none"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;/H1&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Both Direct2D and DirectWrite have a very strict separation in the API between Text and Glyphs. Text is a set of Unicode code points (characters), with various stylistic modifiers (fonts, weights, underlines, strikethroughs etc.) that is laid out within a rectangle. A glyph, in contrast, is a particular index into a particular font file. A glyph defines a set of curves which can be rendered, but, it doesn’t have any textual meaning. There is potentially a many to many mapping between glyphs and characters. A sequence of glyphs that come from the same Font Face and that are laid-out sequentially on a baseline is called a GlyphRun. Both DirectWrite and Direct2D call their most precise glyph rendering API &lt;/FONT&gt;&lt;SPAN class=codeChar&gt;&lt;FONT face="Courier New"&gt;DrawGlyphRun&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt; and they have very similar signatures. We’ll show Direct2D’s:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=code&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;STDMETHOD_(void, DrawGlyphRun)(&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=code&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;D2D1_POINT_2F baselineOrigin,&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=code&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;__in CONST DWRITE_GLYPH_RUN *glyphRun,&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=code&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;__in ID2D1Brush *foregroundBrush,&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=code&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=code&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;) PURE;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Each glyph run starts at an origin and is placed on a line starting from this origin. The glyphs are modified by the current world transform and the selected text rendering settings on the associated render target. This API is generally called directly only by APIs that do their own layout (For example a Word Processor) or by an application that has implemented the &lt;/FONT&gt;&lt;SPAN class=codeChar&gt;&lt;FONT face="Courier New"&gt;IDWriteTextRenderer&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt; interface. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;H1 style="MARGIN: 0in 0in 0pt"&gt;&lt;U&gt;&lt;FONT size=4&gt;&lt;FONT face=Calibri&gt;DirectWrite and Direct2D&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;/H1&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Architecturally, it would be ideal for Direct2D and DirectWrite to have a clear distinction of roles. Direct2D would provide rendering services (&lt;/FONT&gt;&lt;SPAN class=codeChar&gt;&lt;FONT face="Courier New"&gt;DrawGlyphRun&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt;) and DirectWrite would provide layout, fonts and other text services. However, during the design of Direct2D, we very quickly realized that asking an application to implement the text rendering interface to replace the equivalent of USER32’s &lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;DrawText&lt;/SPAN&gt;&lt;FONT face=Calibri&gt; API would probably be too large a burden initially. Conversely, applications will want a way to do basic glyph rendering through DirectWrite without pulling in all of D2D. So, the relationship is a little more complex, and DirectWrite provides for glyph rendering through the &lt;/FONT&gt;&lt;SPAN class=codeChar&gt;&lt;FONT face="Courier New"&gt;IDWriteBitmapRenderTarget::DrawGlyphRun&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt; API. Similarly Direct2D provides some APIs that accept text rather than Glyphs through &lt;/FONT&gt;&lt;SPAN class=codeChar&gt;&lt;FONT face="Courier New"&gt;ID2D1RenderTarget::DrawTextLayout&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt; and &lt;/FONT&gt;&lt;SPAN class=codeChar&gt;&lt;FONT face="Courier New"&gt;ID2D1RenderTarget::DrawText&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt;. An application’s usage of text tends to start simple: put OK or Cancel on a fixed-layout button, for example.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;But, over time it becomes more complex as internationalization and other features are added. Eventually many applications will reach the point where using DirectWrite’s text layout objects and implementing the text renderer will become necessary.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;For this reason, Direct2D provides layered APIs that allow an application to start simply and grow more sophisticated without having to back-track or abandon their working code. A simplified view is shown below:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;IMG style="WIDTH: 774px; HEIGHT: 329px" title="DrawText migration" alt="DrawText migration" src="http://blogs.msdn.com/photos/directx/images/9938518/original.aspx" width=774 height=329 mce_src="http://blogs.msdn.com/photos/directx/images/9938518/original.aspx"&gt;&lt;/FONT&gt;&lt;/o:p&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;&lt;v:shape style="WIDTH: 579.75pt; HEIGHT: 246pt" id=_x0000_i1025 type="#_x0000_t75" o:ole=""&gt;&lt;v:imagedata mce_src="file:///C:\Users\mlawrenc\AppData\Local\Temp\msohtmlclip1\01\clip_image003.emz" src="file:///C:\Users\mlawrenc\AppData\Local\Temp\msohtmlclip1\01\clip_image003.emz" o:title=""&gt;&lt;/v:imagedata&gt;&lt;/v:shape&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt; 
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;DrawText &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;This is the simplest of the APIs to use. It takes a Unicode string, a foreground brush, a single format object and a destination rectangle. It will lay-out and render the entire string within the layout rectangle, and optionally clip it. This is useful when putting a simple piece of text within a piece of fixed-layout UI.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;DrawTextLayout&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;If the application would like to start measuring and arranging the text and other UI elements, or, if it wants to support multiple fonts, styles, underlines and strikethroughs; it can create a text layout object using DirectWrite. Direct2D provides the &lt;/FONT&gt;&lt;SPAN class=codeChar&gt;&lt;FONT face="Courier New"&gt;DrawTextLayout&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt; API that directly accepts this object and renders the text at a given point. (The width and height are provided by the layout object). As well as implementing all of the expected text layout features, Direct2D will interpret any effect object as a brush and apply that brush to the selected range of glyphs. It will also call any inline objects, which allows an application to insert non-glyph “characters” (icons) into the text if it wishes. Another advantage of using a text layout object is that the glyph positions are cached in it. Hence, there is a large performance gain to be had by reusing the same layout object for multiple draw calls and avoiding recalculating the glyph positions for each call. This capability is not present for USER32’s &lt;/FONT&gt;&lt;SPAN class=codeChar&gt;&lt;FONT face="Courier New"&gt;DrawText&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;DrawGlyphRun&lt;/B&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;BR&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Finally, the application can implement the &lt;/FONT&gt;&lt;SPAN class=codeChar&gt;&lt;FONT face="Courier New"&gt;IDWriteTextRenderer&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt; interface themselves and call &lt;/FONT&gt;&lt;SPAN class=codeChar&gt;&lt;FONT face="Courier New"&gt;DrawGlyphRun&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt; and &lt;/FONT&gt;&lt;SPAN class=codeChar&gt;&lt;FONT face="Courier New"&gt;FillRectangle&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt; themselves (or any other rendering API). All of the existing interaction with the Text Layout object will remain unchanged.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;H1 style="MARGIN: 0in 0in 0pt"&gt;&lt;U&gt;&lt;FONT size=4&gt;&lt;FONT face=Calibri&gt;Glyph Rendering in Direct2D versus DirectWrite&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;/H1&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;DirectWrite allows an existing GDI application to obtain advanced text rendering features such as:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpFirst&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;·&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;Sub-pixel ClearType. This allows an application to place glyphs on sub-pixel positions to allow for both sharp glyph rendering as well as even glyph layout.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpLast&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;·&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;Y-direction anti-aliasing. This allows smoother rendering of curves on larger glyphs.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;The application can obtain these without having to pull in other DirectX APIs through the &lt;/FONT&gt;&lt;SPAN class=codeChar&gt;&lt;FONT face="Courier New"&gt;IDWriteBitmapRenderTarget&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt; API. This allows glyphs to be rendered with a solid color to a memory DC. An application moving to Direct2D will also obtain the following features:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpFirst&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;·&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;Hardware acceleration.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;·&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;The ability to fill text with an arbitrary brush. (Radial Gradients, Linear Gradients and Bitmaps).&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;·&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;More support for layering and clipping through the &lt;/FONT&gt;&lt;SPAN class=codeChar&gt;&lt;FONT face="Courier New"&gt;PushAxisAlignedClip&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt;, &lt;/FONT&gt;&lt;SPAN class=codeChar&gt;&lt;FONT face="Courier New"&gt;PushLayer&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt; and &lt;/FONT&gt;&lt;SPAN class=codeChar&gt;&lt;FONT face="Courier New"&gt;CreateCompatibleRenderTarget&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt; APIs.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpLast&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;·&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;The ability to support Grayscale text rendering. This correctly populates the destination alpha channel according to both the text brush opacity and the anti-aliasing of the text.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;In order to efficiently support hardware acceleration, Direct2D uses a slightly different approximation to Gamma correction called “alpha correction”. This doesn’t require Direct2D to inspect the render target color pixel when rendering text. Although this could be done entirely on the GPU by reading from the render target to another texture, this would prevent Direct2D from batching its calls to Direct3D efficiently since a batch would not be able to span any render target read-back. (See &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/en-us/magazine/dd861344.aspx" mce_href="http://msdn.microsoft.com/en-us/magazine/dd861344.aspx"&gt;&lt;FONT color=#0000ff size=3 face=Calibri&gt;the MSDN article&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt; by Kenny Kerr to obtain more information about Direct2D batching).&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;H1 style="MARGIN: 0in 0in 0pt"&gt;&lt;U&gt;&lt;FONT size=4&gt;&lt;FONT face=Calibri&gt;Conclusion&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;/H1&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;We hope that this article helps you understand the differences and similarities between Direct2D and DirectWrite as well as the architectural motivations for providing these as separate technologies. For more information please see:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpFirst&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;·&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/dd370990.aspx" mce_href="http://msdn.microsoft.com/en-us/library/dd370990.aspx"&gt;&lt;FONT color=#0000ff size=3 face=Calibri&gt;The Direct2D reference on MSDN&lt;/FONT&gt;&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpLast&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;·&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/dd368038.aspx" mce_href="http://msdn.microsoft.com/en-us/library/dd368038.aspx"&gt;&lt;FONT color=#0000ff size=3 face=Calibri&gt;The DirectWrite reference on MSDN&lt;/FONT&gt;&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9938514" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/directx/archive/tags/Graphics/">Graphics</category><category domain="http://blogs.msdn.com/b/directx/archive/tags/DirectX/">DirectX</category><category domain="http://blogs.msdn.com/b/directx/archive/tags/GDI_2B00_/">GDI+</category><category domain="http://blogs.msdn.com/b/directx/archive/tags/GDI/">GDI</category><category domain="http://blogs.msdn.com/b/directx/archive/tags/Direct2D/">Direct2D</category><category domain="http://blogs.msdn.com/b/directx/archive/tags/DirectWrite/">DirectWrite</category></item><item><title>Animated 2D Graphics for UI, Games, and Demos</title><link>http://blogs.msdn.com/b/directx/archive/2009/12/12/animated-2d-graphics-for-ui-games-and-demos.aspx</link><pubDate>Sat, 12 Dec 2009 02:14:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9935987</guid><dc:creator>Aisha Ayoub</dc:creator><slash:comments>12</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/directx/rsscomments.aspx?WeblogPostID=9935987</wfw:commentRss><comments>http://blogs.msdn.com/b/directx/archive/2009/12/12/animated-2d-graphics-for-ui-games-and-demos.aspx#comments</comments><description>&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-STYLE: normal; COLOR: windowtext; FONT-SIZE: 13.5pt; FONT-WEIGHT: normal; mso-fareast-font-family: 'MS Mincho'; mso-bidi-font-family: Arial; mso-ascii-font-family: Cambria; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Cambria"&gt;&lt;FONT face=Cambria&gt;&lt;STRONG&gt;Introduction&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;In this post, I present a sample animation framework that demonstrates how Direct2D and DirectWrite can be used in a wide variety of applications. This post is targeted at game developers and demoscene coders who want to take advantage of modern hardware-accelerated components.&lt;/P&gt;
&lt;P&gt;Direct2D was designed for applications that need graphics intensive operations and yet demand high performance and reliability; these applications include internet browsers, office applications, and graphics editors. But Direct2D’s applicability extends beyond these problem domains and well into the realms of games and art. &lt;/P&gt;
&lt;P&gt;Graphics sell games. Therefore, they need to be very fast and look great. Even though the majority of games are heavily 3D, there is also a large chunk of 2D graphics in games, particularly UI components and textures. Also games from some genres, such as puzzle, strategy, and educational games, mostly use 2D graphics. &lt;/P&gt;
&lt;P&gt;Then there is the “demoscene,” a competitive, computer arts subculture, where teams of amateur coders, musicians and graphics artists create demos, programs that include hard-to-code visual effects with graphics and synchronized music, much like music videos. 2D graphics in particular is a rising trend in demos in the last few years (see Masagin by Farbraush &amp;amp; Neuro or Metamorphosis by ASD for example)&lt;/P&gt;
&lt;P&gt;While differences remain among a graphical editor application such as Adobe Illustrator, a real time strategy game and a demoscene demo, they present some of the same challenges:&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;A continuous float 2D problem space: The focus can move to different sections of the space, zooming in and out.&lt;/LI&gt;
&lt;LI&gt;Lots of cool animations: Animations contain a lot of visual information and contribute to the flow and artistic composition of non interactive sequences in games (i.e. cut scenes) as well as all the game world and characters. Game UIs often make heavy use of animation.&lt;/LI&gt;
&lt;LI&gt;Interoperability with Direct3D: If you are creating a 3D game, the chances are that you’ve already been using&amp;nbsp; Direct3D. Therefore it is crucial that what you do with your 2D API works nicely with Direct3D. &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Direct2D is really great for addressing these issues. All drawings in Direct2D happen in a continuous float space, with the ability to apply transformation matrices with a few lines of code. Direct2D also gives you a lot of power for rich animation by providing very fast animation methods for transforms and by minimizing graphics bus traffic with the use of mesh and mask capabilities. Direct2D is further designed to interoperate well with Direct3D. By using Direct2D, you can directly render into Direct3D textures and use those textures to wrap your 3D models. For more information about Direct2D, see &lt;A href="http://msdn.microsoft.com/en-us/library/dd370990(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/dd370990(VS.85).aspx"&gt;http://msdn.microsoft.com/en-us/library/dd370990(VS.85).aspx&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-STYLE: normal; COLOR: windowtext; FONT-SIZE: 13.5pt; FONT-WEIGHT: normal; mso-fareast-font-family: 'MS Mincho'; mso-bidi-font-family: Arial; mso-ascii-font-family: Cambria; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Cambria"&gt;&lt;FONT face=Cambria&gt;&lt;STRONG&gt;The Graphimation Framework Basics&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;During the development of Direct2D, I had the opportunity to actually apply some of these ideas to a prototype scenario. Once I recognized the value Direct2D has for the mentioned application spaces, I decided to design an animated 2D graphics framework in native C++, called the Graphimation Framework. I then used the framework to create three applications to showcase what you can do with the framework.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Direct2D Demo: A non-interactive demoscene-style demo.&lt;/LI&gt;
&lt;LI&gt;Carousel: A modern animated UI prototype that has arbitrarily-shaped widgets.&lt;/LI&gt;
&lt;LI&gt;D2DRTS: A simple real time strategy game.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;With the ease of use and direct applicability that Direct2D possesses, I was able to implement these applications in about 4 weeks.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Disclaimer&lt;/STRONG&gt;: All the code and documentation for Graphimation Framework is provided to the developer community as an example and is not an official Microsoft product. You can access the download at: &lt;A href="http://code.msdn.microsoft.com/graphimation"&gt;http://code.msdn.microsoft.com/graphimation&lt;/A&gt;&lt;/P&gt;&lt;STRONG&gt;
&lt;H3 style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="LINE-HEIGHT: 115%; COLOR: black; FONT-SIZE: 12pt; mso-ascii-font-family: Cambria; mso-hansi-font-family: Cambria"&gt;&lt;FONT face=Cambria&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-STYLE: normal; COLOR: windowtext; FONT-SIZE: 13.5pt; FONT-WEIGHT: normal; mso-fareast-font-family: 'MS Mincho'; mso-bidi-font-family: Arial; mso-ascii-font-family: Cambria; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Cambria"&gt;&lt;FONT face=Cambria&gt;&lt;STRONG&gt;Graphimation Framework&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/H3&gt;&lt;/STRONG&gt;
&lt;P&gt;Let’s take a closer look at what the Graphimation Framework provides.&amp;nbsp; It provides an interface called IGraphimation. This interface encapsulates a graphics object that can be rendered and includes some animations. It can also provide some named variables that its client can set to customize certain aspects of the graphimation object. You can also hit test against a graphimation.&lt;/P&gt;
&lt;P&gt;A graphimation object is defined and initialized by an external file (a .d2g file). Once a graphimation object is initialized, you need to call render() on it from your render function, and update() it with time passed between each invocation of the main loop. &lt;/P&gt;
&lt;P&gt;Each graphimation object (for example, a soldier in the RTS game) defines one or more animations. Through the render + update mechanics, each animation automatically keeps playing. Animations can also loop or tie into other animations. All this is automatically handled by the Graphimation Framework. The client can switch any animation.&amp;nbsp; For example, to make a soldier walk, the application calls PlayAnimation(“walk”).&lt;/P&gt;
&lt;P&gt;If you want to see more information about how to create and use graphimations, see the GraphimationFrameworkManual.docx file in the Doc folder in the sources. It provides information about the internal workings of the framework.&lt;/P&gt;&lt;STRONG&gt;
&lt;H3 style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="LINE-HEIGHT: 115%; COLOR: black; FONT-SIZE: 12pt; mso-ascii-font-family: Cambria; mso-hansi-font-family: Cambria"&gt;&lt;FONT face=Cambria&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-STYLE: normal; COLOR: windowtext; FONT-SIZE: 13.5pt; FONT-WEIGHT: normal; mso-fareast-font-family: 'MS Mincho'; mso-bidi-font-family: Arial; mso-ascii-font-family: Cambria; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Cambria"&gt;&lt;FONT face=Cambria&gt;&lt;STRONG&gt;.d2g files&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/H3&gt;&lt;/STRONG&gt;
&lt;P&gt;All the graphics and animations are defined in the d2g files. A d2g file defines the following:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Resources, such as geometries, brushes, and transforms.&lt;/LI&gt;
&lt;LI&gt;Render functions, such as Fill, Stroke, and PushTransform.&lt;/LI&gt;
&lt;LI&gt;Controllers that can be bound to variables, such as linear and sinusoidal.&lt;/LI&gt;
&lt;LI&gt;Named animations, such as&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;a render function that refers to resources to render stuff,&lt;/LI&gt;
&lt;LI&gt;and a main controller (that can include other controllers) tied to variables which cause the “change” in animations. &lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;
&lt;P&gt;In a d2g file, you can put a variable name almost anywhere that you can write a constant number. These variables can then either be set from outside the framework by the SetVariable interface or internally controlled by a controller. &lt;/P&gt;
&lt;P&gt;A graphimation object can also contain other graphimation objects as resources and render or update them. Therefore whole hierarchies of graphimation objects can be built and easily controlled. In fact, the entire Direct2D Demo is a single graphimation object that includes many others (like the fish, the plants, and the butterfly). Check out the manual for advanced techniques in using graphimations. Also please refer to the manual for further info on the d2g file syntax.&lt;/P&gt;&lt;STRONG&gt;
&lt;H3 style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="LINE-HEIGHT: 115%; COLOR: black; FONT-SIZE: 12pt; mso-ascii-font-family: Cambria; mso-hansi-font-family: Cambria"&gt;&lt;FONT face=Cambria&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-STYLE: normal; COLOR: windowtext; FONT-SIZE: 13.5pt; FONT-WEIGHT: normal; mso-fareast-font-family: 'MS Mincho'; mso-bidi-font-family: Arial; mso-ascii-font-family: Cambria; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Cambria"&gt;&lt;FONT face=Cambria&gt;&lt;STRONG&gt;Framework Library Dependencies and Implementation Details&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/H3&gt;&lt;/STRONG&gt;
&lt;P&gt;Implementing this framework was very easy with Direct2D and took only about two-dev weeks. A large portion of the code is for parsing the d2g files. Since Direct2D maps to this problem so well, the rest of the code is just simple wrapper classes around Direct2D classes with ten – twenty lines of code each.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="LINE-HEIGHT: 115%; COLOR: black; FONT-SIZE: 12pt; mso-ascii-font-family: Cambria; mso-hansi-font-family: Cambria"&gt;&lt;FONT face=Cambria&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-STYLE: normal; COLOR: windowtext; FONT-SIZE: 13.5pt; FONT-WEIGHT: normal; mso-fareast-font-family: 'MS Mincho'; mso-bidi-font-family: Arial; mso-ascii-font-family: Cambria; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Cambria"&gt;&lt;FONT face=Cambria&gt;&lt;STRONG&gt;Library Dependencies&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/STRONG&gt;
&lt;P&gt;Graphimation Framework depends pretty heavily on STL and Boost. The Graphimation Framework only needs the headers from the Boost libraries, so you only need to download Boost—you don’t have to build it. You do need to add the Boost path to your include path in Visual Studio. &lt;/P&gt;
&lt;P&gt;You also need the Windows 7 SDK, which is available at &lt;A href="http://msdn.microsoft.com/en-us/windows/bb980924.aspx" mce_href="http://msdn.microsoft.com/en-us/windows/bb980924.aspx"&gt;http://msdn.microsoft.com/en-us/windows/bb980924.aspx&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;As Graphimation is provided as a Visual C++2008 project, you also need a version of Visual Studio 2008. The free express one from &lt;A href="http://www.microsoft.com/exPress/" mce_href="http://www.microsoft.com/exPress/"&gt;http://www.microsoft.com/exPress/&lt;/A&gt; will do.&lt;/P&gt;&lt;STRONG&gt;
&lt;H3 style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="LINE-HEIGHT: 115%; COLOR: black; FONT-SIZE: 12pt; mso-ascii-font-family: Cambria; mso-hansi-font-family: Cambria"&gt;&lt;FONT face=Cambria&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-STYLE: normal; COLOR: windowtext; FONT-SIZE: 13.5pt; FONT-WEIGHT: normal; mso-fareast-font-family: 'MS Mincho'; mso-bidi-font-family: Arial; mso-ascii-font-family: Cambria; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Cambria"&gt;&lt;FONT face=Cambria&gt;&lt;STRONG&gt;Implementation Details and Class Diagrams&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/H3&gt;&lt;/STRONG&gt;
&lt;P&gt;Throughout the framework the RAII concept is used to control all the resources, so the framework satisfies the “basic exception safety” guarantee that no resources will be leaked on the face of exceptions (which may happen due to STL, Boost, or new -- GXM also converts D2D errors into exceptions too). However, the framework does NOT provide “strong exception safety,” meaning that, in the case of an exception, the object may not be in a usable state. Finally, any exceptions thrown from Boost or STL are caught at the module boundary and converted to error codes. Therefore, the client code does not see any exceptions.&lt;/P&gt;
&lt;P&gt;The following diagram shows a group of main classes and their relationships.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG style="WIDTH: 511px; HEIGHT: 419px" title="uml diagram" alt="uml diagram" align=middle src="http://blogs.msdn.com/photos/directx/images/9928848/original.aspx" width=511 height=419 mce_src="http://blogs.msdn.com/photos/directx/images/9928848/original.aspx"&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="LINE-HEIGHT: 115%; COLOR: black; FONT-SIZE: 12pt; mso-ascii-font-family: Cambria; mso-hansi-font-family: Cambria"&gt;&lt;FONT face=Cambria&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-STYLE: normal; COLOR: windowtext; FONT-SIZE: 13.5pt; FONT-WEIGHT: normal; mso-fareast-font-family: 'MS Mincho'; mso-bidi-font-family: Arial; mso-ascii-font-family: Cambria; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Cambria"&gt;&lt;FONT face=Cambria&gt;&lt;STRONG&gt;Samples Using the Graphimation Framework&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/STRONG&gt;
&lt;P&gt;Here I describe three samples that use the Graphimation Framework:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Direct2D Demo: a non-interactive demoscene style demo.&lt;/LI&gt;
&lt;LI&gt;Carousel: a modern animated UI prototype that has arbitrarily-shaped widgets.&lt;/LI&gt;
&lt;LI&gt;D2DRTS: a 2D real-time strategy game prototype.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="LINE-HEIGHT: 115%; COLOR: black; FONT-SIZE: 12pt; mso-ascii-font-family: Cambria; mso-hansi-font-family: Cambria"&gt;&lt;FONT face=Cambria&gt;The Direct2D Demo&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/STRONG&gt;
&lt;P&gt;By using the framework, I implemented a simple player that can play a .d2g file, and then created a set of nested .d2g files that made up a demoscene style demo. You can see what is shown in the following screen shot by running the demo.bat file in the GxmPlayer sources. &lt;/P&gt;
&lt;P&gt;&lt;IMG style="WIDTH: 403px; HEIGHT: 301px" title="D2D demo" alt="D2D demo" src="http://blogs.msdn.com/photos/directx/images/9928851/original.aspx" width=403 height=301 mce_src="http://blogs.msdn.com/photos/directx/images/9928851/original.aspx"&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="LINE-HEIGHT: 115%; COLOR: black; FONT-SIZE: 12pt; mso-ascii-font-family: Cambria; mso-hansi-font-family: Cambria"&gt;&lt;FONT face=Cambria&gt;Carousel Widget Library&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;By using this framework, I implemented an animated UI framework prototype called Carousel with only a few hundred lines of code. Simply each widget has a corresponding Graphimation object that can be animated in different ways. For example, the following screen shot shows several parent and child widgets,&lt;/P&gt;
&lt;P&gt;&lt;IMG style="WIDTH: 378px; HEIGHT: 347px" title="Carousel Demo" alt="Carousel Demo" src="http://blogs.msdn.com/photos/directx/images/9928852/original.aspx" width=378 height=347 mce_src="http://blogs.msdn.com/photos/directx/images/9928852/original.aspx"&gt;&lt;/P&gt;
&lt;P&gt;When a parent widget is clicked, child widget graphimations simply play an animation (they “open up” around their parent). The idea was providing menu navigation with minimum distance of mouse movement. All options in a menu are at a small distance from where your mouse is, thanks to the circular structure of the menus. Another interesting point is that, since Direct2D provides hit testing with arbitrary geometries, your widgets do not have to be rectangular. The Graphimation Framework provides hit testing for any sub resources it contains. &lt;/P&gt;&lt;STRONG&gt;
&lt;H3 style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="LINE-HEIGHT: 115%; COLOR: black; FONT-SIZE: 12pt; mso-ascii-font-family: Cambria; mso-hansi-font-family: Cambria"&gt;&lt;FONT face=Cambria&gt;D2DRTS - A 2D Real Time Strategy Game Prototype&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P&gt;Writing a simple RTS game became a lot easier with the&amp;nbsp; Graphimation Framework. As mentioned before, the soldiers are instances of the same graphimation type (i.e. the same .d2g file). They support a set of animations (stand, walk, fight, die etc.) and once all the graphical concerns are handled by the Graphimation Framework, the remaining game code is greatly simplified. In the example shown in the following screen shot, all I did was to implement a few classes for the game world, soldier and AI, and it only took a few hundred lines!&lt;/P&gt;
&lt;P&gt;&lt;IMG style="WIDTH: 498px; HEIGHT: 372px" title="D2D RTS" alt="D2D RTS" src="http://blogs.msdn.com/photos/directx/images/9928853/original.aspx" width=498 height=372 mce_src="http://blogs.msdn.com/photos/directx/images/9928853/original.aspx"&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT size=4 face=Cambria&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;FONT size=4 face=Cambria&gt;Conclusions&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Of course a real UI framework, a real game, or a real demoscene demo will need to be more complex, but these examples help show how easy it can be to build a 2D graphic animation framework with Direct2D and be able to reuse it in a variety of cool applications.&lt;/P&gt;
&lt;P&gt;In summary, this blog post provided a perspective on the applicability of Direct2D on certain sets of applications. A set that is not necessarily the one that comes to mind when speaking of Direct2D. Irrespective of which industry you develop software for, if your problem domain includes issues like “animated 2D graphics” and “a continuous 2D float coordinate space”, then you might enjoy a number of benefits from using Direct2D.&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;Bilgem Cakir, Direct2D Team&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9935987" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/directx/archive/tags/Direct2D/">Direct2D</category><category domain="http://blogs.msdn.com/b/directx/archive/tags/DirectWrite/">DirectWrite</category><category domain="http://blogs.msdn.com/b/directx/archive/tags/Animation/">Animation</category><category domain="http://blogs.msdn.com/b/directx/archive/tags/Games/">Games</category><category domain="http://blogs.msdn.com/b/directx/archive/tags/Demoscene/">Demoscene</category></item><item><title>Talks from PDC 2009 now available!</title><link>http://blogs.msdn.com/b/directx/archive/2009/11/25/talks-from-pdc-2009-now-available.aspx</link><pubDate>Wed, 25 Nov 2009 20:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9928859</guid><dc:creator>Aisha Ayoub</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/directx/rsscomments.aspx?WeblogPostID=9928859</wfw:commentRss><comments>http://blogs.msdn.com/b/directx/archive/2009/11/25/talks-from-pdc-2009-now-available.aspx#comments</comments><description>&lt;P style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;A href="http://microsoftpdc.com/" mce_href="http://microsoftpdc.com/"&gt;&lt;FONT color=#0000ff size=3 face="Times New Roman"&gt;PDC&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3 face="Times New Roman"&gt; this year had two sessions on DirectX technologies.&amp;nbsp; If you attended them: thank you!&amp;nbsp; For those who weren’t able to attend, the good news is that the sessions are now available online for viewing.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;FONT size=3 face="Times New Roman"&gt;“&lt;/FONT&gt;&lt;A href="http://microsoftpdc.com/Sessions/CL14" mce_href="http://microsoftpdc.com/Sessions/CL14"&gt;&lt;FONT color=#0000ff size=3 face="Times New Roman"&gt;Advanced Graphics Functionality Using DirectX”&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3 face="Times New Roman"&gt; is about Direct2D and DirectWrite, and builds atop last year’s &lt;/FONT&gt;&lt;A href="http://channel9.msdn.com/pdc2008/PC18/" mce_href="http://channel9.msdn.com/pdc2008/PC18/"&gt;&lt;FONT color=#0000ff size=3 face="Times New Roman"&gt;“Introducing Direct2D and DirectWrite”&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3 face="Times New Roman"&gt; PDC talk.&amp;nbsp; The second is &lt;/FONT&gt;&lt;A href="http://microsoftpdc.com/Sessions/CL15" mce_href="http://microsoftpdc.com/Sessions/CL15"&gt;&lt;FONT color=#0000ff size=3 face="Times New Roman"&gt;“Modern 3D Graphics Using Windows 7 and Direct3D 11 Hardware”&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3 face="Times New Roman"&gt;, and is about Direct3D 11, WARP, and Direct3D 10 Level 9. &lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;FONT size=3 face="Times New Roman"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;FONT size=3 face="Times New Roman"&gt;As always, we appreciate comments and suggestions for future blog posts.&lt;/FONT&gt;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9928859" width="1" height="1"&gt;</description></item><item><title>Internet Explorer announces to use DirectWrite &amp; Direct2D!</title><link>http://blogs.msdn.com/b/directx/archive/2009/11/18/internet-explorer-announces-to-use-directwrite-direct2d.aspx</link><pubDate>Wed, 18 Nov 2009 15:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9924833</guid><dc:creator>Aisha Ayoub</dc:creator><slash:comments>8</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/directx/rsscomments.aspx?WeblogPostID=9924833</wfw:commentRss><comments>http://blogs.msdn.com/b/directx/archive/2009/11/18/internet-explorer-announces-to-use-directwrite-direct2d.aspx#comments</comments><description>&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;Today, the Internet Explorer (IE) team announced they will be using DirectWrite and Direct2D for IE9!&amp;nbsp; Channel 9 takes us through to the halls of IE team, and shows a sneak peek at what they have in store for &lt;A href="http://channel9.msdn.com/posts/Charles/IE-9-Surfing-on-the-GPU-with-D2D/"&gt;&lt;SPAN style="COLOR: blue; mso-bidi-font-size: 11.0pt"&gt;IE9&lt;/SPAN&gt;&lt;/A&gt;.&amp;nbsp;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;Update: check out the &lt;A href="http://blogs.msdn.com/ie/archive/2009/11/18/an-early-look-at-ie9-for-developers.aspx"&gt;&lt;SPAN style="COLOR: blue; mso-bidi-font-size: 11.0pt"&gt;IE team blog&lt;/SPAN&gt;&lt;/A&gt; for their post on this announcement!&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9924833" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/directx/archive/tags/DX/">DX</category><category domain="http://blogs.msdn.com/b/directx/archive/tags/Graphics/">Graphics</category><category domain="http://blogs.msdn.com/b/directx/archive/tags/GDI/">GDI</category><category domain="http://blogs.msdn.com/b/directx/archive/tags/Direct2D/">Direct2D</category><category domain="http://blogs.msdn.com/b/directx/archive/tags/DirectWrite/">DirectWrite</category></item><item><title>Working Around Problems in ID2D1Bitmap's CopyFromBitmap and CopyFromRenderTarget</title><link>http://blogs.msdn.com/b/directx/archive/2009/11/17/working-around-problems-in-id2d1bitmap-s-copyfrombitmap-and-copyfromrendertarget.aspx</link><pubDate>Tue, 17 Nov 2009 14:50:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9914279</guid><dc:creator>Tom_Mulcahy</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/directx/rsscomments.aspx?WeblogPostID=9914279</wfw:commentRss><comments>http://blogs.msdn.com/b/directx/archive/2009/11/17/working-around-problems-in-id2d1bitmap-s-copyfrombitmap-and-copyfromrendertarget.aspx#comments</comments><description>&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;Developers using the ID2D1Bitmap::CopyFromBitmap and ID2D1Bitmap::CopyFromRenderTarget APIs may notice problems when the source and destination rectangles are of different sizes. In particular, the source rectangle is incorrectly clipped against the destination bounds (instead of against the source bounds). The destination rectangle is correctly clipped against the destination bounds.&lt;SPAN style="mso-bidi-font-family: Calibri"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;Terminology: &lt;/FONT&gt;&lt;FONT size=3 face=Calibri&gt;Since the problem in each API is very similar, it is helpful to talk about both problems at the same time. However, in order to do that, we need a common word to refer to either a bitmap or a render target. This post will use the term “Surface”.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;There are two possible manifestations of this problem:&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoPlainText&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo1" class=MsoPlainText&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 12pt; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin"&gt;&lt;SPAN style="mso-list: Ignore"&gt;1.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 12pt; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin"&gt;Access violation (crash)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 0.25in" class=MsoPlainText&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 12pt; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin"&gt;This happens when you pass a source rectangle that exceeds the bounds of the source surface but the destination surface is smaller than the source surface. The clipping will be insufficient and may result in a crash. In this case applications can work around this problem by sanitizing their inputs – don’t pass source rectangles that exceed the bounds of the source surface.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoPlainText&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 12pt; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo1" class=MsoPlainText&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 12pt; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin"&gt;&lt;SPAN style="mso-list: Ignore"&gt;2.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 12pt; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin"&gt;Over-clipping&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 0.25in" class=MsoPlainText&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 12pt; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin"&gt;This happens when you pass a source rectangle that doesn’t exceed the bounds of the source surface but does exceed the bounds of the destination surface. The clipping will be overly zealous and less data will be copied than requested. In this case there are three possible workarounds:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoPlainText&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 12pt; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.75in; mso-list: l0 level1 lfo2" class=MsoPlainText&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 12pt; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin"&gt;&lt;SPAN style="mso-list: Ignore"&gt;a)&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 12pt; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin"&gt;Use D3D&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 0.5in" class=MsoPlainText&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 12pt; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin"&gt;Since the problem is in D2D customers using D3D and D2D together can call the corresponding APIs on the D3D interfaces. This is the option with the best performance, but it may be cumbersome to code in some scenarios. It requires that all associated D2D bitmaps to have been created with ID2D1RenderTarget::CreateSharedBitmap (IDXGISurface variant) and all associated D2D render targets to have been created with ID2D1Factory::CreateDxgiSurfaceRenderTarget. For example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;FONT size=3&gt;IDXGISurface *pSurface;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;FONT size=3&gt;ID2D1Factory *pFactory;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;FONT size=3&gt;…&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;FONT size=3&gt;ID2D1RenderTarget *pRenderTarget = NULL;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;FONT size=3&gt;if (SUCCEEDED(pFactory-&amp;gt;CreateDxgiSurfaceRenderTarget(&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pSurface,&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; D2D1::RenderTargetProperties(&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; D2D1_RENDER_TARGET_TYPE_DEFAULT,&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; D2D1::PixelFormat(&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DXGI_FORMAT_UNKNOWN,&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; D2D1_ALPHA_MODE_PREMULTIPLIED))&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;pRenderTarget))&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;FONT size=3&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // &amp;lt;Snip&amp;gt; Your render target code goes here.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;FONT size=3&gt;ID2D1Bitmap *pBitmap = NULL;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;FONT size=3&gt;if (SUCCEEDED(pRenderTarget-&amp;gt;CreateSharedBitmap(&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; __uuidof(IDXGISurface),&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pSurface,&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; D2D1::BitmapProperties(&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; D2D1::PixelFormat(&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DXGI_FORMAT_UNKNOWN,&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; D2D1_ALPHA_MODE_PREMULTIPLIED)),&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;pBitmap))&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;FONT size=3&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // &amp;lt;Snip&amp;gt; Your DXGI surface manipulation code goes here.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pBitmap-&amp;gt;Release();&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;FONT size=3&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pRenderTarget-&amp;gt;Release();&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #4f81bd"&gt;&lt;FONT size=3&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 0.5in" class=MsoPlainText&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 12pt; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 0.5in" class=MsoPlainText&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 12pt; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin"&gt;These two APIs create D2D objects that wrap D3D textures. An application can hold on to the underlying D3D textures and call the ID3D10Device::CopySubresourceRegion API instead of the ID3D1Bitmap::CopyFromBitmap/ID2D1Bitmap::CopyFromRenderTarget APIs. If you choose this route, make sure you call EndDraw on all associated render targets first (including render targets against which drawing operations involving the bitmaps have been issued).&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoPlainText&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 12pt; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.75in; mso-list: l0 level1 lfo2" class=MsoPlainText&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 12pt; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin"&gt;&lt;SPAN style="mso-list: Ignore"&gt;b)&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 12pt; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;Use an intermediate bitmap&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 0.5in" class=MsoPlainText&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 12pt; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin"&gt;This option is flexible, but it is costly from a performance standpoint (in terms of both memory footprint and speed). If you are attempting to copy from an ID2D1HwndRenderTarget, this is your only option. Create an intermediate bitmap the same size as the source surface. Call CopyFromBitmap / CopyFromRenderTarget to copy the desired region to the upper-left corner of the intermediate bitmap. Then copy from the upper-left corner of the intermediate bitmap to the destination. Even though this requires copying between surfaces of different sizes as the final step, this copy is from the upper-left corner, which ensures that the source rectangle will be within the destination bounds, so it will not be affected by the clipping.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoPlainText&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 12pt; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.75in; mso-list: l0 level1 lfo2" class=MsoPlainText&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 12pt; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin"&gt;&lt;SPAN style="mso-list: Ignore"&gt;c)&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 12pt; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;Use a DrawBitmap call instead of CopyFromBitmap/CopyFromRenderTarget&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 0.5in" class=MsoPlainText&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 12pt; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin"&gt;This option is not as flexible as option 2, but in some cases it will be less costly from a performance standpoint. The DrawBitmap API allows you to specify both a source and a destination rectangle so you can use it instead of CopyFromBitmap/CopyFromRenderTarget, provided that the destination is a render target and that the source is a bitmap. You can create a surface that is both a render target and a bitmap using the ID2D1RenderTarget::CreateCompatibleRenderTarget API. You will not be able to use this option if you wish to copy from an ID2D1HwndRenderTarget. It is not possible to create a surface that is both an ID2D1HwndRenderTarget and an ID2D1Bitmap.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 12pt; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: Calibri; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;We know that these workarounds are inconvenient to our customers. We hope that by sharing this information we help to minimize this inconvenience.&lt;/SPAN&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9914279" width="1" height="1"&gt;</description></item><item><title>Windows Imaging Component: Working with Images in Windows</title><link>http://blogs.msdn.com/b/directx/archive/2009/11/13/test.aspx</link><pubDate>Fri, 13 Nov 2009 00:22:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9921659</guid><dc:creator>Varun Bhartia</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/directx/rsscomments.aspx?WeblogPostID=9921659</wfw:commentRss><comments>http://blogs.msdn.com/b/directx/archive/2009/11/13/test.aspx#comments</comments><description>&lt;FONT color=#17365d size=7&gt;&lt;FONT color=#17365d size=7&gt;
&lt;H4 style="MARGIN: 10pt 0in 0pt"&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-STYLE: normal; COLOR: windowtext; FONT-SIZE: 13.5pt; FONT-WEIGHT: normal; mso-bidi-font-family: Arial; mso-fareast-font-family: 'MS Mincho'; mso-ascii-font-family: Cambria; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Cambria"&gt;&lt;FONT face=Cambria&gt;&lt;STRONG&gt;What is it?&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/H4&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;B&gt;&lt;I&gt;&lt;FONT color=#4f81bd size=3&gt;&lt;FONT color=#4f81bd size=3&gt;&lt;/B&gt;&lt;/I&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=3 face=Calibri&gt;&lt;FONT size=3 face=Calibri&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/dd319236(VS.85).aspx"&gt;&lt;U&gt;&lt;FONT color=#0000ff size=3 face=Calibri&gt;&lt;FONT color=#0000ff size=3 face=Calibri&gt;&lt;FONT color=#0000ff size=3 face=Calibri&gt;Windows Imaging Component (WIC) API&lt;/U&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3 face=Calibri&gt;&lt;FONT size=3 face=Calibri&gt; enables applications to work with all common image formats. It allows developers to not have to understand intricate details of the image formats they work with. WIC has built-in support for popular formats such as JPEG, PNG, TIFF, and GIF as well as an extensibility model so that developers can create their own WIC decoder and encoder (CODEC) and get platform level support for their image format. WIC is available on Windows XP (SP2 and greater), Windows Vista, Windows Server, and Windows 7. &lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;I&gt;&lt;FONT color=#4f81bd size=3&gt;&lt;FONT color=#4f81bd size=3&gt;
&lt;H4 style="MARGIN: 10pt 0in 0pt"&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-STYLE: normal; COLOR: windowtext; FONT-SIZE: 13.5pt; FONT-WEIGHT: normal; mso-bidi-font-family: Arial; mso-fareast-font-family: 'MS Mincho'; mso-ascii-font-family: Cambria; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Cambria"&gt;&lt;FONT face=Cambria&gt;&lt;STRONG&gt;Why is it useful?&lt;o:p&gt;&lt;/o:p&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/H4&gt;&lt;/I&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=3 face=Calibri&gt;&lt;FONT size=3 face=Calibri&gt;
&lt;P&gt;WIC is designed to handle any scenario that requires decoding or encoding an image. WIC has been widely adopted by developers inside and outside of Microsoft in their applications. The key benefits for using WIC are: &lt;/P&gt;
&lt;P&gt;1) Fast performing CODECs – WIC has been extensively tested and tuned to provide the fastest imaging CODECs on Windows. &lt;/P&gt;
&lt;P&gt;2) Extensive format and CODEC functionality support –WIC supports all major image formats in box and provides an extensibility model for additional formats. WIC also supports common image manipulation operations such as image rotation, scaling, cropping, and pixel format conversion.&lt;/P&gt;
&lt;P&gt;3) Security Testing – WIC has also been thoroughly testedto be secure against malformed image data. Furthermore, since WIC is a core Windows component, it is updated as necessary to be compliant with the latest standard and security requirements.&lt;/P&gt;
&lt;P&gt;4) Interoperation with modern DirectX APIs such as Direct2D and the Windows Color System - Direct2D provides APIs that can consume WIC objects for rendering and encoding images, this makes using WIC with D2D very easy. The Windows Color System has similar APIs available.&lt;/P&gt;
&lt;P&gt;Because of these features, WIC is used in a variety of applications. Also GDI+ in Windows 7 uses WIC CODECs to work with images. Since a large number of applications use WIC, a consistent experience working with image formats is available for Windows Applications. For example, the chances of CODEC incompatibility issues occurring between applications that use WIC to encode and decode images are small.&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;I&gt;&lt;FONT color=#4f81bd size=3&gt;&lt;FONT color=#4f81bd size=3&gt;
&lt;H4 style="MARGIN: 10pt 0in 0pt"&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-STYLE: normal; COLOR: windowtext; FONT-SIZE: 13.5pt; FONT-WEIGHT: normal; mso-bidi-font-family: Arial; mso-fareast-font-family: 'MS Mincho'; mso-ascii-font-family: Cambria; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Cambria"&gt;&lt;FONT face=Cambria&gt;&lt;STRONG&gt;How to use it?&lt;o:p&gt;&lt;/o:p&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/H4&gt;&lt;/I&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=3 face=Calibri&gt;&lt;FONT size=3 face=Calibri&gt;
&lt;P&gt;Full documentation for WIC is available in Windows SDK and on &lt;/FONT&gt;&lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/dd319236(VS.85).aspx"&gt;&lt;U&gt;&lt;FONT color=#0000ff size=3 face=Calibri&gt;&lt;FONT color=#0000ff size=3 face=Calibri&gt;&lt;FONT color=#0000ff size=3 face=Calibri&gt;MSDN&lt;/U&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3 face=Calibri&gt;&lt;FONT size=3 face=Calibri&gt;. Links to relevant information are provided below. The &lt;/FONT&gt;&lt;/FONT&gt;&lt;A href="http://code.msdn.microsoft.com/win7wicsamples"&gt;&lt;U&gt;&lt;FONT color=#0000ff size=3 face=Calibri&gt;&lt;FONT color=#0000ff size=3 face=Calibri&gt;&lt;FONT color=#0000ff size=3 face=Calibri&gt;code samples&lt;/U&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3 face=Calibri&gt;&lt;FONT size=3 face=Calibri&gt; are a good starting point for learning how to use WIC and for accomplishing common tasks such as decoding, encoding, and reading metadata from images. &lt;/P&gt;
&lt;P&gt;An important developer tool for using WIC is WIC Explorer which is a light weight application that exposes all the functionality available in WIC. The source code and binaries for WIC Explorer are available &lt;/FONT&gt;&lt;/FONT&gt;&lt;A href="http://code.msdn.microsoft.com/wictools/Release/ProjectReleases.aspx?ReleaseId=2887"&gt;&lt;U&gt;&lt;FONT color=#0000ff size=3 face=Calibri&gt;&lt;FONT color=#0000ff size=3 face=Calibri&gt;&lt;FONT color=#0000ff size=3 face=Calibri&gt;here&lt;/U&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3 face=Calibri&gt;&lt;FONT size=3 face=Calibri&gt;. WIC Explorer exposes all available CODECs and metadata handlers installed on a system, and allows developers to see all available data in an image such as thumbnails, metadata, and actual image pixels. A screen shot of WIC Explorer is available in Figure 1 and 2. &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=3 face=Calibri&gt;&lt;FONT size=3 face=Calibri&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;FONT face=Calibri&gt;&lt;FONT face=Calibri&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;SPAN style="mso-no-proof: yes"&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;IMG style="WIDTH: 759px; HEIGHT: 368px" src="http://blogs.msdn.com/photos/directx/images/9922208/original.aspx" width=759 height=368 mce_src="http://blogs.msdn.com/photos/directx/images/9922208/original.aspx"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;SPAN style="mso-no-proof: yes"&gt;&lt;FONT size=3&gt;Figure 1: Image Parameters displayed via WIC Explorer &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal mce_keep="true"&gt;&lt;IMG style="WIDTH: 748px; HEIGHT: 346px" src="http://blogs.msdn.com/photos/directx/images/9922209/original.aspx" width=748 height=346 mce_src="http://blogs.msdn.com/photos/directx/images/9922209/original.aspx"&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;FONT size=3&gt;Figure 2: Creation code for reading metadata from an image. This information is located below the image bits shown in Figure 1. &lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;FONT size=3&gt;WIC Explorer is also useful for testing images and determining whether they are compliant with standards and WIC CODECs. WIC Explorer also provides reference implementation of an actual application that uses WIC. The image creation code, which is located below the image in the right pane, provides code that can be run to expose functionality, such as metadata extraction. This tool is useful for any developer that wishes to use the WIC API. &lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;Another useful tool for developers looking to create their own WIC CODEC is WIC COP, which is available &lt;A href="http://code.msdn.microsoft.com/wictools/Release/ProjectReleases.aspx?ReleaseId=2887"&gt;&lt;FONT color=#0000ff&gt;here&lt;/FONT&gt;&lt;/A&gt;. Documentation on how to create a WIC CODEC is available &lt;A href="http://msdn.microsoft.com/en-us/library/cc956175(VS.85).aspx"&gt;&lt;FONT color=#0000ff&gt;here&lt;/FONT&gt;&lt;/A&gt;. WIC COP is used to test custom CODECs for proper functionality, performance, and registration. WIC COP reports any problems that may exist in a custom CODEC. This tool is invaluable for developers looking to create their own CODEC.&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;The WIC documentation, code samples, and developer tools provide a good set of resources for learning and using the WIC API.&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;H4 style="MARGIN: 10pt 0in 0pt"&gt;&lt;EM&gt;&lt;FONT color=#4f81bd&gt;&lt;FONT face=Cambria&gt;
&lt;H4 style="MARGIN: 10pt 0in 0pt"&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-STYLE: normal; COLOR: windowtext; FONT-SIZE: 13.5pt; FONT-WEIGHT: normal; mso-bidi-font-family: Arial; mso-fareast-font-family: 'MS Mincho'; mso-ascii-font-family: Cambria; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Cambria"&gt;&lt;STRONG&gt;What new features are available in Windows 7 and Windows Vista?&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/EM&gt;&lt;/H4&gt;&lt;/H4&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;In Windows 7 additional features were added to help complete scenarios for developers and to provide greater level of interoperability between applications that use WIC. All of the new WIC features are available in Windows 7 and will also be available on Windows Vista using a Platform Update download, more information is provided below. Many of the new WIC features are also explained in &lt;A href="http://channel9.msdn.com/posts/yochay/Windows-7-Graphics-WIC/"&gt;&lt;FONT color=#0000ff&gt;this informational video&lt;/FONT&gt;&lt;/A&gt; and in this &lt;A href="http://msdn.microsoft.com/en-us/library/dd408864(VS.85).aspx"&gt;&lt;FONT color=#0000ff&gt;MSDN article&lt;/FONT&gt;&lt;/A&gt;. &lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;In order to support scenarios that involve working with images from the internet, support for decoding progressively encoded images was added. Progressive decoding is used to provide previews of images without having to actually download the complete image, which can often be slow. The new progressive decoding API and the feature are explained in &lt;A href="http://msdn.microsoft.com/en-us/library/dd408863(VS.85).aspx"&gt;&lt;FONT color=#0000ff&gt;this article&lt;/FONT&gt;&lt;/A&gt; and in &lt;A href="http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=win7wicsamples&amp;amp;DownloadId=7546"&gt;&lt;FONT color=#0000ff&gt;this code sample&lt;/FONT&gt;&lt;/A&gt;. &lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;Another important scenario for developers working with images from the internet is the ability to animate GIF images. WIC now supports reading and writing GIF metadata, which contains timing information necessary for animating GIF images. A code sample is &lt;A href="http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=win7wicsamples&amp;amp;DownloadId=7547"&gt;&lt;FONT color=#0000ff&gt;available here&lt;/FONT&gt;&lt;/A&gt; that shows how to extract GIF metadata data and animate an image with Direct2D. WIC also supports additional TIFF formats such as JPEG encoded TIFF, Planar TIFFs, and tiled TIFFs. These image formats are created by popular imaging applications.&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;An important feature for any user working with digital photographs is the ability to preserve metadata across a variety of applications and platforms. By implementing the guidance of the &lt;A href="http://www.metadataworkinggroup.com/"&gt;&lt;FONT color=#0000ff&gt;Metadata Working Group&lt;/FONT&gt;&lt;/A&gt; (MWG), images edited and viewed in Windows 7 are compatible with a large variety of applications. Users can be confident that metadata added to, or read from images in Windows 7 will preserved when the image is used in, or created in an application that does not use WIC. The MWG guidelines specify metadata locations to read from and write to for common fields such as Keywords, Author, etc. Applications that use the &lt;A href="http://msdn.microsoft.com/en-us/library/aa968944(VS.85).aspx#metadatapolicy"&gt;&lt;FONT color=#0000ff&gt;Metadata Policy Layer&lt;/FONT&gt;&lt;/A&gt; in WIC for reading and writing metadata will be able to automatically take advantage of the increased metadata interoperation. &lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;With the new features available in Windows 7 along with the ones already available since Vista, WIC is able to provide a compelling platform for working with images.&lt;EM&gt;&lt;FONT color=#4f81bd&gt;&lt;FONT face=Cambria&gt;&lt;o:p&gt;&amp;nbsp; &lt;/P&gt;
&lt;H4 style="MARGIN: 10pt 0in 0pt"&gt;
&lt;H4 style="MARGIN: 10pt 0in 0pt"&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-STYLE: normal; COLOR: windowtext; FONT-SIZE: 13.5pt; FONT-WEIGHT: normal; mso-bidi-font-family: Arial; mso-fareast-font-family: 'MS Mincho'; mso-ascii-font-family: Cambria; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Cambria"&gt;&lt;STRONG&gt;Additional Information related to Imaging on Windows&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/EM&gt;&lt;/H4&gt;&lt;/H4&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpFirst&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;-&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/ms737408(VS.85).aspx"&gt;&lt;FONT color=#0000ff&gt;WIC Overview&lt;/FONT&gt;&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;-&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;A href="http://code.msdn.microsoft.com/win7wicsamples"&gt;&lt;FONT color=#0000ff&gt;WIC Samples&lt;/FONT&gt;&lt;/A&gt; (Progressive Decoding, Animated GIF, available here)&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;-&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/dd408863(VS.85).aspx"&gt;&lt;FONT color=#0000ff&gt;WIC Progressive Decoding Article&lt;/FONT&gt;&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;-&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/cc956175(VS.85).aspx"&gt;&lt;FONT color=#0000ff&gt;Creating a custom WIC CODEC&lt;/FONT&gt;&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;-&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;A href="http://code.msdn.microsoft.com/wictools"&gt;&lt;FONT color=#0000ff&gt;WIC Explorer &amp;amp; WIC COP&lt;/FONT&gt;&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;-&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;A href="http://channel9.msdn.com/posts/yochay/Windows-7-Graphics-WIC/"&gt;&lt;FONT color=#0000ff&gt;WIC Overview Video&lt;/FONT&gt;&lt;/A&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;-&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;A href="http://support.microsoft.com/kb/971644"&gt;&lt;FONT color=#0000ff&gt;Platform Update for Windows Vista&lt;/FONT&gt;&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpLast&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;-&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/ee220571.aspx"&gt;&lt;FONT color=#0000ff&gt;Device Stage – Windows 7 only&lt;/FONT&gt;&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;/FONT&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9921659" width="1" height="1"&gt;</description></item><item><title>Announcing the Direct2D Debug Layer</title><link>http://blogs.msdn.com/b/directx/archive/2009/10/30/announcing-the-direct2d-debug-layer.aspx</link><pubDate>Fri, 30 Oct 2009 21:02:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9915471</guid><dc:creator>Mark Lawrence1</dc:creator><slash:comments>26</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/directx/rsscomments.aspx?WeblogPostID=9915471</wfw:commentRss><comments>http://blogs.msdn.com/b/directx/archive/2009/10/30/announcing-the-direct2d-debug-layer.aspx#comments</comments><description>&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;Just like Direct3D 10, Direct2D was designed to fit hand in glove with an optional debug layer that allows developers to receive rich information about design-time issues they might encounter when using Direct2D. Today, the Direct2D team is happy to announce that the debug layer is available from code gallery. For more information, and to download the layer, please see &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/dd940309.aspx" mce_href="http://msdn.microsoft.com/en-us/library/dd940309.aspx"&gt;&lt;FONT color=#0000ff size=3 face=Calibri&gt;the debug layer entry in the SDK&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;H2 style="MARGIN: 10pt 0in 0pt"&gt;&lt;FONT size=4&gt;&lt;FONT face=Cambria&gt;About the Direct2D Debug Layer &lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/H2&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;The Direct2D debug layer is an independent component that will intercept calls made from the application to Direct2D and provide feedback about various classes of errors, for example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpFirst&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;·&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;Incorrect threading usage of Direct2D objects.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;·&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;Using Direct2D objects with the wrong factory.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpLast&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;·&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;Incorrect parameters passed to Direct2D.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;In addition, the Direct2D debug layer also provides additional warnings and informational traces about issues that an application might optionally want to address, for example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpFirst&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;·&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;Using a software render target when a hardware render target might have been intended.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpLast&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;·&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Using a more expensive primitive when a cheaper one would have worked.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;H2 style="MARGIN: 10pt 0in 0pt"&gt;&lt;FONT size=4&gt;&lt;FONT face=Cambria&gt;Using the Direct2D Debug Layer &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/H2&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;The Direct2D debug layer is designed not to change the behavior of Direct2D when it is used. If the debug layer is installed, it will not be invoked and will not result in any performance overhead unless the application explicitly requests that the debug layer be used. &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;To trace all issues, specify the &lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;D2D1_DEBUG_LEVEL_INFORMATION&lt;/SPAN&gt;&lt;FONT face=Calibri&gt; enumeration in the &lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;D2D1_FACTORY_OPTIONS&lt;/SPAN&gt;&lt;FONT face=Calibri&gt; structure before calling &lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;D2D1CreateFactory &lt;/SPAN&gt;&lt;FONT face=Calibri&gt;and run your application under a debugger.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;We hope that you find the debug layer useful. We are also very happy to receive feedback about any issues you encounter during application development where you feel that a debug layer trace would have been helpful so that we can continue to improve the debug layer.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9915471" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/directx/archive/tags/Graphics/">Graphics</category><category domain="http://blogs.msdn.com/b/directx/archive/tags/DirectX/">DirectX</category><category domain="http://blogs.msdn.com/b/directx/archive/tags/Direct2D/">Direct2D</category><category domain="http://blogs.msdn.com/b/directx/archive/tags/DirectWrite/">DirectWrite</category><category domain="http://blogs.msdn.com/b/directx/archive/tags/Debugging/">Debugging</category></item><item><title>Platform Update for Windows Vista Released!</title><link>http://blogs.msdn.com/b/directx/archive/2009/10/27/platform-update-for-windows-vista-released.aspx</link><pubDate>Tue, 27 Oct 2009 22:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9913777</guid><dc:creator>moneppo</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/directx/rsscomments.aspx?WeblogPostID=9913777</wfw:commentRss><comments>http://blogs.msdn.com/b/directx/archive/2009/10/27/platform-update-for-windows-vista-released.aspx#comments</comments><description>The Platform Update for Windows Vista, which&amp;nbsp;is in mentioned in a&amp;nbsp;&lt;A title="Platform Update for Windows Vista Blog Post" href="http://blogs.msdn.com/directx/archive/2009/09/10/windows-7-transition-pack-for-windows-vista.aspx" mce_href="http://blogs.msdn.com/directx/archive/2009/09/10/windows-7-transition-pack-for-windows-vista.aspx"&gt;previous post&lt;/A&gt;, just had its final release! Find out more at the &lt;A title="Windows Team Blog" href="http://windowsteamblog.com/blogs/windows7/archive/2009/10/27/announcing-final-releases-of-platform-update-for-windows-vista-technologies.aspx" target=_blank mce_href="http://windowsteamblog.com/blogs/windows7/archive/2009/10/27/announcing-final-releases-of-platform-update-for-windows-vista-technologies.aspx"&gt;Windows Team Blog&lt;/A&gt;.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9913777" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/directx/archive/tags/DX/">DX</category><category domain="http://blogs.msdn.com/b/directx/archive/tags/Graphics/">Graphics</category><category domain="http://blogs.msdn.com/b/directx/archive/tags/DirectX/">DirectX</category><category domain="http://blogs.msdn.com/b/directx/archive/tags/Direct2D/">Direct2D</category><category domain="http://blogs.msdn.com/b/directx/archive/tags/DirectWrite/">DirectWrite</category><category domain="http://blogs.msdn.com/b/directx/archive/tags/direct3d/">direct3d</category><category domain="http://blogs.msdn.com/b/directx/archive/tags/Windows+Update/">Windows Update</category></item></channel></rss>