![](/img/trans.png)
[英]How to calculate coordinate X meters away from a point but towards another in C#
[英]how to access to the X coordinate only in C#?
下面的代碼給了我這樣的輸出 {X=387.929, Y=555.55} 任何人都建議 mt 如何僅訪問 C# 中的 X 坐標
PdfTextFind[] results = null;
foreach (PdfPageBase page in doc.Pages)
{
results = page.FindText("Earnest").Finds;
foreach (PdfTextFind text in results)
{
PointF p = text.Position;
Console.WriteLine(p);
}
}`
PointF 是一個包含兩個浮點數的簡單結構:X 和 Y。(以及一些方法、運算符等)所以只需調用
Console.WriteLine(p.X);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.