Delphi 全局画点TCanvas.Pixels[X,Y]

procedure TForm1.btnChangePixelClick(Sender: TObject);
var
    baseX : integer ;
    baseY : integer ;
    i,j : integer;
    c : TCanvas;
begin
    baseX :=100;
    baseY := 100;
    c := TCanvas.create;
    try
        c.Handle := GetDC(0);
        for i := baseX - 1 to baseX + 1 do
        begin
            for j := baseY - 1 to baseY + 1 do
            begin
                c.Pixels[i,j] := RGB($FF,0,0);
                //self.Canvas.Pixels[i,j] := RGB($FF,0,0);
            end;
        end;
    finally
      c.Free;
    end;

end;

end.

  

 

Delphi 全局画点TCanvas.Pixels[X,Y]

上一篇:C# 网络编程之webBrowser获取网页url和下载网页中图片


下一篇:使用Thrift API监控Storm集群和Topology