偏移 This example should guide you on how to adjust coordinates in the PointF or Point class using the Offset() method. This method is available in both the Point and PointF classes, and it is mainly used to programmatically move or adjust the coordinates of a certain point. The Offset() method modifies the current x and y coordinates of a point without returning a new Point object. To use the Offset() method, simply call it with two integer values as arguments on a Point or PointF object. The first argument will offset the Point's x coordinate, while the second argument will offset the Point's y-coordinate. This method also accepts negative values as arguments. Instantiating a PointF object: The PointF class is used to represent points with floating-point numbers for x and y coordinates. In this example, the point is initialized at (10.5, 20.5). Calling the Offset() method: The method adjusts the coordinates of the PointF object by the specified offset values. Specifically, point.Offset(-5.0f, 10.0f); will move the point's x coordinate by -5.0 and its y coordinate by +10.0. Console output: The initial and new coordinates of the PointF object are printed to the console, demonstrating the effect of the Offset() method. 相關文檔連結 在 Github 上查看 相關教程 相關操作指南 類文檔 下載 IronDrawing DLL 報告此頁面上的問題 準備好開始了嗎? Nuget 下載 13,318,306 | 版本: 2025.3 剛剛發布 免費 NuGet 下載 總下載量:13,318,306 查看許可證