| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | public function draw(): Image |
||
| 18 | { |
||
| 19 | /** @var \AhmadMayahi\Vision\Data\CropHints $hint */ |
||
| 20 | foreach ($this->cropHints->detect() as $hint) { |
||
| 21 | $bounds = $hint->bounds; |
||
| 22 | |||
| 23 | $this->image->drawPolygon([ |
||
| 24 | $bounds[0]->x, |
||
| 25 | $bounds[0]->y, |
||
| 26 | $bounds[1]->x, |
||
| 27 | $bounds[1]->y, |
||
| 28 | $bounds[2]->x, |
||
| 29 | $bounds[2]->y, |
||
| 30 | $bounds[3]->x, |
||
| 31 | $bounds[3]->y, |
||
| 32 | ], 4, $this->borderColor); |
||
| 33 | } |
||
| 34 | |||
| 35 | return $this->image; |
||
| 36 | } |
||
| 38 |