摘要: 合并通过 ID2D1Geometry.CombineWithGeometry() 完成,但返回的是 ID2D1SimplifiedGeometrySink(ID2D1GeometrySink 的父对象);需要把 ID2D1SimplifiedGeometrySink 添加到 ID2D1PathGeometry 才能使用。uses Direct2D, D2D1;procedure TForm1.FormPaint(Sender: TObject);var cvs: TDirect2DCanvas; iEllipseGeometry1, iEllipseGeometry2: ID2D1Ellips 阅读全文
posted @ 2011-04-06 20:39 万一 阅读(1843) 评论(0) 推荐(0) 编辑
摘要: uses Direct2D, D2D1;procedure TForm1.FormPaint(Sender: TObject);var cvs: TDirect2DCanvas; iGeometryGroup: ID2D1GeometryGroup; arrGeometry: array[0..3] of ID2D1EllipseGeometry; ptCenter: TD2D1Point2F; i: Integer; rh,rv: Single; iFactory: ID2D1Factory;begin ptCenter := D2D1PointF(ClientWidth/2, Client 阅读全文
posted @ 2011-04-06 16:02 万一 阅读(1680) 评论(0) 推荐(0) 编辑
摘要: 复合几何对象包括 ID2D1GeometryGroup 和 ID2D1TransformedGeometry,它们都继承自 ID2D1Geometry。ID2D1TransformedGeometry 只是包含了 2D 变换的 ID2D1Geometry。uses Direct2D, D2D1;procedure TForm1.FormPaint(Sender: TObject);var cvs: TDirect2DCanvas; iTransformedGeometry: ID2D1TransformedGeometry; iRectangleGeometry: ID2D1Rectangle 阅读全文
posted @ 2011-04-06 15:03 万一 阅读(1485) 评论(0) 推荐(0) 编辑
摘要: unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs;type TForm1 = class(TForm) procedure FormPaint(Sender: TObject); end;var Form1: TForm1;implementation{$R *.dfm}uses Direct2D, D2D1;{左边小山的路径}function GetLeftMountainGeometry: ID2D1PathGeometry; 阅读全文
posted @ 2011-04-06 12:42 万一 阅读(2084) 评论(0) 推荐(0) 编辑