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

Method URLOptions

processing/extend_test.go:87–111  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

85}
86
87func (e extendArTestCase) URLOptions() string {
88 opts := testutil.NewOptionsBuilder()
89
90 opts.Add("width").Set(0, e.size.width)
91 opts.Add("height").Set(0, e.size.height)
92
93 args := opts.Add("extend_aspect_ratio").Set(0, 1)
94
95 if e.gravity != processing.GravityUnknown {
96 args.Set(1, e.gravity)
97
98 if e.xOffset != 0 {
99 args.Set(2, e.xOffset)
100 }
101 if e.yOffset != 0 {
102 args.Set(3, e.yOffset)
103 }
104 }
105
106 if e.dpr != 0 {
107 opts.Add("dpr").Set(0, e.dpr)
108 }
109
110 return opts.String()
111}
112
113func (e extendArTestCase) String() string {
114 var b strings.Builder

Callers

nothing calls this directly

Calls 4

AddMethod · 0.95
StringMethod · 0.95
NewOptionsBuilderFunction · 0.92
SetMethod · 0.45

Tested by

no test coverage detected