OperationRecordingCanvas.cs 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 DrawFilledRectangle(Position vector, Size size, Color color) => Operations.Add(new CanvasDrawRectangleOperation(vector, size, color));
  25. public void DrawStrokeRectangle(Position vector, Size size, float strokeWidth, Color color) => throw new NotImplementedException();
  26. public void DrawParagraph(SkParagraph paragraph, int lineFrom, int lineTo) => throw new NotImplementedException();
  27. public void DrawImage(SkImage image, Size size) => Operations.Add(new CanvasDrawImageOperation(Position.Zero, size));
  28. public void DrawPicture(SkPicture picture) => throw new NotImplementedException();
  29. public void DrawSvgPath(string path, Color color) => throw new NotImplementedException();
  30. public void DrawSvg(SkSvgImage svgImage, Size size) => throw new NotImplementedException();
  31. public void DrawOverflowArea(SkRect area) => throw new NotImplementedException();
  32. public void ClipOverflowArea(SkRect availableSpace, SkRect requiredSpace) => throw new NotImplementedException();
  33. public void ClipRectangle(SkRect clipArea) => throw new NotImplementedException();
  34. public void DrawHyperlink(string url, Size size) => throw new NotImplementedException();
  35. public void DrawSectionLink(string sectionName, Size size) => throw new NotImplementedException();
  36. public void DrawSection(string sectionName) => throw new NotImplementedException();
  37. }
  38. }