Report the glyph space transform of COLR sweep gradient layers

Đang mở Phù hợp với người mới
#134 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
76/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp
Lĩnh vực
computer-graphics

Hướng nghiên cứu

Đọc source/text/font_hb.cpp, đặc biệt là paint_sweep_gradient quanh các trường layer được hiển thị trong issue, rồi theo dõi cách glyphTransform() và radialTransform được dùng cho các layer gradient khác. Kiểm tra các bài test renderer hoặc gradient liên quan nếu repository chỉ ra chúng. Hoàn thành khi các layer sweep gradient báo cáo phép biến đổi không gian glyph tại tâm sweep để renderer có thể áp dụng các phép biến đổi font bao bên ngoài.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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));
 }
Ngôn ngữ chính
C++
Star
1.2k
Fork
133
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của rive-app/rive-runtime

Tất cả issue của rive-app/rive-runtime

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.