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

Method URLOptions

processing/extend_test.go:29–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27}
28
29func (e extendTestCase) URLOptions() string {
30 opts := testutil.NewOptionsBuilder()
31
32 opts.Add("width").Set(0, e.size.width)
33 opts.Add("height").Set(0, e.size.height)
34
35 args := opts.Add("extend").Set(0, 1)
36
37 if e.gravity != processing.GravityUnknown {
38 args.Set(1, e.gravity)
39
40 if e.xOffset != 0 {
41 args.Set(2, e.xOffset)
42 }
43 if e.yOffset != 0 {
44 args.Set(3, e.yOffset)
45 }
46 }
47
48 if e.dpr != 0 {
49 opts.Add("dpr").Set(0, e.dpr)
50 }
51
52 return opts.String()
53}
54
55func (e extendTestCase) String() string {
56 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