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

Method URLOptions

processing/crop_test.go:30–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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