Skip to main content
 首页 » 编程设计

c#之如何获取 iTextSharp.text.pdf.parser.Vector 对象的 x、y、z 值

2024年02月13日13Leo_wl

如何获取 iTextSharp.text.pdf.parser.Vector 对象的 x、y、z 值? 这些是非公共(public)成员。

请您参考如下方法:

根据消息来源,是的,你可以。

/** 
 * Gets the value from a coordinate of the vector 
 * @param index the index of the value to get (I1, I2 or I3) 
 * @return a coordinate value 
 */ 
public float this[int index] { 
    get { 
        return vals[index]; 
    } 
} 

您可以通过索引访问它们:

var x = v[0]; 
var y = v[1]; 
var z = v[2];