MCPcopy
hub / github.com/tdewolff/canvas / IsGradient

Method IsGradient

canvas.go:135–137  ·  view source on GitHub ↗

IsGradient returns true when paint is a gradient.

()

Source from the content-addressed store, hash-verified

133
134// IsGradient returns true when paint is a gradient.
135func (paint Paint) IsGradient() bool {
136 return paint.Gradient != nil && paint.Pattern == nil
137}
138
139// IsPattern returns true when paint is a pattern.
140func (paint Paint) IsPattern() bool {

Callers 9

EqualMethod · 0.95
setAttributeMethod · 0.80
SetColorSpaceMethod · 0.80
SetFillMethod · 0.80
SetStrokeMethod · 0.80
toStyleMethod · 0.80
renderPathMethod · 0.80
RenderPathMethod · 0.80
writePaintMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected