I have a lot of the GDI functions converted to Direct2D functions. I am still using the GDI pens and brushes, so I just create Direct2D equivalent objects at the time the Direct2D functions are called to draw stuff.
Old GDI Drawing
New Direct2D Drawing
I have arcs, pies, lines, fills, all working pretty well. I have not tried to handle dotted lines or text yet. And the selection box drawn when the mouse is used to select multiple elements, is a color that doesn’t seem quite right.
But progress is good and I’m very please with the results.
One thing I am looking forward to is the text output. If the text can be rotated easily at runtime without needing to create a new font for every line of text, I may try to rotate the text to align with the links, and especially to align with measurement lines. I may end up having to use the Direct2D rendering for image and video export too! That might even make things quicker in the long run if I can scale the drawing process instead of shrinking a larger bitmap to get the look I want.