feat(BurnPdfCommandHandler): implement AddInkAnnotation for Annotation parameter
- Added implementation for AddInkAnnotation(Annotation) to handle ink annotations from Annotation objects. - Retained existing AddInkAnnotation(int, string) method for backward compatibility. - Refactored PDF burning logic to support both Annotation-based and JSON-based annotations.
This commit is contained in:
parent
b20d25e5b9
commit
f1a140faa7
@ -347,10 +347,23 @@ public class BurnPdfCommandHandler : IRequestHandler<BurnPdfCommand>
|
||||
_manager.AddFreeHandAnnot(oColor, oPoints);
|
||||
}
|
||||
}
|
||||
|
||||
private void AddInkAnnotation(Annotation pAnnotation)
|
||||
private void AddInkAnnotation(Annotation pAnnotation)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
var oSegments = pAnnotation.Lines?.Points;
|
||||
var oColor = ColorTranslator.FromHtml(pAnnotation.StrokeColor ?? "#000000");
|
||||
_manager.SelectPage(pAnnotation.PageIndex + 1);
|
||||
|
||||
if (oSegments is null)
|
||||
return;
|
||||
|
||||
foreach (var oSegment in oSegments)
|
||||
{
|
||||
var oPoints = oSegment
|
||||
.Select(ToPointF)
|
||||
.ToArray();
|
||||
|
||||
_manager.AddFreeHandAnnot(oColor, oPoints);
|
||||
}
|
||||
}
|
||||
|
||||
#region Helpers
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user