A Library for Declarative Resolution-Independent 2D Graphics
The design of most 2D graphics frameworks has been guided by what the computer can draw efficiently, instead of by how graphics can best be expressed and composed. As a result, such frameworks restrict expressivity by providing a limited set of shape primitives, a limited set of textures and only affine transformations. For example, non-affine transformations can only be added by invasive modification or complex tricks rather than by simple composition. More general frameworks exist, but they make it harder to describe and analyze shapes. We present a new declarative approach to resolution-independent 2D graphics that generalizes and simplifies the functionality of traditional frameworks, while preserving their efficiency. As a real-world example, we show the implementation of a form of focus+context lenses that gives better image quality and better performance than the state-of-the-art solution at a fraction of the code. Our approach can serve as a versatile foundation for the creation of advanced graphics and higher level frameworks.
KeywordsDeclarative Graphics Design Resolution-Independence Optimization Focus+context lenses
Unable to display preview. Download preview PDF.
- 5.Dokken, T., Thomassen, J.: Overview of approximate implicitization. In: Topics in Algebraic Geometry and Geometric modelling. AMS series on Contemporary Mathematics CONM 334, vol. 28(1), pp. 169–184 (2003)Google Scholar
- 6.Elliott, C.: Functional image synthesis. In: Proceedings of Bridges (2001)Google Scholar
- 7.Finne, S., Jones, S.P.: Pictures: A simple structured graphics model. In: Glasgow Functional Programming Workshop, Ullapool (1995)Google Scholar
- 9.Elliott, C.: Programming graphics processors functionally. In: Proceedings of the 2004 ACM SIGPLAN Workshop on Haskell 2004, pp. 45–56. ACM, New York (2004)Google Scholar
- 10.Karczmarczuk, J.: Geometric modelling in functional style. In: Proceedings of the III Latino-American Workshop on Functional Programming, CLAPF 1999, pp. 8–9 (1999)Google Scholar
- 13.Schneider, P.J.: An algorithm for automatically fitting digitized curves. In: Glassner, A.S. (ed.) Graphics gems, pp. 612–626. Academic Press Professional, Inc., San Diego (1990)Google Scholar
- 14.Elliott, C.: Beautiful differentiation. In: International Conference on Functional Programming, ICFP (2009)Google Scholar
- 17.Pietriga, E.: A Toolkit for Addressing HCI Issues in Visual Language Environments. In: IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC), pp. 145–152 (2005)Google Scholar