Simplify path construction operators

fix 're' operator to reflect documentation
Update ContentStreamProcessor with fill, stroke and clip operations
Throw errors when currentPosition is null in PdfSubpath
This commit is contained in:
BobLd
2020-04-02 17:21:51 +01:00
committed by Eliot Jones
parent 3ee9ac7915
commit 983cfcb2f6
13 changed files with 189 additions and 63 deletions

View File

@@ -56,16 +56,10 @@
/// <inheritdoc />
public void Run(IOperationContext operationContext)
{
var controlPoint1 = new PdfPoint(X1, Y1);
var end = new PdfPoint(X3, Y3);
var controlPoint1Transform = operationContext.CurrentTransformationMatrix.Transform(controlPoint1);
var endTransform = operationContext.CurrentTransformationMatrix.Transform(end);
operationContext.CurrentSubpath.BezierCurveTo(controlPoint1Transform.X, controlPoint1Transform.Y,
endTransform.X,
endTransform.Y,
endTransform.X,
endTransform.Y);
operationContext.CurrentPosition = endTransform;
var controlPoint1 = operationContext.CurrentTransformationMatrix.Transform(new PdfPoint(X1, Y1));
var end = operationContext.CurrentTransformationMatrix.Transform(new PdfPoint(X3, Y3));
operationContext.CurrentSubpath.BezierCurveTo(controlPoint1.X, controlPoint1.Y, end.X, end.Y, end.X, end.Y);
operationContext.CurrentPosition = end;
}
/// <inheritdoc />