BGRABitmap图像操作12:文本操作功能
来源:互联网 发布:永久域名 编辑:程序博客网 时间:2024/05/21 14:57
http://wiki.lazarus.freepascal.org/BGRABitmap_tutorial_12
最基本的文本输出:
unit Unit1;{$mode objfpc}{$H+}interfaceuses Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, BGRABitmap, BGRABitmapTypes;type { TForm1 } TForm1 = class(TForm) procedure FormPaint(Sender: TObject); private { private declarations } public { public declarations } end;var Form1: TForm1;implementation{$R *.lfm}{ TForm1 }procedure TForm1.FormPaint(Sender: TObject);var image: TBGRABitmap; c: TBGRAPixel;begin image := TBGRABitmap.Create(ClientWidth,ClientHeight, ColorToBGRA(ColorToRGB(clBtnFace)) ); c := ColorToBGRA(ColorToRGB(clBtnText)); //retrieve default text color image.FontHeight := 30; image.FontAntialias := true; image.FontStyle := [fsBold]; image.TextOut(ClientWidth-95,75,'您好,中国!',c, taRightJustify); image.SetPixel(5,5,c); image.Draw(Canvas,0,0,True); image.free;end;end.
0 0
- BGRABitmap图像操作12:文本操作功能
- BGRABitmap图像操作12:文本输出角度
- BGRABitmap图像操作12:文本自动换行
- BGRABitmap图像操作12:渐变文本颜色
- BGRABitmap图像操作12:文本输出带阴影
- BGRABitmap图像操作12:四行不同效果文本输出
- BGRABitmap图像操作14:BGRABitmap的 Canvas2D
- BGRABitmap图像操作8:纹理
- BGRABitmap图像操作4:直接操作像素
- BGRABitmap图像操作5:擦除部分图像
- BGRABitmap图像操作13:BGRABitmap的坐标系统
- BGRABitmap图像操作12:另一种酷炫阴影
- BGRABitmap图像操作5:使用层、遮罩
- BGRABitmap图像操作6:平的线头
- BGRABitmap图像操作7:贝塞尔曲线
- BGRABitmap图像操作8:彩色纹理
- BGRABitmap图像操作8:彩色纹理,阈值
- BGRABitmap图像操作8:大理石纹理
- hdu5207Greatest Greatest Common Divisor+枚举
- 大数据系列修炼-Scala课程38
- css 中display的inherit
- 第4周项目6--多项式求和
- 前端基础之CSS(1)
- BGRABitmap图像操作12:文本操作功能
- VMware虚拟机安装CentOS 6.8 (图解)
- 应用系统之间数据传递的几种方式
- POJ_1182_食物链
- Java线程相关的常用方法
- 为何我看好电商直播
- HDU 5294 Tricks Device(最短路最小割)
- 整体框架
- 第四周--建立单链表