GraphiteEditor / GraphiteEditor/Graphite
Add custom data types for angles and factors/percentages
- Langage dominant
- Rust
- Étoiles
- 27.2k
- Forks
- 1.3k
- Merge moyen
- 20 h 5 min
- PR mergées (30 j)
- 57
Description
Instead of using `f64` for all types of numbers, there are some with special significance.
- Angles can be represented by degrees or radians. Our data type should encode one unambiguous value, enforcing any nodes that want to construct or read an angle to do so with an explicit choice of degrees or radians. This should replace the Transform node's rotation and X-skew/Y-skew angles, avoiding the confusion that the inputs given in the node graph aren't the user-friendly degrees set in the Properties panel. (See [#2431](https://github.com/GraphiteEditor/Graphite/pull/2431))
- Percentages can be represented out of 100 (percent) or 1 (factor). This distinctly represents not a quantity but a portion out of a whole, so it needs its own type. This avoids the confusion and mess caused by our current inconsistent usage of percentages and factors in various places, with uncertainty about whether those values are out of 1 or 100 when fed by the node graph. We can ensure number input widgets in range mode display the factor or percent on a per-case basis for whichever is designed to be the more logical approach, or do what Blender does and offer an app preference to display all such quantities as out of 1.00 or out of 100%.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Commencez par suivre les valeurs de rotation et de X-skew/Y-skew du nœud Transform, puis suivez les entrées numériques du graphe de nœuds décrites dans l’issue. Identifiez les utilisations incohérentes des pourcentages et des facteurs, et définissez le périmètre concerné ; le travail est terminé lorsque les angles et les portions utilisent systématiquement des représentations explicites et non ambiguës.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- rust
- Domaine
- computer-graphics
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 30/100