#include <cairo.h>
#include "sp-radial-gradient.h"
#include "attributes.h"
/*
* Radial Gradient
*/
}
}
/**
* Set radial gradient attributes from associated repr.
*/
this->readAttr( "cx" );
this->readAttr( "cy" );
this->readAttr( "r" );
this->readAttr( "fx" );
this->readAttr( "fy" );
this->readAttr( "fr" );
}
/**
* Set radial gradient attribute.
*/
switch (key) {
case SP_ATTR_CX:
}
}
break;
case SP_ATTR_CY:
}
}
break;
case SP_ATTR_R:
}
break;
case SP_ATTR_FX:
}
break;
case SP_ATTR_FY:
}
break;
case SP_ATTR_FR:
}
break;
default:
break;
}
}
/**
* Write radial gradient attributes to associated repr.
*/
Inkscape::XML::Node* SPRadialGradient::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) {
}
}
}
}
}
}
}
return repr;
}
cairo_pattern_t* SPRadialGradient::pattern_new(cairo_t *ct, Geom::OptRect const &bbox, double opacity) {
this->ensureVector();
// NOTE: SVG2 will allow the use of a focus circle which can
// have its center outside the first circle.
// code below suggested by Cairo devs to overcome tolerance problems
// Corrected for
}
// we need to use vectors with the same direction to represent the transformed
// radius and the focus-center delta, because gs2user might contain non-uniform scaling
// compute the tolerance distance in user space
// create a vector with the same direction as the transformed d,
// with the length equal to tolerance
// nudge the focus slightly inside
}
return cp;
}