OperationRecordingCanvas.cs 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using System;
  2. using System.Collections.Generic;
  3. using QuestPDF.Drawing;
  4. using QuestPDF.Infrastructure;
  5. using QuestPDF.Skia;
  6. using QuestPDF.Skia.Text;
  7. using QuestPDF.UnitTests.TestEngine.Operations;
  8. namespace QuestPDF.UnitTests.TestEngine
  9. {
  10. internal sealed class OperationRecordingCanvas : IDrawingCanvas
  11. {
  12. public ICollection<OperationBase> Operations { get; } = new List<OperationBase>();
  13. public DocumentPageSnapshot GetSnapshot() => throw new NotImplementedException();
  14. public void DrawSnapshot(DocumentPageSnapshot snapshot) => throw new NotImplementedException();
  15. public void Save() => throw new NotImplementedException();
  16. public void Restore() => throw new NotImplementedException();
  17. public void SetZIndex(int index) => throw new NotImplementedException();
  18. public int GetZIndex() => throw new NotImplementedException();
  19. public SkCanvasMatrix GetCurrentMatrix() => throw new NotImplementedException();
  20. public void SetMatrix(SkCanvasMatrix matrix) => throw new NotImplementedException();
  21. public void Translate(Position vector) => Operations.Add(new CanvasTranslateOperation(vector));
  22. public void Scale(float scaleX, float scaleY) => Operations.Add(new CanvasScaleOperation(scaleX, scaleY));
  23. public void Rotate(float angle) => Operations.Add(new CanvasRotateOperation(angle));
  24. public void DrawLine(Position start, Position end, SkPaint paint) => throw new NotImplementedException();
  25. public void DrawRectangle(Position vector, Size size, SkPaint paint) => throw new NotImplementedException();
  26. public void DrawComplexBorder(SkRoundedRect innerRect, SkRoundedRect outerRect, SkPaint paint) => throw new NotImplementedException();
  27. public void DrawShadow(SkRoundedRect shadowRect, SkBoxShadow shadow) => throw new NotImplementedException();
  28. public void DrawParagraph(SkParagraph paragraph, int lineFrom, int lineTo) => throw new NotImplementedException();
  29. public void DrawImage(SkImage image, Size size) => Operations.Add(new CanvasDrawImageOperation(Position.Zero, size));
  30. public void DrawPicture(SkPicture picture) => throw new NotImplementedException();
  31. public void DrawSvgPath(string path, Color color) => throw new NotImplementedException();
  32. public void DrawSvg(SkSvgImage svgImage, Size size) => throw new NotImplementedException();
  33. public void DrawOverflowArea(SkRect area) => throw new NotImplementedException();
  34. public void ClipOverflowArea(SkRect availableSpace, SkRect requiredSpace) => throw new NotImplementedException();
  35. public void ClipRectangle(SkRect clipArea) => throw new NotImplementedException();
  36. public void ClipRoundedRectangle(SkRoundedRect clipArea) => throw new NotImplementedException();
  37. public void DrawHyperlink(Size size, string url, string? description) => throw new NotImplementedException();
  38. public void DrawSectionLink(Size size, string sectionName, string? description) => throw new NotImplementedException();
  39. public void DrawSection(string sectionName) => throw new NotImplementedException();
  40. public void MarkCurrentContentAsArtifact(bool isArtifact) => throw new NotImplementedException();
  41. public void SetSemanticNodeId(int nodeId) => throw new NotImplementedException();
  42. }
  43. }