-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
issue_link
Commit Hash
Target
stable
Impacted Users
any Flutter dev using a matrix in a text gradient in 2.13(-pre)
Impact Description
Gradients have an optional matrix that controls how their stop locations appear in the frame. If a Gradient is used to render text then we will fumble that matrix and render the gradient incorrectly.
Workaround
In some cases, the matrix can be directly applied to, for example, the end points of a linear gradient, but that isn't true for all gradient types or all matrix types. A skewing gradient affects the perpendicular vectors of a gradient which can distort it in ways that applying the matrix to the geometry cannot achieve.
Risk
low
Test Coverage
yes
Validation Steps
The original commit above had API tests to verify that we were implementing the API that was causing the problem correctly, but it did not contain a golden test to verify that we were rendering the correct output.
A golden test was merged immediately after the fix and can be found in flutter/engine#33153
Running that golden test, or the test case in the original issue (both are basically the same code), will demonstrate the fix.