Jump to content
Sign in to follow this  
SchobiHH

TDirect2dCanvas Issues

Recommended Posts

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

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×