Package: gaphas
GaphasGaphas is the diagramming widget library for Python.Gaphas is a library that provides the user interface component (widget) for drawing diagrams. Diagrams can be drawn to screen and then easily exported to a variety of formats, including SVG and PDF. Want to build an app with chart-like diagrams? Then Gaphas is for you! Use this library to build a tree, network, flowchart, or other diagrams.This library is currently being used byGaphorfor UML drawing,RAFCONfor state-machine based robot control, andASCENDfor solving mathematical models.📑 Table of ContentsBackgroundInstallUsageContributingLicense📜 BackgroundGaphas was built to provide the foundational diagramming portions ofGaphor. Since Gaphor is built on GTK and Cairo,PyGObjectprovides access to the GUI toolkit andPyCairoto the 2D graphics library. However, there wasn't a project that abstracted these technologies to easily create a diagramming tool. Hence, Gaphas was created as a library to allow others to create a diagramming tool using GTK and Cairo.Here is how it works:Items (Canvas items) can be added to a Canvas.The Canvas maintains the tree structure (parent-child relationships between items).A constraint solver is used to maintain item constraints and inter-item constraints.The item (and user) should not be bothered with things like bounding-box calculations.Very modular--e.g., handle support could be swapped in and swapped out.Rendering using Cairo.The main portions of the library include:canvas - The main canvas class (container for Items).items - Objects placed on a Canvas.solver - A constraint solver to define the layout and connection of items.gtkview - A view to be used in GTK applications that interacts with users with tools.painters - The workers used to paint items.tools - Tools are used to handle user events (such as mouse movement and button presses).aspects - Provides an intermediate step between tools and items.Gaphas contains default implementations forCanvasandItems. There are protocols in place
to allow you to make your own canvas.💾 InstallTo install Gaphas, simply use pip:$pipinstallgaphasUse of avirtual environmentis highly recommended.DevelopmentTo setup a development environment with Linux:$sudoapt-getinstall-ypython3-devpython3-gipython3-gi-cairogir1.2-gtk-3.0libgirepository1.0-devlibcairo2-dev
$pipinstallpoetry
$poetryinstall🔦 UsageAPI docs and tutorials can be found onRead the Docs.♥ ContributingThanks goes to these wonderful people (emoji key):Arjan Molenaar💻🐛📖👀💬🔌Dan Yeaw💻⚠️👀🐛💬🚇📖wrobell💻⚠️👀Jean-Luc Stevens💻🐛📖Franz Steinmetz💻🐛Adrian Boguszewski💻Rico Belder🐛👀Adam Boduch🐛Janet Jose📖This project follows theall-contributorsspecification. Contributions of any kind are welcome!Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
There is afirst-timers-onlytag for issues that should be ideal for people who are not very familiar with the codebase yet.Forkthe repositoryon GitHub to    start making your changes to themainbranch (or branch off of it).Write a test which shows that the bug was fixed or that the feature
works as expected.Send a pull request and bug the maintainers until it gets merged and
published. :smile:Seethe contributing file!© LicenseCopyright © Arjan Molenaar and Dan YeawLicensed under theApache License 2.0.Summary: You can do what you like with Gaphas, as long as you include the required notices. This permissive license contains a patent license from the contributors of the code.