()
| 27 | } |
| 28 | |
| 29 | func (w watermarkTestCase) URLOptions() string { |
| 30 | opts := testutil.NewOptionsBuilder() |
| 31 | |
| 32 | wmArgs := opts.Add("watermark") |
| 33 | wmArgs.Set(0, w.opacity).Set(1, w.position) |
| 34 | |
| 35 | if w.xOffset != 0 { |
| 36 | wmArgs.Set(2, w.xOffset) |
| 37 | } |
| 38 | if w.yOffset != 0 { |
| 39 | wmArgs.Set(3, w.yOffset) |
| 40 | } |
| 41 | if w.scale != 0 { |
| 42 | wmArgs.Set(4, w.scale) |
| 43 | } |
| 44 | |
| 45 | if w.dpr != 0 { |
| 46 | opts.Add("dpr").Set(0, w.dpr) |
| 47 | } |
| 48 | |
| 49 | if w.format != imagetype.Unknown { |
| 50 | opts.Add("format").Set(0, w.format) |
| 51 | } |
| 52 | |
| 53 | return opts.String() |
| 54 | } |
| 55 | |
| 56 | func (w watermarkTestCase) String() string { |
| 57 | var b bytes.Buffer |
nothing calls this directly
no test coverage detected