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

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

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

Matrix.getShearY介绍

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

代码示例

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

@Override
  protected void processTextPosition(TextPosition text)
  {
    Matrix m = text.getTextMatrix();
    m.concatenate(text.getFont().getFontMatrix());
    int angle = (int) Math.round(Math.toDegrees(Math.atan2(m.getShearY(), m.getScaleY())));
    angle = (angle + 360) % 360;
    angles.add(angle);
  }
}

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

@Override
  protected void processTextPosition(TextPosition text) {
    Matrix m = text.getTextMatrix();
    m.concatenate(text.getFont().getFontMatrix());
    int angle = (int) Math.round(Math.toDegrees(Math.atan2(m.getShearY(), m.getScaleY())));
    angle = (angle + 360) % 360;
    angles.add(angle);
  }
}

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

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

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

@Override
  protected void processTextPosition(TextPosition text)
  {
    Matrix m = text.getTextMatrix();
    m.concatenate(text.getFont().getFontMatrix());
    int angle = (int) Math.round(Math.toDegrees(Math.atan2(m.getShearY(), m.getScaleY())));
    if (angle == 0)
    {
      super.processTextPosition(text);
    }
  }
}

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

@Override
  protected void processTextPosition(TextPosition text) {
    Matrix m = text.getTextMatrix();
    m.concatenate(text.getFont().getFontMatrix());
    int angle = (int) Math.round(Math.toDegrees(Math.atan2(m.getShearY(), m.getScaleY())));
    if (angle == 0) {
      super.processTextPosition(text);
    }
  }
}

代码示例来源: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: org.apache.pdfbox/pdfbox-tools

@Override
  protected void processTextPosition(TextPosition text)
  {
    Matrix m = text.getTextMatrix();
    int angle = (int) Math.round(Math.toDegrees(Math.atan2(m.getShearY(), m.getScaleY())));
    angle = (angle + 360) % 360;
    angles.add(angle);
  }
}

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

@Override
  protected void processTextPosition(TextPosition text)
  {
    Matrix m = text.getTextMatrix();
    int angle = (int) Math.round(Math.toDegrees(Math.atan2(m.getShearY(), m.getScaleY())));
    if (angle == 0)
    {
      super.processTextPosition(text);
    }
  }
}

代码示例来源:origin: org.apache.tika/tika-parsers

@Override
  protected void processTextPosition(TextPosition text) {
    Matrix m = text.getTextMatrix();
    m.concatenate(text.getFont().getFontMatrix());
    int angle = (int) Math.round(Math.toDegrees(Math.atan2(m.getShearY(), m.getScaleY())));
    angle = (angle + 360) % 360;
    angles.add(angle);
  }
}

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

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

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

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

代码示例来源:origin: org.apache.tika/tika-parsers

@Override
  protected void processTextPosition(TextPosition text) {
    Matrix m = text.getTextMatrix();
    m.concatenate(text.getFont().getFontMatrix());
    int angle = (int) Math.round(Math.toDegrees(Math.atan2(m.getShearY(), m.getScaleY())));
    if (angle == 0) {
      super.processTextPosition(text);
    }
  }
}

代码示例来源: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);
  }
}

相关文章