Lines Matching defs:gr
424 void SPGradient::gradientRefChanged(SPObject *old_ref, SPObject *ref, SPGradient *gr)
427 gr->modified_connection.disconnect();
430 && ref != gr )
432 gr->modified_connection = ref->connectModified(sigc::bind<2>(sigc::ptr_fun(&SPGradient::gradientRefModified), gr));
439 if (!gr->units_set) {
440 gr->units = gr->fetchUnits();
442 if (!gr->spread_set) {
443 gr->spread = gr->fetchSpread();
447 gradientRefModified(ref, 0, gr);
752 static bool has_stopsFN(SPGradient const *gr)
754 return gr->hasStops();
760 static bool has_spread_set(SPGradient const *gr)
762 return gr->isSpreadSet();
769 has_units_set(SPGradient const *gr)
771 return gr->isUnitsSet();
816 sp_gradient_repr_clear_vector(SPGradient *gr)
818 Inkscape::XML::Node *repr = gr->getRepr();
843 sp_gradient_repr_write_vector(SPGradient *gr)
845 g_return_if_fail(gr != NULL);
846 g_return_if_fail(SP_IS_GRADIENT(gr));
848 Inkscape::XML::Document *xml_doc = gr->document->getReprDoc();
849 Inkscape::XML::Node *repr = gr->getRepr();
854 for (guint i = 0; i < gr->vector.stops.size(); i++) {
857 sp_repr_set_css_double(child, "offset", gr->vector.stops[i].offset);
860 os << "stop-color:" << gr->vector.stops[i].color.toString() << ";stop-opacity:" << gr->vector.stops[i].opacity;
866 sp_gradient_repr_clear_vector(gr);
1053 sp_gradient_get_g2d_matrix(SPGradient const *gr, Geom::Affine const &ctm, Geom::Rect const &bbox)
1055 if (gr->getUnits() == SP_GRADIENT_UNITS_OBJECTBOUNDINGBOX) {
1065 sp_gradient_get_gs2d_matrix(SPGradient const *gr, Geom::Affine const &ctm, Geom::Rect const &bbox)
1067 if (gr->getUnits() == SP_GRADIENT_UNITS_OBJECTBOUNDINGBOX) {
1068 return ( gr->gradientTransform
1073 return gr->gradientTransform * ctm;
1078 sp_gradient_set_gs2d_matrix(SPGradient *gr, Geom::Affine const &ctm,
1081 gr->gradientTransform = gs2d * ctm.inverse();
1082 if (gr->getUnits() == SP_GRADIENT_UNITS_OBJECTBOUNDINGBOX ) {
1083 gr->gradientTransform = ( gr->gradientTransform
1087 gr->gradientTransform_set = TRUE;
1089 gr->requestModified(SP_OBJECT_MODIFIED_FLAG);
1099 SPGradient *gr,
1104 switch (gr->getSpread()) {
1118 for (std::vector<SPGradientStop>::iterator i = gr->vector.stops.begin();
1119 i != gr->vector.stops.end(); ++i)
1127 Geom::Affine gs2user = gr->gradientTransform;
1128 if (gr->getUnits() == SP_GRADIENT_UNITS_OBJECTBOUNDINGBOX && bbox) {
1136 sp_gradient_create_preview_pattern(SPGradient *gr, double width)
1141 //if( gr->get_type() != SP_GRADIENT_TYPE_MESH ) {
1142 if (!SP_IS_MESH(gr)) {
1143 gr->ensureVector();
1147 for (std::vector<SPGradientStop>::iterator i = gr->vector.stops.begin();
1148 i != gr->vector.stops.end(); ++i)