本文整理了Java中org.apache.pdfbox.util.Matrix.transform()
方法的一些代码示例,展示了Matrix.transform()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Matrix.transform()
方法的具体详情如下:
包路径:org.apache.pdfbox.util.Matrix
类名称:Matrix
方法名:transform
[英]Transforms the given point by this matrix.
[中]通过这个矩阵变换给定的点。
代码示例来源:origin: apache/pdfbox
@Override
public Vector getDisplacement(int code) throws IOException
{
return getFontMatrix().transform(new Vector(getWidth(code), 0));
}
代码示例来源:origin: stackoverflow.com
// reads the dense matrix from the CSV file
Matrix a = new Basic2DMatrix(Mattrices.asSymbolSeparatedSource("matrix.csv", ","));
// calculates the sum of all elements of the matrix 'a'
double sum = a.fold(Matrices.asSumAccumulator(0));
// creates a new matrix 'b', that contains elements of matrix 'a' multiplied by '2'.
Matrix b = a.transform(Matrices.asMulFunction(2));
代码示例来源:origin: org.apache.pdfbox/pdfbox
@Override
public Vector getDisplacement(int code) throws IOException
{
return getFontMatrix().transform(new Vector(getWidth(code), 0));
}
代码示例来源:origin: com.github.lafa.pdfbox/pdfbox
@Override
public Vector getDisplacement(int code) throws IOException
{
return getFontMatrix().transform(new Vector(getWidth(code), 0));
}
代码示例来源:origin: stackoverflow.com
public static void funWithMatrices(Matrix aux) {
int rows = aux.rows();
int columns = aux.columns();
// do what you want with matrix
// for example multyply each cell by 2 if it's symmetric matrix
if (aux.is(Matrices.SYMMETRIC_MATRIX)) {
Matrix aux2 = aux.transform(Matrices.asMulFunction(2.0));
}
}
// a caller
funWithMatrices(new Basic2DMatrix(new double[][]{
{ 1.0, 2.0 },
{ 3.0, 4.0 }
}));
内容来源于网络,如有侵权,请联系作者删除!