GraphiteEditor / GraphiteEditor/Graphite

Allow strokes to not be affecting by a scale transformation

Abierto
#2,960 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Rust
Estrellas
27.2k
Forks
1.3k
Merge medio
20 h 5 min
PR fusionados (30 d)
57

Descripción

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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

First review the proposed Stroke node changes and the linked pull request discussion, then clear the behavior with @Keavon before implementation. Define the accepted scaling design, update document migration for the new parameter, and verify that existing documents no longer trigger the index-out-of-bounds migration bug.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
rust
Área
computer-graphics
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.