GraphiteEditor / GraphiteEditor/Graphite
Allow strokes to not be affecting by a scale transformation
- Langage dominant
- Rust
- Étoiles
- 27.2k
- Forks
- 1.3k
- Merge moyen
- 20 h 5 min
- PR mergées (30 j)
- 57
Description
The following description is one possible approach to implementing this, but it has not been decided if this is how it should be done. Anyone looking to implement this will first need to clear it with @Keavon from a design angle. See [this](https://github.com/GraphiteEditor/Graphite/pull/2961#issuecomment-3239632940). The description proposed by @chbornman is as follows:
---
## Summary
Add a "Scaling" field to the Stroke node that allows users to toggle whether strokes should scale with shape transformations or maintain a constant visual width.
## Motivation
Currently, strokes always scale with shape transformations. This feature gives users control over stroke behavior, which is a common requirement in vector graphics applications. Users can choose between:
- **Scale with Shape**: Strokes scale proportionally with transformations (default)
- **Non-Scaling**: Strokes maintain constant visual width regardless of transformations
## Implementation Details
- Add `StrokeScaling` enum with `ScaleWithShape` and `NonScaling` options
- Add new "Scaling" parameter to the Stroke node
- Update document migration to handle the new parameter
- Fix migration bug that caused index out of bounds error when upgrading existing documents
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Commencez par examiner les modifications proposées pour le nœud Stroke et la discussion de la pull request associée, puis validez le comportement avec @Keavon avant l’implémentation. Définissez la conception de mise à l’échelle acceptée, mettez à jour la migration des documents pour le nouveau paramètre et vérifiez que les documents existants ne déclenchent plus l’erreur de migration index-out-of-bounds.
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é
- À clarifier
- Accessibilité débutants
- 25/100