abey79 / vsvg

Fast and portable tools for plotter users
http://whisk.rs
MIT License
107 stars 12 forks source link

Add `Angle` helper and improve related APIs #140

Closed abey79 closed 3 months ago

abey79 commented 3 months ago

This PR introduces Angle, an helper to deal with radian/degree angles. It replaces the rotate_*_deg methods of the Transform trait, which are removed.

Note: Angle uses radians internally, and radians is the expected unit for all APIs. However, when parsing strings without unit, degrees are expected instead (since it's most commonly used). Likewise, the whiskers widget for Angle defaults to using degrees for display (can be changed using #[param(rad)].

Also: