The goal of Papyrus is to provide a canvas library and not to reimplement the Gnome canvas. However, an early goal is to achieve similar functionality with respect to most of the canvas items and most of the canvas methods.
The purpose of the following table is two-fold:
Since Papyrus was not created as a 1-1 equivalent of the Gnome::Canvas, the following mapping is not meant to indicate a direct class replacement, but more of a functional replacement mapping. In particular, the Gnome::Canvas::Canvas class is the least mappable and probably is deserving of a more complete examination than is provided by the simple one-line form below.
| Gnome::Canvas | Papyrus Class | Notes |
| Gnome::Canvas::Bpath | Bezierline and Beziergon | |
| Gnome::Canvas::Canvas | Papyrus::Canvas and Papyrus::Viewport | The Gnome::Canvas::Canvas widget serves as both a display and model container for canvas objects. In the Papyrus library, the Papyrus::Canvas class serves as the canvas model (not Gtkmm dependent), while the Papyrus::Viewport serves as the Gtkmm viewing widget of a Papyrus::Canvas. Utilizing model-view separation in this fashion makes it possible to leverage cairo's various drawing surfaces and render a canvas into a cairo backend such as PDF, PS or PNG as well as the screen. |
| Gnome::Canvas::CanvasAA | Papyrus::Canvas and Papyrus::Viewport | |
| Gnome::Canvas::Ellipse | Papyrus::Circle | If you need an ellipse, use a viewbox to enforce the dimensions. Alternatively scale a circle in the x and y dimensions. |
| Gnome::Canvas::Group | Papyrus::Group | |
| Gnome::Canvas::Item | Papyrus::Drawable | |
| Gnome::Canvas::Points | Papyrus::Vertices | |
| Gnome::Canvas::Line | Papyrus::Polyline | |
| Gnome::Canvas::PathDef | cairomm | Papyrus relies upon cairomm for drawing operations which provides a much richer drawing set than Gnome::Canvas::PathDef. If instead you want a canvas item with a custom path, inherit from Papyrus::Shape and reimplement the draw_shape() method with your own shape drawing calls to cairomm. |
| Gnome::Canvas::Pixbuf | Papyrus::Image | |
| Gnome::Canvas::Polygon | Papyrus::Polygon | |
| Gnome::Canvas::RectEllipse | No equivalent in Papyrus | Since Papyrus is structured differently, this class doesn't fit in the hierarchy. |
| Gnome::Canvas::Rect | Papyrus::Rectangle | |
| Gnome::Canvas::RichText | No equivalent in Papyrus | After 0.3.0 and probably in PapyrusGtk. This is more of a GUI widget and doesn't fit conceptually into Papyrus, but will likely be incorporated into PapyrusGtk. |
| Gnome::Canvas::Shape | Papyrus::Shape | |
| Gnome::Canvas::Text | Papyrus::Text | |
| Gnome::Canvas::Widget | No equivalent in Papyrus | This canvas item will never be in Papyrus but could be useful in PapyrusGtk. At the current time this is a low priority item. |
| Gnome::Canvas::Property | cairomm | The concepts embodied in the Gnome::Canvas::Property namespace are mostly within the realm of cairomm. However classes such as Papyrus::LineStyle are used to aggregate the cairomm concepts for convenience. |