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

Method String

processing/crop_test.go:56–74  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

54}
55
56func (r resizeFillGravityTestCase) String() string {
57 var b strings.Builder
58
59 fmt.Fprintf(&b, "resizeFill_%dx%d", r.size.width, r.size.height)
60
61 if r.gravity != 0 {
62 fmt.Fprintf(&b, "_gravity_%s", r.gravity.String())
63 }
64
65 if r.xOffset != 0 || r.yOffset != 0 {
66 fmt.Fprintf(&b, "_offset_%f_%f", r.xOffset, r.yOffset)
67 }
68
69 if r.dpr > 0 {
70 fmt.Fprintf(&b, "_dpr_%g", r.dpr)
71 }
72
73 return b.String()
74}
75
76type cropTestCase struct {
77 gravity processing.GravityType

Callers

nothing calls this directly

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected