#include <svg.h>
Public Types | |
enum | StrType { FILE, MEMORY } |
typedef enum Papyrus::SVG::StrType | StrType |
Public Member Functions | |
PAPYRUS_DRAWABLE (SVG) | |
virtual | ~SVG () |
bool | set_from_file (const Glib::ustring &svg_filename) |
bool | set_from_memory (const Glib::ustring &svg) |
bool | set_from_memory (const unsigned char *contents, size_t bytes) |
bool | set_from_stream (std::istream &in) |
bool | set_from_document (const xmlpp::Document *doc) |
bool | set_from_element (const xmlpp::Element *element) |
virtual Glib::ustring | svg (unsigned depth=0) |
Static Public Member Functions | |
static pointer | create () |
static pointer | create (const Glib::ustring &s, StrType st=FILE) |
static pointer | create (const Glib::ustring &id, const Glib::ustring &s, StrType st) |
Protected Member Functions | |
SVG () | |
SVG (const Glib::ustring &id, const Glib::ustring &filename, StrType st) | |
bool | process_element (const xmlpp::Element *element, Group &parent, bool in_defs_section, bool is_root=false) |
Private Member Functions | |
Glib::ustring | extract_id_from_uri (const Glib::ustring &uri) |
Static Private Member Functions | |
static void | initialize_uri_regular_expression () |
Private Attributes | |
std::vector< Cairo::ColorStop > | m_color_stops |
typedef enum Papyrus::SVG::StrType Papyrus::SVG::StrType |
Papyrus::SVG::SVG | ( | ) | [protected] |
Referenced by create().
Papyrus::SVG::SVG | ( | const Glib::ustring & | id, | |
const Glib::ustring & | filename, | |||
StrType | st | |||
) | [protected] |
References FILE, MEMORY, set_from_file(), and set_from_memory().
Papyrus::SVG::~SVG | ( | ) | [virtual] |
SVG::pointer Papyrus::SVG::create | ( | const Glib::ustring & | id, | |
const Glib::ustring & | s, | |||
StrType | st | |||
) | [static] |
References PAPYRUS_CREATE.
SVG::pointer Papyrus::SVG::create | ( | const Glib::ustring & | s, | |
StrType | st = FILE | |||
) | [static] |
References PAPYRUS_CREATE.
SVG::pointer Papyrus::SVG::create | ( | ) | [static] |
References PAPYRUS_CREATE, and SVG().
Referenced by process_element().
Glib::ustring Papyrus::SVG::extract_id_from_uri | ( | const Glib::ustring & | uri | ) | [private] |
void Papyrus::SVG::initialize_uri_regular_expression | ( | ) | [static, private] |
Papyrus::SVG::PAPYRUS_DRAWABLE | ( | SVG | ) |
Reimplemented from Papyrus::Group.
bool Papyrus::SVG::process_element | ( | const xmlpp::Element * | element, | |
Group & | parent, | |||
bool | in_defs_section, | |||
bool | is_root = false | |||
) | [protected] |
References Papyrus::Group::add_paint_to_dictionary(), Papyrus::Group::child(), Papyrus::Group::clear(), Papyrus::Path::create(), Papyrus::Circle::create(), Papyrus::Rectangle::create(), create(), Papyrus::Color::create(), Papyrus::Group::lookup_drawable(), Papyrus::process_drawable(), Papyrus::process_linear_gradient(), Papyrus::Group::set_description(), Papyrus::Group::set_fill(), Papyrus::Group::set_title(), Papyrus::Group::size(), and Papyrus::strcaseeq().
Referenced by set_from_element().
bool Papyrus::SVG::set_from_document | ( | const xmlpp::Document * | doc | ) |
References set_from_element().
Referenced by set_from_file(), set_from_memory(), and set_from_stream().
bool Papyrus::SVG::set_from_element | ( | const xmlpp::Element * | element | ) |
References process_element().
Referenced by set_from_document().
bool Papyrus::SVG::set_from_file | ( | const Glib::ustring & | svg_filename | ) |
References set_from_document().
Referenced by SVG().
bool Papyrus::SVG::set_from_memory | ( | const unsigned char * | contents, | |
size_t | bytes | |||
) |
References set_from_document().
bool Papyrus::SVG::set_from_memory | ( | const Glib::ustring & | svg | ) |
References set_from_document().
Referenced by SVG().
bool Papyrus::SVG::set_from_stream | ( | std::istream & | in | ) |
References set_from_document().
Glib::ustring Papyrus::SVG::svg | ( | unsigned | depth = 0 |
) | [virtual] |
Reimplemented from Papyrus::Group.
References Papyrus::Group::m_layers, Papyrus::Renderable::svg_id(), and Papyrus::Renderable::svg_spacing().
std::vector<Cairo::ColorStop> Papyrus::SVG::m_color_stops [private] |