Java – SVG / vector graphics object Boolean operation (Union, intersection, subtraction)

I have two-dimensional closed vector paths, which are specified in SVG paths like syntax, that is, these paths include straight lines and various Bezier curves What is there like a small, beautiful & discrete Library (preferably in C, Java or ruby, but if the library is clean and easy to use, you can use any language) that allows these paths to perform Boolean operations such as union, intersection and subtraction?

So far, my findings include:

>Huge and expensive commercial vector graphics products (such as Autodesk AutoCAD or Adobe Illustrator) can be called by Boolean two-dimensional path operation using some API or script, which is obviously my purpose. > The internal lib2geom library developed by Inkscape lacks documentation and binding, and has some compilation problems. It seems to be used for any project other than Inkscape itself, which seems quite complex. > CGAL is a huge and quite complex computational geometry library. It can work in very strange object space (that is, you have fuzzy mixed modes and imperative style functions to operate these templated data structures). It does not seem that there are fixed bindings of other languages next to C The python binding to CGAL seems to have been abandoned and doesn't look very friendly to me. > JTS seems to be GIS centric and only deals with straight lines, while I need to deal with Bezier curves like SVG

So, the question is, are there other small, good & easy library floats to handle Boolean operations on SVG like paths?

Solution

Maybe I missed something, but Java awt. Are the classes in the geom package appropriate for your needs? They deal with two-dimensional shapes; The area class deals specifically with Boolean operations:

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>