上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 215 下一页
摘要: uses Direct2D, D2D1;const penWidth = 25;var iGeometry: ID2D1EllipseGeometry;procedure TForm1.FormCreate(Sender: TObject);begin D2DFactory.CreateEllipseGeometry(D2D1Ellipse(D2D1PointF(120, 90), 80, 50), iGeometry);end;procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); 阅读全文
posted @ 2011-04-08 11:15 万一 阅读(2013) 评论(0) 推荐(0) 编辑
摘要: {相关常量}//D2D1_GEOMETRY_RELATION = type Integer;D2D1_GEOMETRY_RELATION_UNKNOWN = 0; //未知D2D1_GEOMETRY_RELATION_DISJOINT = 1; //不相交D2D1_GEOMETRY_RELATION_IS_CONTAINED = 2; //属于D2D1_GEOMETRY_RELATION_CONTAINS = 3; //包含D2D1_GEOMETRY_RELATION_OVERLAP = 4; //重叠测试代码:uses Direct2D, D2D1;procedure TForm1.Form 阅读全文
posted @ 2011-04-07 22:32 万一 阅读(1611) 评论(0) 推荐(0) 编辑
摘要: uses Direct2D, D2D1;procedure TForm1.FormPaint(Sender: TObject);var cvs: TDirect2DCanvas; iEllipseGeometry: ID2D1EllipseGeometry; iPathGeometry: ID2D1PathGeometry; iGeometrySink: ID2D1GeometrySink; ptCenter: TPoint;begin ptCenter := Point(ClientWidth div 2, ClientHeight div 2); D2DFactory.CreateElli 阅读全文
posted @ 2011-04-07 17:32 万一 阅读(2099) 评论(1) 推荐(0) 编辑
摘要: uses Direct2D, D2D1;procedure TForm1.FormPaint(Sender: TObject);var cvs: TDirect2DCanvas; iEllipseGeometry: ID2D1EllipseGeometry; area,length: Single; rPointF1,rPointF2: TD2DPoint2f; ptCenter: TPoint;begin ptCenter := Point(ClientWidth div 2, ClientHeight div 2); D2DFactory.CreateEllipseGeometry(D2D 阅读全文
posted @ 2011-04-07 17:08 万一 阅读(1753) 评论(0) 推荐(0) 编辑
摘要: uses Direct2D, D2D1;procedure TForm1.FormPaint(Sender: TObject);var cvs: TDirect2DCanvas; iEllipseGeometry: ID2D1EllipseGeometry; iTransformedGeometrys: array[0..7] of ID2D1TransformedGeometry; iGeometryGroup: ID2D1GeometryGroup; iGeometrySink: ID2D1GeometrySink; iPathGeometry: ID2D1PathGeometry; pt 阅读全文
posted @ 2011-04-07 15:16 万一 阅读(1989) 评论(0) 推荐(0) 编辑
摘要: {相关方法}ID2D1Geometry.GetBounds(); //获取边界矩形ID2D1Geometry.GetWidenedBounds(); //获取包含画笔区域的边界矩形测试代码:uses Direct2D, D2D1;procedure TForm1.FormPaint(Sender: TObject);var cvs: TDirect2DCanvas; iGeometry: ID2D1EllipseGeometry; R1,R2: TD2DRectF; iBrush: ID2D1SolidColorBrush;begin {几何图形} D2DFactory.CreateEllip 阅读全文
posted @ 2011-04-07 12:24 万一 阅读(1757) 评论(0) 推荐(0) 编辑
摘要: uses Direct2D, D2D1;procedure TForm1.FormPaint(Sender: TObject);var cvs: TDirect2DCanvas; iGeometry: ID2D1Geometry; iPathGeometry: ID2D1PathGeometry; iGeometrySink: ID2D1GeometrySink;begin {建立一个几何对象 iGeometry} D2DFactory.CreateEllipseGeometry( D2D1Ellipse(D2D1PointF(ClientWidth/2, ClientHeight/2), C 阅读全文
posted @ 2011-04-07 11:34 万一 阅读(1650) 评论(0) 推荐(0) 编辑
摘要: 合并通过 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 万一 阅读(1844) 评论(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) 编辑
上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 215 下一页