<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.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>Tom's Blog : Microsoft</title><link>http://blogs.technet.com/thomasolsen/archive/tags/Microsoft/default.aspx</link><description>Tags: Microsoft</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Direct2D Sample Videos</title><link>http://blogs.technet.com/thomasolsen/archive/2008/11/14/direct2d-sample-videos.aspx</link><pubDate>Fri, 14 Nov 2008 05:47:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3152819</guid><dc:creator>Thomas.Olsen</dc:creator><slash:comments>15</slash:comments><comments>http://blogs.technet.com/thomasolsen/comments/3152819.aspx</comments><wfw:commentRss>http://blogs.technet.com/thomasolsen/commentrss.aspx?PostID=3152819</wfw:commentRss><description>&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;ChartDemo.wmv -- &lt;/SPAN&gt;&lt;/B&gt;&lt;FONT face=Calibri size=3&gt;Although D2D can render thousands (the exact amount&amp;nbsp;depends on&amp;nbsp;the video hardware that's used, quality of drivers, amount of memory, etc) of anti-aliased primitives&amp;nbsp;per second, there are some cases where even greater performance is required. ChartDemo demonstrates an alternative approach that uses aliased lines and rectangles (primitives that have been highly optimized in D2D) along with MSAA rendering (via D3D interop). With this approach, ChartDemo is able to scale much further.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o /&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B&gt;Chomp.wmv -- &lt;/B&gt;This demo started out as a simple 2D Pac Man-like game and, gradually, we kept adding features; for example, zooming, god-mode and, unlike the original Pac Man game, our variation maps the playfield onto the outside faces of a cube, and rotates the cube to the closest contiguous face as the Chomp character runs through the tunnels. One other important note is that the playfield is rendered entirely using anti-aliased vector primitives -- not bitmaps -- so features such as zooming can be accomplished without scaling artifacts.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B&gt;SciFiText.wmv -- &lt;/B&gt;This sample combines Direct2D and Direct3D to achieve what is commonly known as the "scrolling Star Wars text effect". An application can render Direct2D content into a Direct3D surface, and then display that surface at an angle to the camera. &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;&lt;B&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B&gt;SimplePathAnimation.wmv -- &lt;/B&gt;This sample demonstrates how to use a Direct2D Path Geometry to drive a path animation. Every D2D geometry exposes a ID2D1Geometry::ComputePointAtLength method, which can be used to obtain a point and tangent vector for any given length. &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B&gt;TextExtrusion.wmv -- &lt;/B&gt;This sample illustrates how DirectWrite, Direct2D, and Direct3D can be combined to create a text-extrusion effect. Text geometry is generated using a custom IDWriteTextRenderer that calls into IDWriteFontFace::GetGlyphRunOutline. D2D geometry operations are then used to eliminate self-intersections and tessellate the front and back faces. Side faces are generated by walking the text geometry and emitting quads. DWrite hit-testing is also used for positioning of the cursor. Finally, the generated triangles are sent to D3D for rasterization. &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;B&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 14pt; LINE-HEIGHT: 115%"&gt;&lt;A href="http://cid-3d2e099717ec9650.skydrive.live.com/self.aspx/Public%20Files/Demos.zip" mce_href="http://cid-3d2e099717ec9650.skydrive.live.com/self.aspx/Public%20Files/Demos.zip"&gt;Demos.zip&lt;/A&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 14pt; LINE-HEIGHT: 115%"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3152819" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/thomasolsen/archive/tags/Direct3D/default.aspx">Direct3D</category><category domain="http://blogs.technet.com/thomasolsen/archive/tags/2D/default.aspx">2D</category><category domain="http://blogs.technet.com/thomasolsen/archive/tags/3D/default.aspx">3D</category><category domain="http://blogs.technet.com/thomasolsen/archive/tags/Geometry/default.aspx">Geometry</category><category domain="http://blogs.technet.com/thomasolsen/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://blogs.technet.com/thomasolsen/archive/tags/D2D/default.aspx">D2D</category><category domain="http://blogs.technet.com/thomasolsen/archive/tags/Direct2D/default.aspx">Direct2D</category><category domain="http://blogs.technet.com/thomasolsen/archive/tags/D3D/default.aspx">D3D</category><category domain="http://blogs.technet.com/thomasolsen/archive/tags/DirectWrite/default.aspx">DirectWrite</category><category domain="http://blogs.technet.com/thomasolsen/archive/tags/DWrite/default.aspx">DWrite</category><category domain="http://blogs.technet.com/thomasolsen/archive/tags/D3D10/default.aspx">D3D10</category></item><item><title>Using Direct2D</title><link>http://blogs.technet.com/thomasolsen/archive/2008/11/02/using-direct2d.aspx</link><pubDate>Sun, 02 Nov 2008 03:46:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3145874</guid><dc:creator>Thomas.Olsen</dc:creator><slash:comments>19</slash:comments><comments>http://blogs.technet.com/thomasolsen/comments/3145874.aspx</comments><wfw:commentRss>http://blogs.technet.com/thomasolsen/commentrss.aspx?PostID=3145874</wfw:commentRss><description>&lt;META name=ProgId content=Word.Document&gt;
&lt;META name=Generator content="Microsoft Word 12"&gt;
&lt;META name=Originator content="Microsoft Word 12"&gt;&lt;LINK rel=File-List href="file:///C:%5CUsers%5CTHOMASOL%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"&gt;&lt;LINK rel=themeData href="file:///C:%5CUsers%5CTHOMASOL%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"&gt;&lt;LINK rel=colorSchemeMapping href="file:///C:%5CUsers%5CTHOMASOL%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"&gt;
&lt;STYLE&gt;
&lt;!--
 /* Font Definitions */
 @font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;
	mso-font-charset:1;
	mso-generic-font-family:roman;
	mso-font-format:other;
	mso-font-pitch:variable;
	mso-font-signature:0 0 0 0 0 0;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;
	mso-font-charset:0;
	mso-generic-font-family:swiss;
	mso-font-pitch:variable;
	mso-font-signature:-1610611985 1073750139 0 0 159 0;}
@font-face
	{font-family:Consolas;
	panose-1:2 11 6 9 2 2 4 3 2 4;
	mso-font-charset:0;
	mso-generic-font-family:modern;
	mso-font-pitch:fixed;
	mso-font-signature:-1610611985 1073750091 0 0 159 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-parent:"";
	margin-top:0in;
	margin-right:0in;
	margin-bottom:10.0pt;
	margin-left:0in;
	line-height:115%;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:Calibri;
	mso-fareast-theme-font:minor-latin;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
p.MsoNoSpacing, li.MsoNoSpacing, div.MsoNoSpacing
	{mso-style-priority:1;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-parent:"";
	margin:0in;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:Calibri;
	mso-fareast-theme-font:minor-latin;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
.MsoChpDefault
	{mso-style-type:export-only;
	mso-default-props:yes;
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:Calibri;
	mso-fareast-theme-font:minor-latin;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
.MsoPapDefault
	{mso-style-type:export-only;
	margin-bottom:10.0pt;
	line-height:115%;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;
	mso-header-margin:.5in;
	mso-footer-margin:.5in;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
--&gt;
&lt;/STYLE&gt;

&lt;P class=MsoNoSpacing&gt;In today's post, we're going to walk through a simple demonstration of Direct2D. We're not going to cover advanced features, such as interop with GDI/GDI+ or Direct3D. More on that in upcoming posts. &lt;/P&gt;
&lt;P class=MsoNoSpacing mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;Direct2D integrates seamlessly into the familiar Win32 programming paradigm, and follows a usage pattern which is similar to Direct3D. First, you create a factory...&lt;?xml:namespace prefix = o /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;?xml:namespace prefix = u4 /&gt;&lt;u4:p&gt;&lt;/u4:p&gt;
&lt;P class=MsoNoSpacing&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 14pt"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;TABLE style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; BORDER-COLLAPSE: collapse; BACKGROUND: rgb(255,255,153); MARGIN-LEFT: 59.4pt; BORDER-TOP: medium none; BORDER-RIGHT: medium none; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial" class=MsoTableGrid border=0 cellSpacing=0 cellPadding=0 class="MsoTableGrid"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD style="BORDER-BOTTOM: black 1pt solid; BORDER-LEFT: black 1pt solid; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 5.75in; PADDING-RIGHT: 5.4pt; BORDER-TOP: black 1pt solid; BORDER-RIGHT: black 1pt solid; PADDING-TOP: 0in" vAlign=top width=552&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 9pt"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;ID2D1FactoryPtr m_spD2DFactory;&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;HRESULT hr = D2D1CreateFactory(&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; D2D1_FACTORY_TYPE_SINGLE_THREADED,&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;m_spD2DFactory&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;/SPAN&gt;&lt;SPAN&gt;&lt;u4:p&gt;&lt;/u4:p&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 1.55in" class=MsoNormal&gt;&lt;SPAN style="COLOR: rgb(54,95,145)"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P class=MsoNoSpacing&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;Next, you use the factory to create resources that you need.&amp;nbsp; One important distinction from GDI/GDI+ is that, since&amp;nbsp;Direct2D is a lower-level API (like Direct3D), you need to be aware that some resources (eg. render targets, bitmaps, brushes, gradient stop collections, layers, etc) have a close association with the device on which they were created, while others (eg. geometries, meshes, stroke style, geometry sinks, tessellation sinks, etc) are not associated with a device.&amp;nbsp; Also, like Direct3D, device-dependent resources need to be recreated in cases where the device is lost or undergoes a state change. Okay, now let's create a simple geometry. Geometries are examples of device-independent resources which can be used with any render target. &lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;&lt;B&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/B&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;TABLE style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; BORDER-COLLAPSE: collapse; BACKGROUND: rgb(255,255,153); MARGIN-LEFT: 59.4pt; BORDER-TOP: medium none; BORDER-RIGHT: medium none; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial" class=MsoTableGrid border=0 cellSpacing=0 cellPadding=0 class="MsoTableGrid"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD style="BORDER-BOTTOM: black 1pt solid; BORDER-LEFT: black 1pt solid; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 5.75in; PADDING-RIGHT: 5.4pt; BORDER-TOP: black 1pt solid; BORDER-RIGHT: black 1pt solid; PADDING-TOP: 0in" vAlign=top width=552&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="COLOR: rgb(54,95,145)"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;ID2D1RectangleGeometryPtr m_spRectangleGeometry;&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;IFR(m_spD2DFactory-&amp;gt;CreateRectangleGeometry(&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; D2D1::Rect(20.f, 20.f, 30.f, 50.f),&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;m_spRectangleGeometry));&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="COLOR: rgb(54,95,145)"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P class=MsoNoSpacing&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;Before we can draw this geometry, we're going to need a few other things. Let's create a render target . Direct2D will attempt to create a hardware render target and, if hardware isn't available, it will fall back to a software render target. We need to create a red brush to draw the geometry. Also, we're going to use Windows Imaging Codecs (WIC) to load an image from disk, convert it to 32bppPBGRA, and then create a Direct2D bitmap from it. Note that brushes and bitmaps are device-dependent resources that are associated with a render target.&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;&lt;B&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/B&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;TABLE style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; BORDER-COLLAPSE: collapse; BACKGROUND: rgb(255,255,153); MARGIN-LEFT: 59.4pt; BORDER-TOP: medium none; BORDER-RIGHT: medium none; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial" class=MsoTableGrid border=0 cellSpacing=0 cellPadding=0 class="MsoTableGrid"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD style="BORDER-BOTTOM: black 1pt solid; BORDER-LEFT: black 1pt solid; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 5.75in; PADDING-RIGHT: 5.4pt; BORDER-TOP: black 1pt solid; BORDER-RIGHT: black 1pt solid; PADDING-TOP: 0in" vAlign=top width=552&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;HRESULT&lt;B&gt; Application::CreateDeviceResources&lt;/B&gt;()&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;{&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp; HRESULT hr = S_OK;&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp; if (!m_spRT)&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp; {&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IWICImagingFactoryPtr spWICFactory;&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IWICBitmapDecoderPtr spDecoder;&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IWICFormatConverterPtr spConverter;&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RECT rc;&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GetClientRect(&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_hwnd,&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;rc);&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; D2D1_SIZE_U size = D2D1::SizeU(&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rc.right - rc.left,&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rc.bottom - rc.top);&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //create a D2D render target&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hr = spD2DFactory-&amp;gt;CreateHwndRenderTarget(&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; D2D1::RenderTargetProperties(),&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; D2D1::HwndRenderTargetProperties(&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&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; hwnd,&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&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; size),&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp; &amp;amp;spRT);&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;//create a red brush&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;IFR(spRT-&amp;gt;CreateSolidColorBrush(&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; D2D1::ColorF(1.0f, 0.0f, 0.0f, 1.0f),&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;spRedBrush));&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;//create WIC factory&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;IFR(CoCreateInstance(&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CLSID_WICImagingFactory,&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NULL,&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CLSCTX_INPROC_SERVER,&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IID_IWICImagingFactory,&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; reinterpret_cast&amp;lt;void **&amp;gt;(&amp;amp;spWICFactory)&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ));&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;//load image using WIC&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;IFR(spWICFactory-&amp;gt;CreateDecoderFromFilename( &lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; L"tiger.jpg",&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NULL,&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GENERIC_READ,&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WICDecodeMetadataCacheOnLoad,&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;spDecoder));&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;//get the initial frame&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;IFR(spDecoder-&amp;gt;GetFrame(&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0,&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;spSource));&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;//format convert to 32bppPBGRA -- which D2D expects&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;IFR(spWICFactory-&amp;gt;CreateFormatConverter(&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;spConverter));&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;//initialize the format converter&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;IFR(spConverter-&amp;gt;Initialize(&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; spSource,&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GUID_WICPixelFormat32bppPBGRA,&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WICBitmapDitherTypeNone,&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NULL,&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.f,&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WICBitmapPaletteTypeMedianCut));&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;//create a D2D bitmap from the WIC bitmap.&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;IFR(spRT-&amp;gt;CreateBitmapFromWicBitmap(&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; spConverter,&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NULL,&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;m_spBitmap));&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 17.1pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;}&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 17.1pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;return S_OK;&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;}&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P class=MsoNoSpacing&gt;At this point, we have the basic resources that we need to draw. What we need is a place to do it. Note that we're drawing in response to a WM_PAINT message, but we aren't using a GDI HDC at all.&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;&lt;B&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/B&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;TABLE style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; BORDER-COLLAPSE: collapse; BACKGROUND: rgb(255,255,153); MARGIN-LEFT: 59.4pt; BORDER-TOP: medium none; BORDER-RIGHT: medium none; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial" class=MsoTableGrid border=0 cellSpacing=0 cellPadding=0 class="MsoTableGrid"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD style="BORDER-BOTTOM: black 1pt solid; BORDER-LEFT: black 1pt solid; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 5.75in; PADDING-RIGHT: 5.4pt; BORDER-TOP: black 1pt solid; BORDER-RIGHT: black 1pt solid; PADDING-TOP: 0in" vAlign=top width=552&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="COLOR: rgb(54,95,145)"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case WM_PAINT:&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case WM_DISPLAYCHANGE:&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&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; PAINTSTRUCT ps;&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&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; BeginPaint(hwnd, &amp;amp;ps);&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&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; OnRender(ps.rcPaint);&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 1in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&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; EndPaint(hwnd, &amp;amp;ps);&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.5in" class=MsoNormal&gt;&lt;SPAN style="COLOR: rgb(54,95,145)"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P class=MsoNoSpacing&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;Here is our render function. You've already seen the &lt;B&gt;CreateDeviceResources &lt;/B&gt;function above. This is where you create any device-dependent resources. Note that creation of device resources is only done &lt;I&gt;once&lt;/I&gt;. After a render target and its associated resources have been created, &lt;B&gt;CreateDeviceResources&lt;/B&gt; does nothing. Our render function checks to see whether the render target is occluded (aka covered). This is an optimization which prevents unnecessary drawing in cases where the window is hidden from view. We call &lt;B&gt;BeginDraw &lt;/B&gt;on the render target to initiate drawing. All drawing instructions must be bracketed between &lt;B&gt;BeginDraw &lt;/B&gt;and &lt;B&gt;EndDraw &lt;/B&gt;calls. &lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;Next, we set an identity transform, which means that anything drawn will be relative to the origin in the top left hand corner of the render target. Next, we clear the render target with a white color. You need to clear the target; otherwise, the render target will be initialized with the content from the previous drawing operations. If none have been performed yet, the result is undefined. We draw a bitmap, and then set a transform and draw our red rectangle geometry. We call &lt;B&gt;EndDraw&lt;/B&gt; on the render target to signify that drawing operations are complete. Finally,we check the return code from &lt;B&gt;EndDraw &lt;/B&gt;to determine whether there was any kind of failure condition. &lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;&lt;B&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/B&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;TABLE style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; BORDER-COLLAPSE: collapse; BACKGROUND: rgb(255,255,153); MARGIN-LEFT: 59.4pt; BORDER-TOP: medium none; BORDER-RIGHT: medium none; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial" class=MsoTableGrid border=0 cellSpacing=0 cellPadding=0 class="MsoTableGrid"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD style="BORDER-BOTTOM: black 1pt solid; BORDER-LEFT: black 1pt solid; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 5.75in; PADDING-RIGHT: 5.4pt; BORDER-TOP: black 1pt solid; BORDER-RIGHT: black 1pt solid; PADDING-TOP: 0in" vAlign=top width=552&gt;
&lt;P class=MsoNoSpacing&gt;&lt;SPAN style="COLOR: rgb(54,95,145)"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;HRESULT &lt;B&gt;Application::OnRender&lt;/B&gt;(const RECT &amp;amp;rcPaint)&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;{&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp; HRESULT hr = S_OK;&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;//this is where we create device resources if they don't already &lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;B&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&amp;nbsp; //exist (eg. m_spRT, m_spBitmap)&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&amp;nbsp; &lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&amp;nbsp; IFR(CreateDeviceResources());&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&amp;nbsp; if (!(m_spRT-&amp;gt;CheckWindowState() &amp;amp; D2D1_WINDOW_STATE_OCCLUDED))&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&amp;nbsp; {&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_spRT-&amp;gt;BeginDraw();&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_spRT-&amp;gt;SetTransform(D2D1::Matrix3x2F::Identity());&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_spRT-&amp;gt;Clear(D2D1::ColorF(D2D1::ColorF::White));&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; D2D1_SIZE_F size = m_spBitmap-&amp;gt;GetSize();&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_spRT-&amp;gt;DrawBitmap(&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_spBitmap,&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; D2D1::Rect&amp;lt;float&amp;gt;(0.0f, 0.0f, size.width, size.height));&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_spRT-&amp;gt;SetTransform(&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; D2D1::Matrix3x2F::Translation(rtSize.width - 200, 0));&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_spRT-&amp;gt;FillGeometry(&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_spRectangleGeometry,&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_spRedBrush);&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hr = m_spRT-&amp;gt;EndDraw();&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;}&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;if (hr == D2DERR_RECREATE_TARGET)&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;{&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;B&gt;//if the device is lost, we need to discard all of the resources&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;B&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //associated with that device (eg. m_spRT, m_spBitmap, etc). We will&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;B&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //recreate the next time we need to paint&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;B&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;DiscardDeviceResources();&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.3in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;}&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.3in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt 0.3in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;return hr;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;u4:p&gt;&lt;/u4:p&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;&lt;u4:p&gt;&lt;/u4:p&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P class=MsoNoSpacing&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;As mentioned above, &lt;B&gt;Direct2D &lt;/B&gt;is a lower-level API, and there are scenarios under which the display device can be lost (eg. adapter removed, display resolution changed, etc). GDI handles these device lost scenarios transparently but, with Direct2D (as with Direct3D), you need to be aware of and handle these conditions. If the device is lost for any reason, &lt;B&gt;Direct2D &lt;/B&gt;will let you know, and you should free any &amp;nbsp;resources that are associated with that render target. Keep in mind that you don't have to release device-independent resources (eg. &lt;I&gt;m_spRectangleGeometry&lt;/I&gt;).&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;&amp;nbsp;&amp;nbsp;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;u4:p&gt;&lt;/u4:p&gt;
&lt;TABLE style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; BORDER-COLLAPSE: collapse; BACKGROUND: rgb(255,255,153); MARGIN-LEFT: 59.4pt; BORDER-TOP: medium none; BORDER-RIGHT: medium none; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial" class=MsoTableGrid border=0 cellSpacing=0 cellPadding=0 class="MsoTableGrid"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD style="BORDER-BOTTOM: black 1pt solid; BORDER-LEFT: black 1pt solid; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 5.75in; PADDING-RIGHT: 5.4pt; BORDER-TOP: black 1pt solid; BORDER-RIGHT: black 1pt solid; PADDING-TOP: 0in" vAlign=top width=552&gt;
&lt;P class=MsoNoSpacing&gt;&lt;SPAN style="COLOR: rgb(54,95,145)"&gt;&lt;u4:p&gt;&amp;nbsp;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;void &lt;B&gt;Application::DiscardDeviceResources&lt;/B&gt;()&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(54,95,145); FONT-SIZE: 8pt"&gt;{&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;m_spRT.Release();&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;m_spBitmap.Release();&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.3in" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;m_spRedBrush.Release();&lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: rgb(31,73,125); FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;u4:p&gt;&lt;/u4:p&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P class=MsoNoSpacing mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNoSpacing mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 14pt"&gt;Render Target Interfaces&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 14pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;&amp;nbsp;&lt;IMG src="http://blogs.technet.com/photos/thomasolsen/images/3145875/original.aspx" mce_src="http://blogs.technet.com/photos/thomasolsen/images/3145875/original.aspx"&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNoSpacing mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 14pt"&gt;Device-Independent Resource Interfaces&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 14pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;IMG src="http://blogs.technet.com/photos/thomasolsen/images/3145877/original.aspx" width=628 height=283 mce_src="http://blogs.technet.com/photos/thomasolsen/images/3145877/original.aspx"&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNoSpacing mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 14pt"&gt;Device-Dependent Resource Interfaces&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 14pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;&lt;B&gt;&lt;IMG src="http://blogs.technet.com/photos/thomasolsen/images/3145876/original.aspx" width=628 height=290 mce_src="http://blogs.technet.com/photos/thomasolsen/images/3145876/original.aspx"&gt;&lt;/B&gt; &lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3145874" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/thomasolsen/archive/tags/2D/default.aspx">2D</category><category domain="http://blogs.technet.com/thomasolsen/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://blogs.technet.com/thomasolsen/archive/tags/D2D/default.aspx">D2D</category><category domain="http://blogs.technet.com/thomasolsen/archive/tags/Direct2D/default.aspx">Direct2D</category></item><item><title>Introducing the Microsoft Direct2D API</title><link>http://blogs.technet.com/thomasolsen/archive/2008/10/29/introducing-the-microsoft-direct2d-api.aspx</link><pubDate>Wed, 29 Oct 2008 20:42:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3144190</guid><dc:creator>Thomas.Olsen</dc:creator><slash:comments>136</slash:comments><comments>http://blogs.technet.com/thomasolsen/comments/3144190.aspx</comments><wfw:commentRss>http://blogs.technet.com/thomasolsen/commentrss.aspx?PostID=3144190</wfw:commentRss><description>&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;One of the challenging aspects of working on a product development team is that you often have to keep the subject of your work secret for various reasons. I’m a Dev Lead in the Windows Desktop Graphics organization, and my team has been working quietly for the past year on an exciting new graphics technology – &lt;B&gt;Direct2D &lt;/B&gt;–that was announced recently at the Professional Developer’s Conference (PDC) in Los Angeles. &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o /&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B&gt;Direct2D&lt;/B&gt; (or &lt;B&gt;D2D&lt;/B&gt;) is a native&amp;nbsp;immediate-mode&amp;nbsp;2D graphics rendering API that is built on top of &lt;B&gt;Direct3D&lt;/B&gt;, and offers some compelling performance and visual quality improvements over &lt;B&gt;GDI&lt;/B&gt; and &lt;B&gt;GDI+&lt;/B&gt;:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpFirst style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;SPAN class=arial9italic&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: rgb(31,73,125); FONT-STYLE: normal; FONT-FAMILY: Symbol"&gt;&lt;SPAN&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal"&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;/SPAN&gt;&lt;SPAN class=arial9italic&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: rgb(31,73,125); FONT-STYLE: normal; FONT-FAMILY: 'Calibri','sans-serif'"&gt;Hardware-acceleration&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=arial9italic&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: rgb(31,73,125); FONT-STYLE: normal; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;SPAN class=arial9italic&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: rgb(31,73,125); FONT-STYLE: normal; FONT-FAMILY: Symbol"&gt;&lt;SPAN&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal"&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;/SPAN&gt;&lt;SPAN class=arial9italic&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: rgb(31,73,125); FONT-STYLE: normal; FONT-FAMILY: 'Calibri','sans-serif'"&gt;Software fallback when hardware isn’t available&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=arial9italic&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: rgb(31,73,125); FONT-STYLE: normal; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;SPAN class=arial9italic&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: rgb(31,73,125); FONT-STYLE: normal; FONT-FAMILY: Symbol"&gt;&lt;SPAN&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal"&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;/SPAN&gt;&lt;SPAN class=arial9italic&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: rgb(31,73,125); FONT-STYLE: normal; FONT-FAMILY: 'Calibri','sans-serif'"&gt;Interoperability with GDI, GDI+, and Direct3D &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=arial9italic&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: rgb(31,73,125); FONT-STYLE: normal; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;SPAN class=arial9italic&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: rgb(31,73,125); FONT-STYLE: normal; FONT-FAMILY: Symbol"&gt;&lt;SPAN&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal"&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;/SPAN&gt;&lt;SPAN class=arial9italic&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: rgb(31,73,125); FONT-STYLE: normal; FONT-FAMILY: 'Calibri','sans-serif'"&gt;ClearType text rendering&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=arial9italic&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: rgb(31,73,125); FONT-STYLE: normal; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;SPAN class=arial9italic&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: rgb(31,73,125); FONT-STYLE: normal; FONT-FAMILY: Symbol"&gt;&lt;SPAN&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal"&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;/SPAN&gt;&lt;SPAN class=arial9italic&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: rgb(31,73,125); FONT-STYLE: normal; FONT-FAMILY: 'Calibri','sans-serif'"&gt;Per primitive antialiasing&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=arial9italic&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: rgb(31,73,125); FONT-STYLE: normal; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;SPAN class=arial9italic&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: rgb(31,73,125); FONT-STYLE: normal; FONT-FAMILY: Symbol"&gt;&lt;SPAN&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal"&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;/SPAN&gt;&lt;SPAN class=arial9italic&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: rgb(31,73,125); FONT-STYLE: normal; FONT-FAMILY: 'Calibri','sans-serif'"&gt;Device-independent coordinate system&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;SPAN class=arial9italic&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: rgb(31,73,125); FONT-STYLE: normal; FONT-FAMILY: Symbol"&gt;&lt;SPAN&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal"&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;/SPAN&gt;&lt;SPAN class=arial9italic&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: rgb(31,73,125); FONT-STYLE: normal; FONT-FAMILY: 'Calibri','sans-serif'"&gt;Draw and fill commands for geometries (lines, curves) and bitmaps&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;SPAN class=arial9italic&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: rgb(31,73,125); FONT-STYLE: normal; FONT-FAMILY: Symbol"&gt;&lt;SPAN&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal"&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;/SPAN&gt;&lt;SPAN class=arial9italic&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: rgb(31,73,125); FONT-STYLE: normal; FONT-FAMILY: 'Calibri','sans-serif'"&gt;Solid color, linear, radial, and bitmap brushes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;SPAN class=arial9italic&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: rgb(31,73,125); FONT-STYLE: normal; FONT-FAMILY: Symbol"&gt;&lt;SPAN&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal"&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;/SPAN&gt;&lt;SPAN class=arial9italic&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: rgb(31,73,125); FONT-STYLE: normal; FONT-FAMILY: 'Calibri','sans-serif'"&gt;Rendering to intermediate layers&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;SPAN class=arial9italic&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: rgb(31,73,125); FONT-STYLE: normal; FONT-FAMILY: Symbol"&gt;&lt;SPAN&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal"&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;/SPAN&gt;&lt;SPAN class=arial9italic&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: rgb(31,73,125); FONT-STYLE: normal; FONT-FAMILY: 'Calibri','sans-serif'"&gt;Rich geometry operations (eg. unions, intersections, widening, outlining, etc)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;SPAN class=arial9italic&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: rgb(31,73,125); FONT-STYLE: normal; FONT-FAMILY: Symbol"&gt;&lt;SPAN&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal"&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;/SPAN&gt;&lt;SPAN class=arial9italic&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: rgb(31,73,125); FONT-STYLE: normal; FONT-FAMILY: 'Calibri','sans-serif'"&gt;Server-side rendering&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: rgb(31,73,125); FONT-FAMILY: Symbol"&gt;&lt;SPAN&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal"&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;SPAN style="FONT-SIZE: 10pt; COLOR: rgb(31,73,125); FONT-FAMILY: 'Calibri','sans-serif'"&gt;Preservation of rendering state&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: rgb(31,73,125); FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpLast style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Since &lt;B&gt;Direct2D &lt;/B&gt;is now public, I can finally talk about it, and this blog is intended to provide a forum for sharing information and tips.&lt;B&gt; &lt;/B&gt;I encourage you to send me your feedback and comments, and I will share them with the rest of the development team. While I can’t promise that we’ll act on &lt;I&gt;every&lt;/I&gt; piece of feedback, we will take everything that you submit seriously, and we will use the data to better understand your development priorities. &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 14pt; LINE-HEIGHT: 115%"&gt;Back to the Future&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Do we really need another 2D API? To answer this question, we need to backtrack a little bit and discuss some ancient graphics history. Windows applications continue to rely overwhelmingly on &lt;B&gt;GDI&lt;/B&gt;/&lt;B&gt;GDI&lt;/B&gt;+&lt;B&gt; &lt;/B&gt;2D graphics technologies that were designed for hardware that shipped in the 1990’s. Hardware in that era was optimized largely for simple, fixed-function scenarios (eg. BitBlt, StretchBlt, D&lt;A&gt;rawRect&lt;/A&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN class=MsoCommentReference&gt;&lt;SPAN style="FONT-SIZE: 8pt; LINE-HEIGHT: 115%"&gt;&lt;SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;, etc). Modern graphics hardware has evolved dramatically since that time. Much of the processing that used to occur in software has now migrated down to the video card’s Graphics Processing Unit (GPU) in the form of programmable pixel and vertex shaders; which increase performance by moving pixel data closer to where it will be manipulated &amp;amp; consumed, in massively parallel (SIMD) fashion. These changes have staggering implications for graphics applications. Expensive pixel-processing operations can be offloaded from the CPU to the GPU which, in turn, frees the CPU to take on other useful tasks, such as creating rich UI, driving animations, doing computations, etc. It also allows applications to scale up primitive counts dramatically with minimal CPU impact.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;One of the first proposals on the table was to update GDI/GDI+ to take advantage of these technologies; however, as we surveyed the requirements, we ran into some fundamental limitations that would have made the effort very difficult. For example, GDI/GDI+ are limited to 32 bits-per-pixel, and there’s a ton of stuff – both public and internal – that would need to be revamped or extended (eg. RGBQUAD, COLORREF, PALETTEENTRY) to support high dynamic range pixel formats beyond 32 bits-per-pixel. Similarly, there are quality and performance issues: modulo ClearType text, GDI&lt;B&gt; &lt;/B&gt;can only produce aliased graphics (jaggies) and, while GDI+&lt;STRONG&gt; &lt;/STRONG&gt;can render anti-aliased graphics, it can only do so in software. GDI uses an integer coordinate system, so it can't take advantage of improvements related to sub-pixel positioning. &lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Another fundamental problem is that GDI/GDI+&lt;B&gt;, &lt;/B&gt;and Direct3D are wholly separate graphics subsystems, with their own formats, memory structures, and synchronization constructs. Getting all of these moving parts to work in unison would have been a huge challenge, to say the least, so we went back to the drawing board to consider an alternative proposal: &lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to create a new 2D graphics stack on top of Direct3D&lt;B&gt; &lt;/B&gt;-- which would interoperate with the latest Direct3D&lt;B&gt; &lt;/B&gt;hardware -- while also providing a migration path for GDI&lt;B&gt; &lt;/B&gt;and GDI+ applications. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;When we compared the development costs of these two proposals, it became clear that creating a new graphics stack would take far less time, would avoid destabilizing the huge number of GDI&lt;B&gt; &lt;/B&gt;and GDI+&lt;B&gt; &lt;/B&gt;applications, and would enable us to provide a more cohesive, interoperable, and forward-thinking API. So, we embarked on building the new API, which went through several geeky name changes, until it emerged from the primordial acronym-soup as &lt;B&gt;Direct2D&lt;/B&gt;. This isn’t surprising, given that my team is part of the same group that produces Direct3D. It was a natural fit. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 14pt"&gt;Basic Goals&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;We started with some fundamental goals for Direct2D: &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;SPAN style="FONT-FAMILY: Symbol"&gt;&lt;SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B&gt;Native Code – &lt;/B&gt;Should be accessible to the widest possible community of developers. Minimal footprint for native code callers, and also callable by managed code.&lt;B&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;SPAN style="FONT-FAMILY: Symbol"&gt;&lt;SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B&gt;Lightweight COM – &lt;/B&gt;Should use C++ style interfaces which model Direct3D usage. No support for proxies, cross-process remoting, BSTRs, VARIANTs, COM registration (e.g. the heavyweight stuff).&lt;B&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;SPAN style="FONT-FAMILY: Symbol"&gt;&lt;SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B&gt;Immediate Mode – &lt;/B&gt;Simple BeginDraw/Draw/EndDraw semantic. No expensive retained tree structures. &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B&gt;&lt;o:p&gt;&lt;SPAN style="FONT-FAMILY: Symbol"&gt;&lt;SPAN&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B&gt;Hardware – &lt;/B&gt;Should leverage&amp;nbsp;available&amp;nbsp;hardware for rendering.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;SPAN style="FONT-FAMILY: Symbol"&gt;&lt;SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B&gt;Scalable – &lt;/B&gt;Pay-for-Play. Performance and memory usage should scale as linearly as possible while primitive counts increase. No hidden costs. Hardware improvements should scale performance accordingly.&lt;B&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;SPAN style="FONT-FAMILY: Symbol"&gt;&lt;SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B&gt;Policy-Free – &lt;/B&gt;Should impose as little policy as possible on callers; that is, it should seek to do no more (and no less) than what the caller expects it to do. Minimal amount of abstraction. &lt;B&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;SPAN style="FONT-FAMILY: Symbol"&gt;&lt;SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B&gt;Software Fallback – &lt;/B&gt;Should automatically fall back to software when hardware isn’t available (eg. session 0, server rendering scenarios). &lt;B&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;SPAN style="FONT-FAMILY: Symbol"&gt;&lt;SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B&gt;High Quality Output – &lt;/B&gt;Should produce superb anti-aliased and aliased content. ClearType for text.&lt;B&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;SPAN style="FONT-FAMILY: Symbol"&gt;&lt;SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B&gt;High Performance – &lt;/B&gt;Should leverage GPU hardware as much as possible and minimize CPU usage.&lt;B&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;SPAN style="FONT-FAMILY: Symbol"&gt;&lt;SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B&gt;Interoperable – &lt;/B&gt;Should permit rendering to and from a Direct3D surface, as well as to and from a GDI/GDI+ device context (HDC). Serialization of content to and from surfaces and device contexts must be explicit and predictable. Should work seamlessly with other native Windows technologies (DirectWrite, Windows Imaging Codecs, etc).&lt;B&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;SPAN style="FONT-FAMILY: Symbol"&gt;&lt;SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B&gt;Direct3D 10.1 – &lt;/B&gt;Should utilize D3D10.1 (and/or D3D10Level9) for hardware support.&lt;B&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;SPAN style="FONT-FAMILY: Symbol"&gt;&lt;SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B&gt;Device-Independent Coordinate System – &lt;/B&gt;Should allow applications to be written that automatically handle DPI changes and differences.&lt;B&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;SPAN style="FONT-FAMILY: Symbol"&gt;&lt;SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B&gt;Rich Geometry – &lt;/B&gt;Should provide a rich set of functions for both defining geometries and performing common geometric operations (eg. combining, intersecting)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in" mce_keep="true"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;IMG style="WIDTH: 634px; HEIGHT: 429px" height=429 src="http://blogs.technet.com/photos/thomasolsen/images/3144989/original.aspx" width=634 mce_src="http://blogs.technet.com/photos/thomasolsen/images/3144989/original.aspx"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in" mce_keep="true"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;IMG title=PerfDemo style="WIDTH: 579px; HEIGHT: 441px" height=441 alt=PerfDemo src="http://blogs.technet.com/photos/thomasolsen/images/3144360/original.aspx" width=579 mce_src="http://blogs.technet.com/photos/thomasolsen/images/3144360/original.aspx"&gt;&amp;nbsp;&lt;IMG title=Chomp style="WIDTH: 374px; HEIGHT: 418px" height=418 alt=Chomp src="http://blogs.technet.com/photos/thomasolsen/images/3144366/original.aspx" width=374 mce_src="http://blogs.technet.com/photos/thomasolsen/images/3144366/original.aspx"&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;IMG title=ChartDemo style="WIDTH: 792px; HEIGHT: 536px" height=536 alt=ChartDemo src="http://blogs.technet.com/photos/thomasolsen/images/3144371/original.aspx" width=792 mce_src="http://blogs.technet.com/photos/thomasolsen/images/3144371/original.aspx"&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in" mce_keep="true"&gt;&lt;SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 14pt; LINE-HEIGHT: 115%"&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV language=JavaScript class=msocomtxt id=_com_1 onmouseover="msoCommentShow('_anchor_1','_com_1')" onmouseout="msoCommentHide('_com_1')"&gt;
&lt;P class=MsoCommentText style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 14pt; LINE-HEIGHT: 115%"&gt;Direct2D Team Members&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;I want to thank the following folks for their tireless passion and dedication to making D2D possible: &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B&gt;&lt;SPAN&gt;Mark Lawrence&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;, &lt;B&gt;Chris Raubacher, Tom Mulcahy, Anthony Hodsdon, Miles Cohen, Ben Constable, Leonardo Blanco, Alexander Stevenson, Megha Jain, Kam VedBrat, Andy Precious, Brett Bloomquist, Bilgem Cakir, Chris Chui, Bob Brown, Samrach Tun, Sriya Blanco, Jason Hartman&lt;/B&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Furthermore, I’d like to acknowledge the following folks for understanding the importance of this new technology and funding the effort:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B&gt;&lt;SPAN&gt;Anuj Gosalia&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;, &lt;B&gt;Anantha Kacherla, Jeff Norris, Todd Frost&lt;/B&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P class=MsoCommentText style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 14pt; LINE-HEIGHT: 115%"&gt;Additional Materials&lt;/SPAN&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt; &lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
&lt;DIV language=JavaScript class=msocomtxt id=_com_1 onmouseover="msoCommentShow('_anchor_1','_com_1')" onmouseout="msoCommentHide('_com_1')"&gt;&lt;SPAN&gt;
&lt;P class=MsoCommentText style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN&gt;
&lt;P class=MsoCommentText style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Watch the Platform Overview PDC session: &lt;A href="http://channel9.msdn.com/pdc2008/PC04/" mce_href="http://channel9.msdn.com/pdc2008/PC04/"&gt;http://channel9.msdn.com/pdc2008/PC04/&lt;/A&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;BR&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;
&lt;P class=MsoCommentText style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Watch the Direct2D and DirectWrite PDC session: &lt;A href="http://channel9.msdn.com/pdc2008/PC18/" mce_href="http://channel9.msdn.com/pdc2008/PC18/"&gt;http://channel9.msdn.com/pdc2008/PC18/&lt;/A&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Also, I'm posting&amp;nbsp;a Direct2D whitepaper&amp;nbsp;that was distributed at the PDC. Future posts will drilldown into interesting code examples.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV language=JavaScript class=msocomtxt id=_com_1 onmouseover="msoCommentShow('_anchor_1','_com_1')" onmouseout="msoCommentHide('_com_1')"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV language=JavaScript class=msocomtxt id=_com_1 onmouseover="msoCommentShow('_anchor_1','_com_1')" onmouseout="msoCommentHide('_com_1')"&gt;
&lt;P class=MsoCommentText style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 14pt; LINE-HEIGHT: 115%"&gt;More Direct2D Blogs&lt;/SPAN&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt; &lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;&lt;STRONG&gt;Tom Mulcahy&lt;/STRONG&gt; --&amp;nbsp;Tom is a Software Design Engineer on the Direct2D team, and owns a good swathe of infrastructure (bitmaps and texture management, WIC interop, clipping, etc). Prior to Direct2D, Tom worked on WPF and is widely regarded as&amp;nbsp;our resident video guru. &lt;BR&gt;&lt;A href="http://blogs.msdn.com/tmulcahy/default.aspx"&gt;http://blogs.msdn.com/tmulcahy/default.aspx&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;&lt;BR&gt;&lt;STRONG&gt;Mark Lawrence&lt;/STRONG&gt; -- Mark is a Senior Software Design Engineer on the Direct2D team, and driving force behind the design and philosophy of the Direct2D API. He brings a ton of experience from his previous work on WPF, Windows Print architecture, and private industry.&lt;BR&gt;&lt;A href="http://blogs.technet.com/MarkLawrence/"&gt;http://blogs.technet.com/MarkLawrence/&lt;/A&gt; &lt;BR&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&lt;STRONG&gt;Ben Constable &lt;/STRONG&gt;-- Ben is a Senior Software Design Engineer on the Direct2D team, and implemented&amp;nbsp;all of the&amp;nbsp;Direct3D and GDI Interop functionality within Direct2D. He is a self-described "graphics nerd" who brings&amp;nbsp;&amp;nbsp;considerable experience&amp;nbsp;in 2D and 3D rendering to the team, and has&amp;nbsp;contributed to numerous Microsoft products (Visual Studio, Windows, Office, SQL, etc).&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;A href="http://blogs.msdn.com/bencon/"&gt;&lt;FONT face=Calibri size=3&gt;http://blogs.msdn.com/bencon/&lt;/FONT&gt;&lt;/A&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3144190" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/thomasolsen/attachment/3144190.ashx" length="86293" type="application/vnd.openxmlformats-officedocument.word" /><category domain="http://blogs.technet.com/thomasolsen/archive/tags/Direct3D/default.aspx">Direct3D</category><category domain="http://blogs.technet.com/thomasolsen/archive/tags/DXGI/default.aspx">DXGI</category><category domain="http://blogs.technet.com/thomasolsen/archive/tags/Warp/default.aspx">Warp</category><category domain="http://blogs.technet.com/thomasolsen/archive/tags/2D/default.aspx">2D</category><category domain="http://blogs.technet.com/thomasolsen/archive/tags/3D/default.aspx">3D</category><category domain="http://blogs.technet.com/thomasolsen/archive/tags/Imaging/default.aspx">Imaging</category><category domain="http://blogs.technet.com/thomasolsen/archive/tags/Geometry/default.aspx">Geometry</category><category domain="http://blogs.technet.com/thomasolsen/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://blogs.technet.com/thomasolsen/archive/tags/D2D/default.aspx">D2D</category><category domain="http://blogs.technet.com/thomasolsen/archive/tags/Direct2D/default.aspx">Direct2D</category><category domain="http://blogs.technet.com/thomasolsen/archive/tags/D3D/default.aspx">D3D</category><category domain="http://blogs.technet.com/thomasolsen/archive/tags/DirectWrite/default.aspx">DirectWrite</category><category domain="http://blogs.technet.com/thomasolsen/archive/tags/DWrite/default.aspx">DWrite</category><category domain="http://blogs.technet.com/thomasolsen/archive/tags/WIC/default.aspx">WIC</category><category domain="http://blogs.technet.com/thomasolsen/archive/tags/D3D10/default.aspx">D3D10</category></item></channel></rss>