mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-10-14 02:44:58 +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)
|
||||
{
|
||||
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}";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user