1. 首页
  2. 编程语言
  3. 其他
  4. Delphi Canvas.Brush为窗体绘制渐变背景.rar

Delphi Canvas.Brush为窗体绘制渐变背景.rar

上传者: 2020-05-22 09:16:37上传 RAR文件 9.12KB 热度 25次
Delphi为窗体绘制渐变背景,这里使用了Delphi中的Canvas.Brush.Color来实现窗口背景的渐变色,不错吧?如示例图的左右渐变效果,实现的代码:   fori:=0toself.Width-1do   begin   c1:=GetRValue(StartColor)Trunc(i*(GetRValue(EndColor)-GetRValue(StartColor))/(self.Width-1));   c2:=GetGValue(StartColor)Trunc(i*(GetGValue(EndColor)-GetGValue(StartColor))/(s
下载地址
用户评论