2D CAD graphics API - any recommendations?

I'd like to ask you for a recommendention. I'm looking for a rust graphics API I could use for a 2D CAD project. I need just an interactive viewport. It's supposed to display only lines, arcs, circles and text (or maybe some arrows). But it should be possible to disable scale of the line widths (and arrow pointers). So when a line is 1pt or 1px wide, it should stay so regardless of the zoom factor. Sorry if the answer is obvious. I hope it is.

(In Qt or kivy I just used line width of 0 and it worked fantastic)

I happen to be looking into 2D CAD as well.

I've looked into egui and actually tried Iced. For egui the plan was to use the plot widget to accomplish this, but I found it difficult to keep things tidy and I never got around to doing much with it.

Iced is useable but not very mature. It has the canvas widget which does this nicely. You're going to have to do the scaling logic (as well as everything else, its just a patch of screen you can draw on) yourself, though. The clock and game_of_life examples use the canvas widget.

Might be something better out there, dunno.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.