Is there any documented cross-platform graphics package that is recommended these days?
By cross-platform I mean all Apple platforms and Linux, potentially Windows, not just a variety of Apple sub-platforms.
By graphics package I mean a package (or a collection of packages) with the following functionality:
graphic context
bezier paths
at least some basic text
reading/writing of at least one of the common bitmap image formats
reading/writing of SVG or some other vector format
I am not looking for a UI library, I am looking for headless graphics.
I did a brief research on the Swift Package Index and what I found were packages claiming to be cross-platform, but in fact they were cross-Apple-subplatform or wrappers around existing Apple frameworks.
It might be a Swift wrapper around a C/C++ library that is included within the package, not requiring an external installation dependency, and that will be build together with the package.
Reason against an external installation dependency: I would like the installation of an open-source package+tool to be as easy as possible for the users. Preferably just download + swift build → ready to use.
SwiftGTK: a full set of auto-generated Swift bindings for gtk-3 or gtk-4 that attempts to provide a more swifty wrapper around the GTK APIs (including the underlying layers such as Glib and Cairo-graphics,
Tokamak: a cross-platform, open-source SwiftUI-compatible framework that works natively (with using GTK on Linux) as well as in the browser (using WASM),
Swift Cross UI: another SwiftUI-like framework for creating cross-platform apps in Swift, using Gtk 4 as the backend
Thanks, I might consider it when I will be building an interactive UI application.
This does not look like not what I was looking for. This is an UI library focusing on displaying the graphical output. I am looking to produce a graphical artefacts – raw image data or files to be stored/shared – without displaying them in my application ("headless").
Similar to Meta's IGL mentioned in this thread, I might consider it when I will be building an interactive UI application, which is not the case for this particular project/phase of the project.
Moreover, they all require separate installation of a third-party library, which I still would like to avoid and have just one-stop "swift build" and/or "swift run" for the package I am creating.
@Stiivi Hello there! Sorry to blow up an ancient thread but I noticed I got slotted in to be the very second (next to you) graphics swift post to ever exist , also I couldn't pass up on the opportunity to offer the following information if it can be of any use:
Is there any documented cross-platform graphics package that is recommended these days?
By graphics package I mean a package (or a collection of packages) with the following functionality:
graphics context
bezier paths [ ] at least some basic text(not yet, there's a USD proposal for this feature).
reading/writing of at least one of the common bitmap image formats. [ ] reading/writing of SVG or some other vector format(not really).
I am not looking for a UI library,
... I am looking for headless graphics
... to produce a graphical artefacts
... raw image data or files to be stored/shared
... without displaying them in my application ("headless").
If you potentially mean through rendering images, then yes, this is also supported from USD.
I did a brief research on the Swift Package Index and what I found were packages claiming to be cross-platform, but in fact they were cross-Apple-subplatform or wrappers around existing Apple frameworks.
Pixar's USD is fully cross-platform!
Any recommendations?
Shoot.
Reason against an external installation dependency: I would like the installation of an open-source package+tool to be as easy as possible for the users. Preferably just download + swift build → ready to use.
That is precisely the reason you may be interested in the following Swift Package that will swift build to your heart's content:
Disclaimer I will add that this project is in active development and not yet fully scoped out to encompass the entirety of Pixar's USD API yet, but it's getting there. If there's anything more you require for your specific use case, I will be happy to provide you with potential solutions over GitHub issues.