论坛


2011年3月31日 星期四

Direct2D (3) : 使用浮点参数绘制基本图形

万一| 万一的 Delphi 博客 |14:01:00

{相关方法} TDirect2DCanvas.DrawEllipse(); TDirect2DCanvas.DrawLine(); TDirect2DCanvas.DrawRectangle(); TDirect2DCanvas.DrawRoundedRectangle(); TDirect2DCanvas.FillEllipse(); TDirect2DCanvas.FillRectangle(); TDirect2DCanvas.FillRoundedRectangle(); ...

2011年3月30日 星期三

Direct2D (2) : 基本图形命令测试

万一| 万一的 Delphi 博客 |23:42:00

代码:unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, ComCtrls, TypInfo, Direct2D; type TForm1 = class(TForm) ListBox1: TListBox; Panel1: TPanel; ...

Direct2D (1) : 第一个例子

万一| 万一的 Delphi 博客 |11:59:00

应该是 Delphi 2009 就支持 Direct2D 了,但那时我还用着 WinXP 系统(不支持);现在的测试环境是 Win7+DelphiXE。Direct2D 属 DirectX 家族,是 GDI、GDI+ 的继任者,支持硬件加速,并能与 GDI、GDI+、D3D 交互。其它初步的印象是其文本处理和图像处理分别使用了 Dir...

useful lotion

Embarcadero| CodeCentral Delphi Submissions |03:24:23

A small set of useful widgets. 1. Window showing the progress of a lengthy operation. Operates in its own thread and normally redrawn when the main thread is busy. 2. Component of the splash form. Made on the basis of the above components. 3. Tran...

Last chance to register - Join Delphi expert Bruno Fierens to learn how to create IDE extensions using the Delphi Open Tools API

Embarcadero| EDN Delphi Feed |01:23:43

2011年3月29日 星期二

枚举可以这样遍历

万一| 万一的 Delphi 博客 |16:39:00

uses TypInfo; {以 TAlign 为例} procedure TForm1.Button1Click(Sender: TObject); var enum: TAlign; i: Integer; str: string; begin Memo1.Clear; for enum := Low(TAlign) to High(TAlign) do begin i := ord(enum); //Integer(enum) str ...

Delphi Labs: DataSnap - Passing "Plain Old Delphi Objects" Parameters

Pawel Glowacki| Pawel Glowacki |16:08:25

One of the cool new features in introduced in Delphi XE is a possibility to use TObject-descendant as parameter types in DataSnap server methods. I was planning to cover different possible parameter types that you can use in DataSnap applications,...

官方的正则表达式组件 RegularExpressions (5) : 强测试

万一| 万一的 Delphi 博客 |13:27:00

unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Memo1: TMemo; Button1: TButton; procedure Button1Click(Sender: TObject); end...

官方的正则表达式组件 RegularExpressions (4) : 表达式选项

万一| 万一的 Delphi 博客 |10:05:00

TRegExOption = ( roNone, //无 roIgnoreCase, //不区分大小写 roMultiLine, //多行模式; 可使 ^ 和 $ 匹配每个行首或行尾 roExplicitCapture, //只捕获指定了名称或编号的子表达式 roCompiled, //预编译表达式; ?..

Delphi Labs: DataSnap XE - "Plain Old Delphi Object" Params

Embarcadero| CodeCentral Delphi Submissions |08:20:53

"Delphi Labs" DataSnap client and server projects demonstrating returning TObject-descendant from a server method. In other words passing "Plain Old Delphi Objects" or PODOs.This is the source code that comes wi...

Delphi Developer Days in Houston and DC/Baltimore plus free evening seminars

Embarcadero| EDN Delphi Feed |03:56:13

Delphi Labs: DataSnap XE - "Plain Old Delphi Object" Parameters

Embarcadero| EDN Delphi Feed |01:58:31

2011年3月28日 星期一

官方的正则表达式组件 RegularExpressions (3) : TMatchEvaluator

万一| 万一的 Delphi 博客 |22:36:00

unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, RegularExpressions; type TForm1 = class(TForm) Memo1: TMemo; Button1: TButton; procedure Button1Click(Sen...

官方的正则表达式组件 RegularExpressions (2) : 子表达式

万一| 万一的 Delphi 博客 |21:42:00

uses RegularExpressions; const pattern = '([A-Z]+)(\d+)'; //其三个子表达式分别是:[A-Z]+\d+ [A-Z]+ \d+ txt = 'AAA1 BBB2 AA11 BB22 A111 B222 AAAA'; //测试用的目标文本 procedure TForm1.Button1Click(Sender: TObject); var match: TMatch; gr...

官方的正则表达式组件 RegularExpressions (1)

万一| 万一的 Delphi 博客 |20:55:00

刚刚试了一下 DelphiXE 新增的正则表达式组件, 它基于 C 语言实现 PCRE 库实现, 感觉设计的非常好。其主要的 TRegEx 被设计为一个结构(而不是类), 可能是基于效率的考虑;不过它主要调用了 TPerlRegEx 类的功能。TRegEx 的五个主要方法 IsMatch()、Match()、Matches(...

« 上一页

下一页 »