Skip to content

Commit 8ef4b57

Browse files
committed
fix: do not output border in fill-only mode
1 parent 220419f commit 8ef4b57

3 files changed

Lines changed: 13 additions & 1 deletion

File tree

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.7.0
1+
2.8.0

src/Draw.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,10 @@ public function getPolygon(array $points, string $mode = 'S', array $styles = []
347347
}
348348
}
349349

350+
if (!$this->isStrokingMode($mode)) {
351+
return $out;
352+
}
353+
350354
$nco -= 3;
351355

352356
// paint the outline

test/DrawTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,14 @@ public function testGetLine(): void
104104
. "\n",
105105
$res,
106106
);
107+
108+
$res = $draw->getRect(3, 5, 7, 11, 'F', [
109+
'all' => $testStyle,
110+
1 => [
111+
'lineColor' => '#ff0000',
112+
],
113+
]);
114+
$this->assertStringNotContainsString("\nS\n", $res);
107115
}
108116

109117
/**

0 commit comments

Comments
 (0)