2011年4月1日 星期五
Direct2D (6) : 绘制质量
万一| 万一的 Delphi 博客 |00:02:00
{相关方法} TDirect2DCanvas.RenderTarget.SetAntialiasMode(); TDirect2DCanvas.RenderTarget.GetAntialiasMode; {相关常量} D2D1_ANTIALIAS_MODE_PER_PRIMITIVE = 0; D2D1_ANTIALIAS_MODE_ALIASED = 1;测试代码:uses Direct2D, D2D1; procedure TForm1.Fo...
2011年3月31日 星期四
Direct2D (5) : 绘制自定义图形
万一| 万一的 Delphi 博客 |21:09:00
下面是通过自定义函数绘制菱形的测试代码。uses Direct2D, D2D1; {自定义的绘制菱形的函数} procedure Diamond(d2dCanvas: TDirect2DCanvas; ptLeft, ptTop: TD2DPoint2f); var path: ID2D1PathGeometry; //路径接口 sink: ID2D1GeometrySink; //给路径添加图形...
Direct2D (4) : DrawGeometry() 与 FillGeometry()
万一| 万一的 Delphi 博客 |17:42:00
原始的 Direct2D 只提供了几种简单图形(直线、矩形、圆角矩形、椭圆)的绘制与填充,更多集合图形或路径的描绘要使用 DrawGeometry() 和 FillGeometry()。既然能绘制更复杂的图形,当然也能绘制基本图形,先试下使用 DrawGeometry()、FillGeometry() 实现矩形、圆角矩...
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





冀公网安备 13098202000212号