@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); } }
@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); } }
float a = textMatrix.getScaleY(); float b = textMatrix.getShearY(); float c = textMatrix.getShearX();
@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); } } }
@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); } } }
/** * 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); } }
float yScalingFactor = FONTSCALE * font.getFontMatrix().getScaleY(); float xScalingFactor = FONTSCALE * font.getFontMatrix().getScaleX(); -font.getFontDescriptor().getDescent()) * font.getFontMatrix().getScaleY(); if (height <= 0) height = font.getBoundingBox().getHeight() * font.getFontMatrix().getScaleY();
@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); } }
@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); } } }
@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); } }
float a = textMatrix.getScaleY(); float b = textMatrix.getShearY(); float c = textMatrix.getShearX();
float a = textMatrix.getScaleY(); float b = textMatrix.getShearY(); float c = textMatrix.getShearX();
@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); } } }
/** * 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); } }
/** * 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); } }
float yScalingFactor = FONTSCALE * font.getFontMatrix().getScaleY(); float xScalingFactor = FONTSCALE * font.getFontMatrix().getScaleX(); -font.getFontDescriptor().getDescent()) * font.getFontMatrix().getScaleY(); if (height <= 0) height = font.getBoundingBox().getHeight() * font.getFontMatrix().getScaleY();
float yScalingFactor = FONTSCALE * font.getFontMatrix().getScaleY(); float xScalingFactor = FONTSCALE * font.getFontMatrix().getScaleX(); -font.getFontDescriptor().getDescent()) * font.getFontMatrix().getScaleY(); if (height <= 0) height = font.getBoundingBox().getHeight() * font.getFontMatrix().getScaleY();