摘要:
{相关常量}//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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
{相关方法}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 阅读全文
摘要:
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 阅读全文