GDI+ 学习记录(7): 实心画刷 - SolidBrush

//实心画刷
var
  g: TGPGraphics;
  sb: TGPSolidBrush;
begin
  g := TGPGraphics.Create(Canvas.Handle);

  sb := TGPSolidBrush.Create(aclGreen); {参数是颜色}

  g.FillEllipse(sb, 11, 11, 222, 111);

  sb.Free;
  g.Free;
end;

 
//设置画刷颜色 var g: TGPGraphics; sb: TGPSolidBrush; begin g := TGPGraphics.Create(Canvas.Handle); sb := TGPSolidBrush.Create(MakeColor(255,0,0)); g.FillRectangle(sb,10,10,100,100); sb.SetColor(MakeColor(255,0,255)); {设置画刷颜色} g.FillEllipse(sb,111,10,222,88); sb.Free; g.Free; end;

你可能感兴趣的:(DB)