以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 SVG/GML/VRML/X3D/XAML 』  (http://bbs.xml.org.cn/list.asp?boardid=21)
----  [转帖]Adobe SVG via COM/ActiveX - Part 2  (http://bbs.xml.org.cn/dispbbs.asp?boardid=21&rootid=&id=14888)


--  作者:SCYANGYU
--  发布时间:2/28/2005 2:44:00 PM

--  [转帖]Adobe SVG via COM/ActiveX - Part 2
I made a fair amount of progress using SWT to embed the Adobe SVG ActiveX control. I have been working to provide a set of classes that implement the W3C SVG/DOM interfaces in java. When this is complete, the Batik SVG viewer and Adobe one could be used interchangeably in Java.

SWT provides a set of classes for dealing with COM. They are not as comprehensive as some of the libraries that are available specifically for this purpose, but so far they do the job. The most complicated part is dealing with event callbacks. Here is the SWT example that helped me get started.

Adobe does not support or document its COM interface (see here) when accessed directly, but it is not too difficult to access it since all of the methods match the SVG DOM, and IDispatch is used for all classes.

So far I have been able to use my W3C java classes to manipulate the DOM, and receive events. When it is further along I'll post the source. I have almost all of the DOM, and SVG DOM classes wrapped.

For an example of manipulating the SVG DOM and respoding to events in java, See here. The creation of an SVG viewer will vary from implementation to implementation, but the code that uses the W3C SVG DOM should be useable with Adobe (when I finish).


http://www.jroller.com/page/kenlars99/20040113


W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
62.500ms