Delphi 与 DirectX 之 DelphiX(55): TDIB.DoMosaic();
生活随笔
收集整理的這篇文章主要介紹了
Delphi 与 DirectX 之 DelphiX(55): TDIB.DoMosaic();
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
本例效果圖:
代碼文件:
unit Unit1;interfaceusesWindows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, DIB, StdCtrls;typeTForm1 = class(TForm)DXPaintBox1: TDXPaintBox;Button1: TButton;Button2: TButton;procedure Button1Click(Sender: TObject);procedure Button2Click(Sender: TObject);end;varForm1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject); constImgPath1 = 'C:\Temp\DX.jpg'; beginDXPaintBox1.DIB.LoadFromFile(ImgPath1);DXPaintBox1.Width := DXPaintBox1.DIB.Width;DXPaintBox1.Height := DXPaintBox1.DIB.Height;DXPaintBox1.Repaint; end;procedure TForm1.Button2Click(Sender: TObject); beginDXPaintBox1.DIB.DoMosaic(4);DXPaintBox1.Repaint; end;end.
轉載于:https://www.cnblogs.com/del/archive/2009/01/16/1377302.html
總結
以上是生活随笔為你收集整理的Delphi 与 DirectX 之 DelphiX(55): TDIB.DoMosaic();的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: VS2005 自动生成属性(转)
- 下一篇: SharePoint Calendar