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