Report the glyph space transform of COLR sweep gradient layers

オープン 初心者向け
#134 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
cpp

調査の方向性

source/text/font_hb.cppを読み、特にissueに示されているレイヤーフィールド付近のpaint_sweep_gradientを確認し、他のグラデーションレイヤーでglyphTransform()とradialTransformがどのように使われているかを追ってください。リポジトリで該当するレンダラーまたはグラデーションのテストが示されている場合は確認してください。スイープグラデーションレイヤーがスイープの中心におけるグリフ空間の変換を報告し、レンダラーがそれを使って外側のフォント変換を適用できる状態になれば完了です。

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

説明

Report the glyph space transform of COLR sweep gradient layers.

- source/text/font_hb.cpp: COLR sweep gradient layers also report their glyph space transform in radialTransform, placed at the sweep center, so renderers can draw them as angular gradients under the font transforms enclosing them

diff --git a/source/text/font_hb.cpp b/source/text/font_hb.cpp
index bf18635190af367d266106d41d4327f259b7816d..8b8f74c922fb5445f37ff09afbc8fe189daf8ebe 100644
--- a/source/text/font_hb.cpp
+++ b/source/text/font_hb.cpp
@@ -647,6 +647,7 @@ static void paint_sweep_gradient(
   layer.y0 = sc.y;
   layer.startAngle = startAngle;
   layer.endAngle = endAngle;
+  layer.radialTransform = state->glyphTransform() * rive::Mat2D::fromTranslate(cx, cy);
 
   state->layers->push_back(std::move(layer));
 }
主要言語
C++
スター
1.2k
フォーク
133
PR マージ指標
30日以内にマージされた PR はありません

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

rive-app/rive-runtime のほかの issue

rive-app/rive-runtime の issue をすべて見る

似ている issue

C++ の issue をもっと見る

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

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