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

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

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

Matrix.getScaleX介绍

[英]Returns the x-scaling element of this matrix.
[中]返回此矩阵的x缩放元素。

代码示例

代码示例来源:origin: apache/pdfbox

float b = textMatrix.getShearY();
float c = textMatrix.getShearX();
float d = textMatrix.getScaleX();

代码示例来源:origin: apache/pdfbox

/**
   * Transforms a width using the CTM.
   */
  protected float transformWidth(float width)
  {
    Matrix ctm = getGraphicsState().getCurrentTransformationMatrix();
    float x = ctm.getScaleX() + ctm.getShearX();
    float y = ctm.getScaleY() + ctm.getShearY();
    return width * (float)Math.sqrt((x * x + y * y) * 0.5);
  }
}

代码示例来源:origin: apache/pdfbox

float xScalingFactor = FONTSCALE * font.getFontMatrix().getScaleX();
float width = font.getStringWidth(value) * font.getFontMatrix().getScaleX();
float widthBasedFontSize = contentRect.getWidth() / width * xScalingFactor;

代码示例来源:origin: apache/pdfbox

if (font instanceof PDType3Font)
  glyphSpaceToTextSpaceFactor = font.getFontMatrix().getScaleX();

代码示例来源:origin: org.apache.pdfbox/pdfbox

float b = textMatrix.getShearY();
float c = textMatrix.getShearX();
float d = textMatrix.getScaleX();

代码示例来源:origin: com.github.lafa.pdfbox/pdfbox

float b = textMatrix.getShearY();
float c = textMatrix.getShearX();
float d = textMatrix.getScaleX();

代码示例来源:origin: com.github.lafa.pdfbox/pdfbox

/**
   * Transforms a width using the CTM.
   */
  protected float transformWidth(float width)
  {
    Matrix ctm = getGraphicsState().getCurrentTransformationMatrix();
    float x = ctm.getScaleX() + ctm.getShearX();
    float y = ctm.getScaleY() + ctm.getShearY();
    return width * (float)Math.sqrt((x * x + y * y) * 0.5);
  }
}

代码示例来源:origin: org.apache.pdfbox/pdfbox

/**
   * Transforms a width using the CTM.
   * 
   * @param width the width value to be transformed.
   * 
   * @return the transformed width value.
   */
  protected float transformWidth(float width)
  {
    Matrix ctm = getGraphicsState().getCurrentTransformationMatrix();
    float x = ctm.getScaleX() + ctm.getShearX();
    float y = ctm.getScaleY() + ctm.getShearY();
    return width * (float)Math.sqrt((x * x + y * y) * 0.5);
  }
}

代码示例来源:origin: org.apache.pdfbox/pdfbox

float xScalingFactor = FONTSCALE * font.getFontMatrix().getScaleX();
float width = font.getStringWidth(value) * font.getFontMatrix().getScaleX();
float widthBasedFontSize = contentRect.getWidth() / width * xScalingFactor;

代码示例来源:origin: com.github.lafa.pdfbox/pdfbox

float xScalingFactor = FONTSCALE * font.getFontMatrix().getScaleX();
float width = font.getStringWidth(value) * font.getFontMatrix().getScaleX();
float widthBasedFontSize = contentRect.getWidth() / width * xScalingFactor;

代码示例来源:origin: de.tudarmstadt.ukp.inception.pdfextract/pdfextract

float glyphSpaceToTextSpaceFactor = 0.001F;
if (font instanceof PDType3Font) {
  glyphSpaceToTextSpaceFactor = font.getFontMatrix().getScaleX();

代码示例来源:origin: org.apache.pdfbox/pdfbox

if (font instanceof PDType3Font)
  glyphSpaceToTextSpaceFactor = font.getFontMatrix().getScaleX();

代码示例来源:origin: com.github.lafa.pdfbox/pdfbox

if (font instanceof PDType3Font)
  glyphSpaceToTextSpaceFactor = font.getFontMatrix().getScaleX();

代码示例来源:origin: de.tudarmstadt.ukp.dkpro.core/de.tudarmstadt.ukp.dkpro.core.io.pdf-asl

if (font instanceof PDType3Font)
  glyphSpaceToTextSpaceFactor = font.getFontMatrix().getScaleX();

相关文章