zwcloud / ImGui

Immediate Mode GUI for C#
https://zwcloud.net/#project/imgui
GNU Affero General Public License v3.0
197 stars 21 forks source link

implement a stateful PathGeometry builder and expose to DrawContext #41

Open zwcloud opened 4 years ago

zwcloud commented 4 years ago

This is another preparation for text-rendering unit-tests.

Currently, the only way to create a PathGeometry is adding segments one by one, adding figures one by one. https://github.com/zwcloud/ImGui/blob/accca31a7605343bd76dc76d0da74ba65736548f/src/ImGui/Control/Toggle.cs#L180-L188

ImGui shoud provide stateful APIs as a convenient alternative like the HTML's canvas 2D path APIs.

zwcloud commented 4 years ago

reference:

TODO StreamGeometryContext should be implemented first and the PathGeometryBuilder will be built on top of it.