MCPcopy Create free account
hub / github.com/cogentcore/core / GradientUpdateStops

Method GradientUpdateStops

svg/gradient.go:180–188  ·  view source on GitHub ↗

Gradient management utilities for creating element-specific grads GradientUpdateStops copies stops from StopsName gradient if it is set

(gr *Gradient)

Source from the content-addressed store, hash-verified

178
179// GradientUpdateStops copies stops from StopsName gradient if it is set
180func (sv *SVG) GradientUpdateStops(gr *Gradient) {
181 if gr.StopsName == "" {
182 return
183 }
184 sgr := sv.GradientByName(gr, gr.StopsName)
185 if sgr != nil {
186 gr.Grad.AsBase().CopyStopsFrom(sgr.Grad.AsBase())
187 }
188}
189
190// GradientDeleteForNode deletes the node-specific gradient on given node
191// of given name, which can be a full url(# name or just the bare name.

Callers 3

GradientNewForNodeMethod · 0.95

Calls 3

GradientByNameMethod · 0.95
CopyStopsFromMethod · 0.80
AsBaseMethod · 0.65

Tested by

no test coverage detected