Private GIT

Skip to content
Snippets Groups Projects
Commit 088b37d1 authored by Gary Allan's avatar Gary Allan
Browse files

Bugfix: Fix PNG transparency of rack U height labels.

parent 66bc922f
No related branches found
No related tags found
No related merge requests found
......@@ -470,10 +470,15 @@ class RackDrawer extends Common_functions {
imagecopy($this->template, $unit, 0, $y, 0, 0, $this->rackXSize, $this->unitYSize);
$text = ($this->rack->getOrientation()) ? $i + 1 : $this->rack->getSpace() - $i;
$textBox = imagettfbbox(12, 0, dirname(__FILE__)."/../../css/fonts/MesloLGS-Regular.ttf", $text);
// disable transparency for U labels
imagealphablending($this->template, true);
imagettftext($this->template, 12, 0,
$this->rackInsideXOffset - 4 - abs($textBox[2] - $textBox[0]),
$y + abs($textBox[1] - $textBox[7]) + round(($this->unitYSize - ($textBox[1] - $textBox[7])) / 2),
$textColor, dirname(__FILE__)."/../../css/fonts/MesloLGS-Regular.ttf", $text);
imagealphablending($this->template, false);
$y += $this->unitYSize;
}
imagecopy($this->template, $bottom, 0, $y, 0, 0, $this->rackXSize, $this->bottomYSize);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment