如何获取iTextSharp.text.pdf.parser.Vector对象的x,y,z值?

时间:2013-11-19 14:24:20

标签: c# class itextsharp

如何获取iTextSharp.text.pdf.parser.Vector对象的x,y,z值? 这些是非公开成员。

enter image description here

2 个答案:

答案 0 :(得分:2)

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

/**
 * 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];

答案 1 :(得分:2)

Vector包含indexer

public float this[int index] {
    get {
        return vals[index];
    }
}

因此,您可以通过v[n]访问它们。

相关问题