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

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

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

Matrix.getShearX介绍

[英]Returns the x-shear element of this matrix.
[中]返回此矩阵的x剪切元素。

代码示例

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

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: com.github.lafa.pdfbox/pdfbox

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

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

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);
  }
}

相关文章