sp-solid-color.cpp revision d2e42b9425ccd4c2d4c20c2217455da177035e48
#include <cairo.h>
#include "sp-solid-color.h"
#include "attributes.h"
#include "style.h"
#include "sp-factory.h"
#include "sp-item.h"
#include "style-internal.h"
return new SPSolidColor();
bool solidColorRegistered = SPFactory::instance().registerObject("svg:solidColor", createSolidColor);
Inkscape::XML::Node* SPSolidColor::write(Inkscape::XML::Document* xml_doc, Inkscape::XML::Node* repr, guint flags) {
return repr;
cairo_pattern_t* SPSolidColor::pattern_new(cairo_t * /*ct*/, Geom::OptRect const & /*bbox*/, double opacity) {
cairo_pattern_t *cp = cairo_pattern_create_rgba ( c->value.color.v.c[0], c->value.color.v.c[1], c->value.color.v.c[2], SP_SCALE24_TO_FLOAT(this->style->solid_opacity.value) * opacity );
return cp;