资 源 简 介
Delphi实现RGB色环多次渐变,生成一个渐变的圆形,颜色渐变步长可自定义,在代码中,为了绘制出来的圆好看,分成四个部分进行绘制,此部分代码展示如下:
if (degree >= 0+qki) and (degree <= 45+qki) then
Canvas.FillRect(Rect(x,y,x-2,y-1));
if (degree > 45+qki) and (degree <= 135+qki) then
Canvas.FillRect(Rect(x,y,x-1,y-2));
if (degree > 135+qki) and (degree <= 225+qki) then
Canvas.FillRect(Rect(x,y,x+2,y+1));
if (degree > 215+qki) and (degree <= 315+qki) then
Canvas.FillRect(Rect(x,y,x+1,y+2));
if (degree > 315+qki) and (degree <= 360+qki) then
Canvas.FillRect(Rect(x,y,x-2,y-1));