BGRABitmap图像操作12:文本操作功能
2016-09-20 21:16
435 查看
http://wiki.lazarus.freepascal.org/BGRABitmap_tutorial_12
最基本的文本输出:
最基本的文本输出:
unit Unit1; {$mode objfpc}{$H+} interface uses 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.
相关文章推荐
- BGRABitmap图像操作12:文本输出角度
- BGRABitmap图像操作12:四行不同效果文本输出
- BGRABitmap图像操作12:文本自动换行
- BGRABitmap图像操作12:渐变文本颜色
- BGRABitmap图像操作12:文本输出带阴影
- BGRABitmap图像操作8:纹理
- BGRABitmap图像操作3:用鼠标在窗体画连续的曲线
- 设置secureCRT的鼠标右键为弹出文本操作菜单功能
- 如何设置secureCRT的鼠标右键为弹出文本操作菜单功能
- BGRABitmap图像操作7:开放的样条曲线(spline)
- BGRABitmap图像操作4:直接操作像素,使用HSLA colorspace
- BGRABitmap图像操作4:直接操作像素,颜色校正
- 对图像进行随意指定区域切图,还有其它一些图像操作的功能,并不断完善中
- BGRABitmap图像操作6:改变笔型,创建点线
- BGRABitmap图像操作6:平的线头
- BGRABitmap图像操作5:擦除部分图像
- Android学习笔记12——内存卡操作及文件下载功能的实现
- Android学习笔记12——内存卡操作及文件下载功能的实现
- notepad++ 文本替换功能,解决excel批量修改数据库的数据操作
- BGRABitmap图像操作6:使用不同的线型与形状