浏览代码

LibWeb: Respect conic gradient start angle in Skia painter

Aliaksandr Kalenik 1 年之前
父节点
当前提交
1ad4cd55b5
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Userland/Libraries/LibWeb/Painting/DisplayListPlayerSkia.cpp

+ 2 - 2
Userland/Libraries/LibWeb/Painting/DisplayListPlayerSkia.cpp

@@ -1183,9 +1183,9 @@ CommandResult DisplayListPlayerSkia::paint_conic_gradient(PaintConicGradient con
     auto center = command.position.translated(rect.location()).to_type<float>();
 
     SkMatrix matrix;
-    matrix.setRotate(-90, center.x(), center.y());
+    matrix.setRotate(-90 + conic_gradient_data.start_angle, center.x(), center.y());
 
-    // FIXME: Account for repeat length and start angle
+    // FIXME: Account for repeat length
     auto shader = SkGradientShader::MakeSweep(center.x(), center.y(), colors.data(), positions.data(), positions.size(), 0, &matrix);
 
     SkPaint paint;