本例效果图:



代码文件:


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);
varw,h,i: Integer;
beginw := DXPaintBox1.DIB.Width;h := DXPaintBox1.DIB.Height;for i := 0 to 9999 do beginDXPaintBox1.DIB.BlendPixel(Random(w), Random(h div 2), clRed, 255);DXPaintBox1.DIB.BlendPixel(Random(w), Random(h div 2) + (h div 2), clRed, 64);end;DXPaintBox1.Repaint;
end;end.

Delphi 与 DirectX 之 DelphiX(80): TDIB.BlendPixel();相关推荐

  1. Delphi 与 DirectX 之 DelphiX(25): TDIB.Blur();

    DelphiX 的组件面板上, 第二个就是 TDXDIB; TDXDIB.DIB 是 TDXDIB 的唯一属性(其他是 TComponent 固有的); TDXDIB.DIB 属性是一个 TDIB 对 ...

  2. Delphi 与 DirectX 之 DelphiX(89): TDIB.DrawAlphaMask();

    本例效果图: 代码文件: unit Unit1;interfaceusesWindows, Messages, SysUtils, Variants, Classes, Graphics, Contr ...

  3. Delphi 与 DirectX 之 DelphiX(95): TDIB.x

    //让 TDIB 的这些特效烦透了: 多.还重复.又不完善; 还没有测试或测试失败的方法: procedure DrawShadow(SrcDIB: TDIB; X, Y, Width, Height ...

  4. Delphi 与 DirectX 之 DelphiX(33): TDIB.SmoothRotateWrap();

    本例效果图: 代码文件: unit Unit1;interfaceusesWindows, Messages, SysUtils, Variants, Classes, Graphics, Contr ...

  5. Delphi 与 DirectX 之 DelphiX(72): TDIB.SephiaEffect();

    为什么80%的码农都做不了架构师?>>>    本例效果图: 代码文件: unit Unit1;interfaceusesWindows, Messages, SysUtils, V ...

  6. Delphi 与 DirectX 之 DelphiX(93): TDIB.DrawDarken();

    本例效果图: 代码文件: unit Unit1;interfaceusesWindows, Messages, SysUtils, Variants, Classes, Graphics, Contr ...

  7. Delphi 与 DirectX 之 DelphiX(83): TDIB.FilterLine()、FilterRect();

    本例效果图: 代码文件: unit Unit1;interfaceusesWindows, Messages, SysUtils, Variants, Classes, Graphics, Contr ...

  8. Delphi 与 DirectX 之 DelphiX(28): TDIB.Emboss;

    为什么80%的码农都做不了架构师?>>>    本例效果图: 代码文件: unit Unit1;interfaceusesWindows, Messages, SysUtils, V ...

  9. Delphi 与 DirectX 之 DelphiX(77): TDIB.Distort();

    本例效果图: 代码文件: unit Unit1;interfaceusesWindows, Messages, SysUtils, Variants, Classes, Graphics, Contr ...

最新文章

  1. html溢出攻击,溢出(漏洞)攻击的实现及防御
  2. 一分钟了解 TCP/IP 模型
  3. 织梦php首页老是自动恢复,dede首页网址自动加上index.html问题解决方法
  4. 成功解决ImportError: [joblib] Attempting to do parallel computing without protecting your import on a sy
  5. 笔记-信息化与系统集成技术-云计算操作系统的主要关键技术
  6. CentOS 快速安装pip
  7. 卫星参数大全_【视频】早期国外做工精良的海事卫星电话机拆解
  8. plsql连接oracle11g怎么配置,怎么使用plsql怎么连接64位Oracle11g数据库?
  9. Webpack4干货分享(二),使用loader处理scss,图片以及转换JS
  10. Mongo 安装、配置、启动 Windows
  11. 程序员应学习蜡笔小新的心态
  12. 手眼标定eye-to-hand 示例:handeye_stationarycam_calibration
  13. Python: 50个能够满足所有需要的模块
  14. 设置linearlayout最大高度_ICEM CFD网格设置参数意义
  15. ES2021 更新的内容!
  16. 第六课-Android四大组件之Activity
  17. 逆置单链表c语言程序,逆置单链表C语言
  18. pythonturtle库填充_python turtle库笔记
  19. V-rep中导入机械臂模型并验证
  20. 逃跑h5小游戏源码熊出没手机游戏

热门文章

  1. ExtJS监听键盘事件:回车键实现登录功能
  2. GARFIELD@09-11-2004
  3. Spring、Struts整合
  4. 汉诺塔的递归实现,看完就懂了
  5. 1.php查询数据,数据查询 · thinkphp5 · 看云
  6. android n 支持机型,Android N无缝更新功能不适于现有机型
  7. php 5.2.6升级,Centos5.5 简单方法升级php到php5.2.6
  8. mysql 脚本安装工具_mysql 非安装版的一个自动安装脚本及工具(更新版)
  9. WPF设计の自定义窗体
  10. 面向切面编程AspectJ在Android埋点的实践