IGPGraphics.GetHDC
From Mitov Wiki Doc
(Difference between revisions)
(Automated Syncronization with Documentation) |
(Automated Syncronization with Documentation) |
(One intermediate revision by one user not shown) |
Latest revision as of 00:30, 26 June 2013
This is a Beta Read Only version of this page. Please review and send recommendations to mitov@mitov.com. We will enable the editing as soon as we are happy with the overall Wiki site.
Description
Call this method to get a handle to the device context associated with this TGPGraphics object.
Example:
The following function has a pointer to a Graphics object as its only parameter. The function calls Graphics::GetHDC to get a handle to the device context associated with the Graphics object and then passes that device context handle to the Microsoft Windows Graphics Device Interface (GDI)Rectangle function. The call to ReleaseHDC releases the device context handle.
AGraphics.DrawEllipse( TGPPen.Create( aclBlue ), 10, 10, 100, 50); // GDI+ AHdc := AGraphics.GetHDC(); // Make GDI calls, but don't call any methods // on g until after the call to ReleaseHDC. Rectangle( AHdc, 120, 10, 220, 60); // GDI AGraphics.ReleaseHDC(AHdc); // Ok to call methods on g again. AGraphics.DrawLine( TGPPen.Create( aclRed ), 240, 10, 340, 60);