Determine the scale factor correctly

Fix error in the logic of the context renderer, that lead to a wrong scale factor
when the width was bigger than the height
This commit is contained in:
Matthias Jentsch 2014-07-09 18:05:00 +02:00
parent 8d697a3d8e
commit 3ed67c9af6
1 changed files with 3 additions and 3 deletions

View File

@ -92,9 +92,9 @@ class RenderContext
{
$this->document = $document;
if ($width > $height) {
$this->xratio = $width/$height;
} elseif ($height < $width) {
$this->yratio = $width/$height;
$this->xratio = $width / $height;
} elseif ($height > $width) {
$this->yratio = $height / $width;
}
}