akiraux / Akira

Native Linux App for UI and UX Design built in Vala and GTK
GNU General Public License v3.0
5.24k stars 203 forks source link

No goocanvas #652

Closed mbfraga closed 2 years ago

mbfraga commented 2 years ago
## Summary / How this PR fixes the problem? This PR implements a custom Canvas that does not rely on goocanvas (although it is heavily insipired by it and takes code directly from it--so we still need attribution). The goal is to have more control over drawables and performance. Some important changes: * Added ViewLayer concept and rewrote managers and previous CanvasItems. This actuallly reduced code by a lot. - Grid (not 1:1 with master) - Hover (now displays the path rather than the bounding box) - Nobs and Selection - Snaps * Added a BaseCanvas to replace Goo.Canvas. In the future we should probably restructure and rename it. * Since don't use GooCanvas, the view is a direct reflection of the model...so all synchronization code can go away! This speeds up removal and sorting SIGNIFICANTLY. For remove, we go from >O(n^2) to
  • There are drawing artifacts (that also existed in goocanvas. These happen when you move items around--once the full canvas redraws they go away. So they are fairly harmless for now. Still something that would be nice to get rid of. artifacts
albfan commented 2 years ago

Congrats on this @mbfraga