浏览代码

Fix the problem that getHeight() is smaller than the actual value

`+ getLeading()` was removed in this commit: 5a18307eb0 (diff-4cd687c3da36fff3b21d074a27f7bac176c2845b43d37eca3af37fb920baf32cL73)
I can't find a reason for the removal.
Due to the lack of leading height, the height obtained by this method is much smaller than the actual height (Test with Chinese characters).
pull/505/head
magnww 9 个月前
父节点
当前提交
97ae4e6071
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      poi/src/main/java/org/apache/poi/sl/draw/DrawTextFragment.java

+ 1
- 1
poi/src/main/java/org/apache/poi/sl/draw/DrawTextFragment.java 查看文件

@@ -89,7 +89,7 @@ public class DrawTextFragment implements Drawable {
* @return full height of this text run which is sum of ascent, descent and leading
*/
public float getHeight(){
double h = layout.getAscent() + layout.getDescent();
double h = layout.getAscent() + layout.getDescent() + getLeading();
return (float)h;
}


正在加载...
取消
保存