SchobiHH 0 Posted December 16, 2023 Hello, I am new to this forum. I am building a CAD Tool. Need to draw Bezier-Curves on a canvas. The problem I encountered is, that the original canvas only supports TPoint. But my curves points are of type TPointF to have sufficient precision. I have found out that TDirect2d uses TPointF for there drawing. But the Delphi Implementation TDirect2dCanvas does not. Therefore I have replicated the relevant drawing procedures to use TPointF. This is a hack but for me that is sufficient. Does anybody else has similar problems with the TDirect2dCanvas as me? best regards Joerg Share this post Link to post
Vandrovnik 215 Posted December 16, 2023 Hello, I am using Direct2D interfaces directly, so I do not use TDirect2dCanvas. Will you be able do print/export with TDirect2dCanvas? Share this post Link to post
pyscripter 694 Posted December 16, 2023 1 hour ago, Vandrovnik said: Will you be able do print/export with TDirect2dCanvas? The Direct2D way of printing is to use the ID2D1PrintControl interface (Printing and command lists - Win32 apps | Microsoft Learn). You can look at SynEdit/Source/SynEditPrint.pas at master · pyscripter/SynEdit (github.com) for how this works. Share this post Link to post
Vandrovnik 215 Posted December 16, 2023 7 minutes ago, pyscripter said: The Direct2D way of printing is to use the ID2D1PrintControl interface (Printing and command lists - Win32 apps | Microsoft Learn). You can look at SynEdit/Source/SynEditPrint.pas at master · pyscripter/SynEdit (github.com) for how this works. Thank you, I am already using it, but when I started to use Direct2D, it looked impossible to print with TDirect2dCanvas. Share this post Link to post