merge pull request #120 from vadik299/master

Fix for rectangle width/height incorrectly parsed
This commit is contained in:
Eliot Jones
2020-01-07 08:44:47 +00:00
committed by GitHub

View File

@@ -57,9 +57,13 @@
public void Run(IOperationContext operationContext)
{
var lowerLeft = new PdfPoint(LowerLeftX, LowerLeftY);
var upperRight = new PdfPoint(LowerLeftX + Width, LowerLeftY + Height);
operationContext.BeginSubpath();
var lowerLeftTransform = operationContext.CurrentTransformationMatrix.Transform(lowerLeft);
operationContext.CurrentPath.Rectangle(lowerLeftTransform.X, lowerLeftTransform.Y, (double)Width, (double)Height);
var upperRightTransform = operationContext.CurrentTransformationMatrix.Transform(upperRight);
operationContext.CurrentPath.Rectangle(lowerLeftTransform.X, lowerLeftTransform.Y, upperRightTransform.X - lowerLeftTransform.X, upperRightTransform.Y - lowerLeftTransform.Y);
}
/// <inheritdoc />
@@ -83,4 +87,4 @@
return $"{LowerLeftX} {LowerLeftY} {Width} {Height} {Symbol}";
}
}
}
}