加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Java > 正文

Java图像编辑器将输出呈现为源代码?

发布时间:2020-12-15 02:52:10 所属栏目:Java 来源:网络整理
导读:亚历克斯解释了我所寻找的比我更好的东西: You want an existing program that allows you to draw a picture,captures what you do as you draw,and writes each action as a Java command. When you click the “Drawl Oval” tool and click at 0,0 and
亚历克斯解释了我所寻找的比我更好的东西:

You want an existing program that
allows you to draw a picture,captures
what you do as you draw,and writes
each action as a Java command. When
you click the “Drawl Oval” tool and
click at 0,0 and then at 50,50,it
would generate the line
g.drawOval(0,50).

如果有人知道这样的程序,请告诉我.谢谢.

原始问题:

我最近使用java.awt.Graphics库一直在使用Java和自定义绘图,但发现手动编写需要花费太多时间.是否有任何简单的图形编辑器(如mspaint)生成源代码?

例:

画出来:

会产生:

public void update(Graphics g) {
    g.translate(0,0);
    g.drawOval(0,50);
}

谢谢.

解决方法

如果它们是向量,您可以使用SVG编辑器(例如,Inkscape)和 Kirill’s SVG to Java2D Transcoder来简化此操作.这并不完美,但Kirill在响应增强请求方面非常敏感.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读