Direct2D: Difference between revisions
Reverted 1 edit by 175.138.233.253 (talk): Rm trivia: see talk page for discussion. (TW) |
No edit summary |
||
Line 1: | Line 1: | ||
{{primary sources|date=April 2011}} |
{{primary sources|date=April 2011}} |
||
'''Direct2D''' is a [[2D computer graphics|2D]] and [[vector graphics|vector]] graphics [[application programming interface]] (API) designed by [[Microsoft]] and implemented in [[Windows 8]], [[Windows 7]] and [[Windows Server 2008 R2]], and also [[Windows Vista]] and [[Windows Server 2008]] (with [[Windows Vista Platform Update|Platform Update]] installed).<ref>{{cite web|url=http://blogs.technet.com/thomasolsen/archive/2009/03/24/updated-direct2d-in-march-directx-sdk.aspx |title=Updated Direct2D in March DirectX SDK - Tom's Blog - Site Home - TechNet Blogs |publisher=blogs.technet.com |date=2009-03-24 |accessdate=2011-12-26}}</ref> |
'''Direct2D''' is a [[2D computer graphics|2D]] and [[vector graphics|vector]] graphics [[application programming interface]] (API) designed by [[Microsoft]] and implemented in [[Windows 8]], [[Windows 7]] and [[Windows Server 2008 R2]], and also [[Windows Vista]] and [[Windows Server 2008]] (with [[Windows Vista Platform Update|Platform Update]] installed).<ref>{{cite web|url=http://blogs.technet.com/thomasolsen/archive/2009/03/24/updated-direct2d-in-march-directx-sdk.aspx |title=Updated Direct2D in March DirectX SDK - Tom's Blog - Site Home - TechNet Blogs |publisher=blogs.technet.com |date=2009-03-24 |accessdate=2011-12-26}}</ref> |
||
Microsoft has fixed many Direct2D bugs in Windows 7 through Windows 7 Service Pack 1(SP1),<ref>{{cite web|url=http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c3202ce6-4056-4059-8a1b-3a9b77cdfdda |title=Download: Windows 7 and Windows Server 2008 R2 Service Pack 1 (KB976932) |publisher=Microsoft.com |date=2011-03-15 |accessdate=2011-12-26}}</ref> KB2505438 update<ref>{{cite web|url=http://support.microsoft.com/kb/2505438 |title=Slow performance in applications that use the DirectWrite API on a computer that is running Windows 7 or Windows Server 2008 R2 |publisher=Microsoft Support web site |date=2011-08-13 |accessdate=2011-12-26}}</ref>, KB2670838 update<ref>{{cite web|url=http://support.microsoft.com/kb/2670838 |title=A platform update is available for Windows 7 SP1 and Windows Server 2008 R2 SP1 |publisher=Microsoft Support web site |date=2012-11-14 |accessdate=2012-11-14}}</ref> and KB2912390 update. <ref>{{cite web|url=https://support.microsoft.com/kb/2912390 |title=MS14-007: Vulnerability in Direct2D could allow remote code execution: February 11, 2014 |publisher=Microsoft Support web site |date=2012-11-14 |accessdate=2014-02-11}}</ref> |
|||
Direct2D offers high quality and fast performance while maintaining interoperability with [[Graphics Device Interface|GDI]]/GDI+ APIs and [[Direct3D]]/DirectDraw APIs.<ref>{{cite web|url=http://msdn.microsoft.com/en-us/library/dd370990(VS.85).aspx |title=Direct2D |publisher=[[MSDN]] |date= |accessdate=2011-12-26}}</ref> It can take advantage of hardware acceleration through compatible [[Video card|graphics cards]]. |
Direct2D offers high quality and fast performance while maintaining interoperability with [[Graphics Device Interface|GDI]]/GDI+ APIs and [[Direct3D]]/DirectDraw APIs.<ref>{{cite web|url=http://msdn.microsoft.com/en-us/library/dd370990(VS.85).aspx |title=Direct2D |publisher=[[MSDN]] |date= |accessdate=2011-12-26}}</ref> It can take advantage of hardware acceleration through compatible [[Video card|graphics cards]]. |
Revision as of 22:21, 19 May 2014
Direct2D is a 2D and vector graphics application programming interface (API) designed by Microsoft and implemented in Windows 8, Windows 7 and Windows Server 2008 R2, and also Windows Vista and Windows Server 2008 (with Platform Update installed).[1]
Microsoft has fixed many Direct2D bugs in Windows 7 through Windows 7 Service Pack 1(SP1),[2] KB2505438 update[3], KB2670838 update[4] and KB2912390 update. [5]
Direct2D offers high quality and fast performance while maintaining interoperability with GDI/GDI+ APIs and Direct3D/DirectDraw APIs.[6] It can take advantage of hardware acceleration through compatible graphics cards.
Overview
Direct2D is a native code API based on C++ that can be called by managed code and uses a "lightweight COM" approach just like Direct3D, with minimal amount of abstraction. However, unlike WPF and similarly to GDI/GDI+, Direct2D is an "immediate mode" rendering API with simple BeginDraw/Draw/EndDraw calls; Direct2D has no concept of a "scene" and does not use retained tree structures, and the rendering state is preserved between drawing calls.
Direct2D can minimize CPU usage and utilise hardware rendering on a graphics card that supports Direct3D 10.1 and/or Direct3D 10 Level 9 with WDDM 1.1 drivers, falling back to software rendering using WARP10 in situations when hardware is not available, such as session 0, and for remote server-side rendering. Direct2D performance and memory usage scale linearly with primitive counts in both software and hardware.
Direct2D supports high-quality rendering with the following features:
- ClearType text rendering (provided by DirectWrite)
- Per primitive antialiasing
- Draw and fill commands for geometries (lines, curves) and bitmaps
- Solid color, linear, radial, and bitmap brushes.
- Rendering to intermediate layers
- Rich geometry operations (e.g. unions, intersections, widening, outlining, etc.)
Direct2D allows interoperability with GDI, GDI+, and Direct3D and permits rendering to and from a Direct3D surface, as well as to and from a GDI/GDI+ device context (HDC) with full serialization of surfaces and device contexts, which enables it to work with other native Windows technologies such as DirectWrite, Windows Imaging Component, etc. Such interoperability allows developers to gradually replace critical code paths with Direct2D code without the need to overhaul their entire source code.
Direct2D uses a device-independent coordinate system, which allows automatic GUI scaling for different DPI settings that depend on various display resolutions and monitor sizes.
Implementations
Internet Explorer 9 and Mozilla Firefox 4 and later use Direct2D and DirectWrite for improved performance and visual quality.
See also
References
- ^ "Updated Direct2D in March DirectX SDK - Tom's Blog - Site Home - TechNet Blogs". blogs.technet.com. 2009-03-24. Retrieved 2011-12-26.
- ^ "Download: Windows 7 and Windows Server 2008 R2 Service Pack 1 (KB976932)". Microsoft.com. 2011-03-15. Retrieved 2011-12-26.
- ^ "Slow performance in applications that use the DirectWrite API on a computer that is running Windows 7 or Windows Server 2008 R2". Microsoft Support web site. 2011-08-13. Retrieved 2011-12-26.
- ^ "A platform update is available for Windows 7 SP1 and Windows Server 2008 R2 SP1". Microsoft Support web site. 2012-11-14. Retrieved 2012-11-14.
- ^ "MS14-007: Vulnerability in Direct2D could allow remote code execution: February 11, 2014". Microsoft Support web site. 2012-11-14. Retrieved 2014-02-11.
- ^ "Direct2D". MSDN. Retrieved 2011-12-26.
External links
- Blog of Direct2D Lead Developer Thomas Olsen
- Blog of Direct2D Developer Tom Mulcahy
- Direct2D White Papers
- Windows 7: Introducing Direct2D and DirectWrite - PDC 2008 video
- Windows API Code Pack for Microsoft .NET Framework - allows developing Direct2D apps in managed code
- Introducing Direct2D - June 2009 issue of MSDN Magazine
- Drawing with Direct2D - September 2009 issue of MSDN Magazine
- Direct2D API for Microsoft .Net Framework 4 - Direct2D API for Microsoft .Net Framework 4