
Papyrus::Renderable is a common base for all classes capable of rendering themselves into a cairomm context. More...
#include <renderable.h>

Public Types | |
| typedef PapyrusPointer < Renderable > | pointer |
Public Member Functions | |
| virtual | ~Renderable () |
| virtual void | render (Context &cairo) const =0 |
| virtual void | render (Context &cairo, double x, double y, double w, double h) const |
| void | render (Cairo::RefPtr< Cairo::Context > cairo) const |
| void | render (Cairo::RefPtr< Cairo::Context > cairo, double x, double y, double w, double h) const |
| virtual Glib::ustring | svg (unsigned depth=0) |
| Returns an SVG representation of the Renderable. | |
| PAPYRUS_CLASS_NAME ("Renderable") | |
Protected Member Functions | |
| Renderable (const Glib::ustring &id) | |
| Glib::ustring | svg_spacing (unsigned depth) |
| Glib::ustring | svg_id () |
Papyrus::Renderable is a common base for all classes capable of rendering themselves into a cairomm context.
Renderable provides the pure virtual render() method, which takes a cairomm context as its only parameter. Descendants of Papyrus::Renderable provide their own implementations of render() that allow them to be rendered into the supplied cairomm context.
The render() method makes it possible to render a hierarchy (or hierarchies) of Renderables into a cairomm context employing a visitor pattern.
Inherit from Papyrus::Renderable when you want your object to be capable of being rendered into a cairo context through a common interface.
Don't forget to provide your own implementation of render() since it's a pure virtual method.
| typedef PapyrusPointer<Renderable> Papyrus::Renderable::pointer |
Reimplemented in Papyrus::Gradient, and Papyrus::Paint.
| Papyrus::Renderable::Renderable | ( | const Glib::ustring & | id | ) | [inline, protected] |
| virtual Papyrus::Renderable::~Renderable | ( | ) | [inline, virtual] |
| Papyrus::Renderable::PAPYRUS_CLASS_NAME | ( | "Renderable" | ) |
| void Papyrus::Renderable::render | ( | Cairo::RefPtr< Cairo::Context > | cairo, | |
| double | x, | |||
| double | y, | |||
| double | w, | |||
| double | h | |||
| ) | const [inline] |
| void Papyrus::Renderable::render | ( | Cairo::RefPtr< Cairo::Context > | cairo | ) | const [inline] |
| virtual void Papyrus::Renderable::render | ( | Context & | cairo, | |
| double | x, | |||
| double | y, | |||
| double | w, | |||
| double | h | |||
| ) | const [inline, virtual] |
| virtual void Papyrus::Renderable::render | ( | Context & | cairo | ) | const [pure virtual] |
Implemented in Papyrus::Color, Papyrus::Drawable, Papyrus::Fill, Papyrus::LinearGradient, Papyrus::PathElement, Papyrus::RadialGradient, and Papyrus::Stroke.
| virtual Glib::ustring Papyrus::Renderable::svg | ( | unsigned | depth = 0 |
) | [inline, virtual] |
Returns an SVG representation of the Renderable.
Reimplemented in Papyrus::Circle, Papyrus::Fill, Papyrus::Group, Papyrus::Path, Papyrus::PathElement, Papyrus::Rectangle, Papyrus::Reference, and Papyrus::SVG.
| Glib::ustring Papyrus::Renderable::svg_id | ( | ) | [inline, protected] |
| Glib::ustring Papyrus::Renderable::svg_spacing | ( | unsigned | depth | ) | [inline, protected] |
1.6.1