feat(annotation): Add Origin/Width/Height parameters to AddAnnotationCommand
- Add Origin parameter (default: BottomLeft) - Add Width/Height as alternatives to X2/Y2 - Validation: Either (X2+Y2) OR (Width+Height) required, not both - FluentValidation rules enforce mutual exclusivity
This commit is contained in:
@@ -18,6 +18,7 @@ public record AddAnnotationCommand : IRequest<byte[]>
|
||||
public string? Author { get; init; }
|
||||
public string? Color { get; init; }
|
||||
public TextMarkupStyle? TextMarkupStyle { get; init; }
|
||||
public AnnotationOrigin Origin { get; init; } = AnnotationOrigin.BottomLeft;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -35,7 +36,8 @@ public class AddAnnotationHandler(IPdfProcessor pdfProcessor) : IRequestHandler<
|
||||
request.Content,
|
||||
request.Author,
|
||||
request.Color,
|
||||
request.TextMarkupStyle);
|
||||
request.TextMarkupStyle,
|
||||
request.Origin);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user