GraphiteEditor / GraphiteEditor/Graphite

Allow strokes to not be affecting by a scale transformation

オープン
#2,960 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Rust
スター
27.2k
フォーク
1.3k
平均マージ
20時間 5分
マージ済み PR(30日)
57

説明

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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

まず、提案されている Stroke ノードの変更とリンク先の pull request の議論を確認し、実装前に @Keavon と動作をすり合わせてください。受け入れられたスケーリング設計を定義し、新しいパラメーターに対応するようドキュメントのマイグレーションを更新して、既存のドキュメントで index-out-of-bounds マイグレーションバグが発生しなくなったことを確認してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
rust
領域
computer-graphics
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。