SkipLinesViewFactory.java 文件源码

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

项目:incubator-netbeans 作者:
@Override
public void paint(Graphics2D g, Shape alloc, Rectangle clipBounds) {
    Rectangle2D.Double allocBounds = ViewUtils.shape2Bounds(alloc);
    TextLayout textLayout = getTextLayout();
    if (textLayout != null) {
        g.setColor(component.getForeground());
        EditorView.Parent parent = (EditorView.Parent) getParent();
        float ascent = parent.getViewRenderContext().getDefaultAscent();
        float x = (float) allocBounds.getX();
        float y = (float) allocBounds.getY();
        textLayout.draw(g, x, y + ascent);
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号