Color gradient algorithm

后端 未结 4 1328
别那么骄傲
别那么骄傲 2020-12-23 15:17

Given two rgb colors and a rectangle, I\'m able to create a basic linear gradient. This blog post gives very good explanation on how to create it. But I want to add one more

4条回答
  •  無奈伤痛
    2020-12-23 16:21

    The comment of @user2799037 is totally correct: each line is moved by some pixels to the right compared to the previous one.

    The actual constant can be computed as the tangent of the angle you specified.

提交回复
热议问题