mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-10-15 03:34:52 +08:00
merge pull request #120 from vadik299/master
Fix for rectangle width/height incorrectly parsed
This commit is contained in:
@@ -57,9 +57,13 @@
|
|||||||
public void Run(IOperationContext operationContext)
|
public void Run(IOperationContext operationContext)
|
||||||
{
|
{
|
||||||
var lowerLeft = new PdfPoint(LowerLeftX, LowerLeftY);
|
var lowerLeft = new PdfPoint(LowerLeftX, LowerLeftY);
|
||||||
|
var upperRight = new PdfPoint(LowerLeftX + Width, LowerLeftY + Height);
|
||||||
|
|
||||||
operationContext.BeginSubpath();
|
operationContext.BeginSubpath();
|
||||||
var lowerLeftTransform = operationContext.CurrentTransformationMatrix.Transform(lowerLeft);
|
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 />
|
/// <inheritdoc />
|
||||||
|
Reference in New Issue
Block a user