org.apache.pdfbox.util.Matrix.setValue()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(129)

本文整理了Java中org.apache.pdfbox.util.Matrix.setValue()方法的一些代码示例,展示了Matrix.setValue()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Matrix.setValue()方法的具体详情如下:
包路径:org.apache.pdfbox.util.Matrix
类名称:Matrix
方法名:setValue

Matrix.setValue介绍

[英]This will set a value at a position.
[中]这将在某个位置设置一个值。

代码示例

代码示例来源:origin: net.sf.cssbox/pdf2dom

/**
 * Transforms a length according to the current transformation matrix.
 */
protected float transformLength(float w)
{
  Matrix ctm = getGraphicsState().getCurrentTransformationMatrix();
  Matrix m = new Matrix();
  m.setValue(2, 0, w);
  return m.multiply(ctm).getTranslateX();
}

代码示例来源:origin: stackoverflow.com

textPos.setValue(2, 0, 0);
textPos.setValue(2, 1, 0);
textPos.setValue(0, 1, (-1)*textPos.getValue(0, 1));
textPos.setValue(1, 0, (-1)*textPos.getValue(1, 0));
AffineTransform at = textPos.createAffineTransform();
PDMatrix fontMatrix = font.getFontMatrix();

代码示例来源:origin: tamirhassan/pdfxtk

initialMatrix.setValue(0,0,1);
initialMatrix.setValue(0,1,0);
initialMatrix.setValue(0,2,0);
initialMatrix.setValue(1,0,0);
initialMatrix.setValue(1,1,1);
initialMatrix.setValue(1,2,0);
initialMatrix.setValue(2,0,0);
initialMatrix.setValue(2,1,rise);
initialMatrix.setValue(2,2,1);
if( pageRotation == 0 )
  trm.setValue( 2,1, -y + page.findMediaBox().getHeight() );
  trm.setValue( 2,0, y );
 trm.setValue( 2,1, x ); //2013-03-12 fixed shifted coordinates in e.g. eu-014.pdf (table datset)
  trm.setValue( 2,0, -y  + page.findMediaBox().getHeight() );
  trm.setValue( 2,1, x );
  td.setValue( 2, 0, tx );
  td.setValue( 2, 1, ty );
  td2.setValue( 2, 0, tx2 );
  td2.setValue( 2, 1, ty );

代码示例来源:origin: tamirhassan/pdfxtk

adjustment=(-adjustment/1000)*context.getGraphicsState().getTextState().getFontSize() *
  (context.getGraphicsState().getTextState().getHorizontalScalingPercent()/100);
adjMatrix.setValue( 2, 0, adjustment );
context.setTextMatrix( adjMatrix.multiply( context.getTextMatrix() ) );

代码示例来源:origin: tamirhassan/pdfxtk

translationParams.setValue(2,1, -translationParams.getValue( 2,1 ));
translationMatrix = Matrix.getTranslatingInstance(0, (float)pageSize.getHeight()-height*scalingParams.getYScale() );
translationParams = translationParams.multiply( translationMatrix );

代码示例来源:origin: asciidoctor/asciidoctorj

angle = (-1)*angle;
ctmNew.setValue(2, 1, (float)(pageHeight - ctmNew.getYPosition() - Math.cos(angle)*yScaling));
ctmNew.setValue(2, 0, (float)(ctmNew.getXPosition() - Math.sin(angle)*yScaling));
ctmNew.setValue(0, 1, (-1)*ctmNew.getValue(0, 1));
ctmNew.setValue(1, 0, (-1)*ctmNew.getValue(1, 0));

相关文章