GradientDeleteNodeProp deletes any existing gradient for node if set for given property key ("fill" or "stroke"). Returns true if deleted.
(n Node, prop string)
| 313 | // if set for given property key ("fill" or "stroke"). |
| 314 | // Returns true if deleted. |
| 315 | func (sv *SVG) GradientDeleteNodeProp(n Node, prop string) bool { |
| 316 | ps := n.AsTree().Property(prop) |
| 317 | if ps == nil { |
| 318 | return false |
| 319 | } |
| 320 | pstr := ps.(string) |
| 321 | if !strings.HasPrefix(pstr, "url(#radialGradient") && !strings.HasPrefix(pstr, "url(#linearGradient") { |
| 322 | return false |
| 323 | } |
| 324 | return sv.GradientDeleteForNode(n, pstr) |
| 325 | } |
| 326 | |
| 327 | // GradientUpdateAllStops removes any items from Defs that are not actually referred to |
| 328 | // by anything in the current SVG tree. Returns true if items were removed. |
nothing calls this directly
no test coverage detected