ICanvasImplementation.cs 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using System;
  2. using PixiEditor.DrawingApi.Core.ColorsImpl;
  3. using PixiEditor.DrawingApi.Core.Numerics;
  4. using PixiEditor.DrawingApi.Core.Surfaces;
  5. using PixiEditor.DrawingApi.Core.Surfaces.ImageData;
  6. using PixiEditor.DrawingApi.Core.Surfaces.PaintImpl;
  7. using PixiEditor.DrawingApi.Core.Surfaces.Vector;
  8. using PixiEditor.Numerics;
  9. namespace PixiEditor.DrawingApi.Core.Bridge.Operations
  10. {
  11. public interface ICanvasImplementation
  12. {
  13. public void DrawPixel(IntPtr objPtr, int posX, int posY, Paint drawingPaint);
  14. public void DrawSurface(IntPtr objPtr, DrawingSurface drawingSurface, int x, int y, Paint? paint);
  15. public void DrawImage(IntPtr objPtr, Image image, int x, int y);
  16. public int Save(IntPtr objPtr);
  17. public void Restore(IntPtr objPtr);
  18. public void Scale(IntPtr objPtr, float sizeX, float sizeY);
  19. public void Translate(IntPtr objPtr, float translationX, float translationY);
  20. public void DrawPath(IntPtr objPtr, VectorPath path, Paint paint);
  21. public void DrawPoint(IntPtr objPtr, VecI pos, Paint paint);
  22. public void DrawPoints(IntPtr objPtr, PointMode pointMode, Point[] points, Paint paint);
  23. public void DrawRect(IntPtr objPtr, int x, int y, int width, int height, Paint paint);
  24. public void DrawCircle(IntPtr objPtr, int cx, int cy, int radius, Paint paint);
  25. public void DrawOval(IntPtr objPtr, int cx, int cy, int width, int height, Paint paint);
  26. public void ClipPath(IntPtr objPtr, VectorPath clipPath, ClipOperation clipOperation, bool antialias);
  27. public void ClipRect(IntPtr objPtr, RectD rect, ClipOperation clipOperation);
  28. public void Clear(IntPtr objPtr);
  29. public void Clear(IntPtr objPtr, Color color);
  30. public void DrawLine(IntPtr objPtr, VecI from, VecI to, Paint paint);
  31. public void Flush(IntPtr objPtr);
  32. public void SetMatrix(IntPtr objPtr, Matrix3X3 finalMatrix);
  33. public void RestoreToCount(IntPtr objPtr, int count);
  34. public void DrawColor(IntPtr objPtr, Color color, BlendMode paintBlendMode);
  35. public void RotateRadians(IntPtr objPtr, float radians, float centerX, float centerY);
  36. public void RotateDegrees(IntPtr objectPointer, float degrees, float centerX, float centerY);
  37. public void DrawImage(IntPtr objPtr, Image image, RectD destRect, Paint paint);
  38. public void DrawImage(IntPtr objPtr, Image image, RectD sourceRect, RectD destRect, Paint paint);
  39. public void DrawBitmap(IntPtr objPtr, Bitmap bitmap, int x, int y);
  40. public void Dispose(IntPtr objectPointer);
  41. public object GetNativeCanvas(IntPtr objectPointer);
  42. public void DrawPaint(IntPtr objectPointer, Paint paint);
  43. public void DrawImage(IntPtr objectPointer, Image image, int x, int y, Paint paint);
  44. public Matrix3X3 GetActiveMatrix(IntPtr objectPointer);
  45. }
  46. }