GraphiteEditor / GraphiteEditor/Graphite

Allow strokes to not be affecting by a scale transformation

Aperta
#2,960 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Rust
Stelle
27.2k
Fork
1.3k
Merge medio
20h 5m
PR unite (30g)
57

Descrizione

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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.