码迷,mamicode.com
首页 > Windows程序 > 详细

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

时间:2015-01-14 12:31:01      阅读:560      评论:0      收藏:0      [点我收藏+]

标签:

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]

标签:

原文地址:http://www.cnblogs.com/wucg/p/4223592.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!