SWTGraphics2D.java 文件源码

java
阅读 30 收藏 0 点赞 0 评论 0

项目:PhET 作者:
/** {@inheritDoc} */
public Font getFont() {
    if (curFont != null) {
        int style = Font.PLAIN;

        final FontData[] fd = curFont.getFontData();
        if (fd.length > 0) {
            if ((fd[0].getStyle() & SWT.BOLD) != 0) {
                style = style | Font.BOLD;
            }
            if ((fd[0].getStyle() & SWT.ITALIC) != 0) {
                style = style | SWT.ITALIC;
            }

            return new Font(fd[0].getName(), style, fd[0].getHeight());
        }
        return null;
    }
    else {
        return null;
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号