MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / String

Method String

processing/watermark_test.go:56–75  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

54}
55
56func (w watermarkTestCase) String() string {
57 var b bytes.Buffer
58
59 b.WriteString(w.position.String())
60 fmt.Fprintf(&b, "_opacity_%g", w.opacity)
61
62 if w.xOffset != 0 || w.yOffset != 0 {
63 fmt.Fprintf(&b, "_offset_%g_%g", w.xOffset, w.yOffset)
64 }
65
66 if w.scale != 0 {
67 fmt.Fprintf(&b, "_scale_%g", w.scale)
68 }
69
70 if w.dpr != 0 {
71 fmt.Fprintf(&b, "_dpr_%g", w.dpr)
72 }
73
74 return b.String()
75}
76
77type WatermarkTestSuite struct {
78 testSuite

Callers 2

TestWatermarkMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected