Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要在 D2D 设备中绘制弧线,是否有执行此操作的函数?(类似于 DrawLine 或 DrawEllipse)否则,我已经看到有返回 D2D1_ARC_SEGMENT 结构的 ArcSegment 函数,我该如何绘制?
D2D1_ARC_SEGMENT可以在填充路径几何图形 ( )ID2D1PathGeometry时使用。将所需的弧线添加到路径后,您可以使用ID2D1RenderTarget::Draw/FillGeometry().
D2D1_ARC_SEGMENT
ID2D1PathGeometry
ID2D1RenderTarget::Draw/FillGeometry()
我对 Direct2D 不太熟悉,所以我不知道有什么特定的功能可以让你这样做,但是它不会阻止你实现自己的功能来实现你想要的。
我建议研究样条曲线以及它们是如何计算的wiki
似乎是一个不错的起点。然后,您可以使用公式和几个 DrawLine 调用生成您的 Arc。
编辑:甚至这可能会更好地为您服务。