|
@@ -9,10 +9,10 @@ namespace PixiEditor.DrawingApi.Core.Surface
|
|
|
public class Canvas
|
|
|
{
|
|
|
public void DrawPixel(VecI position, Paint drawingPaint) => DrawPixel(position.X, position.Y, drawingPaint);
|
|
|
- public void DrawPixel(int posX, int posY, Paint drawingPaint) => DrawingBackendApi.Current.CanvasOperations.DrawPixel(posX, posY, drawingPaint);
|
|
|
+ public void DrawPixel(int posX, int posY, Paint drawingPaint) => DrawingBackendApi.Current.CanvasImplementation.DrawPixel(posX, posY, drawingPaint);
|
|
|
|
|
|
public void DrawSurface(DrawingSurface original, int x, int y, Paint? paint)
|
|
|
- => DrawingBackendApi.Current.CanvasOperations.DrawSurface(original, x, y, paint);
|
|
|
+ => DrawingBackendApi.Current.CanvasImplementation.DrawSurface(original, x, y, paint);
|
|
|
|
|
|
public void DrawSurface(DrawingSurface original, int x, int y) => DrawSurface(original, x, y, null);
|
|
|
|
|
@@ -21,30 +21,30 @@ namespace PixiEditor.DrawingApi.Core.Surface
|
|
|
DrawSurface(surfaceToDraw, size.X, size.Y, paint);
|
|
|
}
|
|
|
|
|
|
- public void DrawImage(Image image, int x, int y) => DrawingBackendApi.Current.CanvasOperations.DrawImage(image, x, y);
|
|
|
+ public void DrawImage(Image image, int x, int y) => DrawingBackendApi.Current.CanvasImplementation.DrawImage(image, x, y);
|
|
|
|
|
|
- public void DrawImage(Image image, RectD rect, Paint paint) => DrawingBackendApi.Current.CanvasOperations.DrawImage(image, rect, paint);
|
|
|
+ public void DrawImage(Image image, RectD rect, Paint paint) => DrawingBackendApi.Current.CanvasImplementation.DrawImage(image, rect, paint);
|
|
|
|
|
|
public int Save()
|
|
|
{
|
|
|
- return DrawingBackendApi.Current.CanvasOperations.Save();
|
|
|
+ return DrawingBackendApi.Current.CanvasImplementation.Save();
|
|
|
}
|
|
|
|
|
|
public void Restore()
|
|
|
{
|
|
|
- DrawingBackendApi.Current.CanvasOperations.Restore();
|
|
|
+ DrawingBackendApi.Current.CanvasImplementation.Restore();
|
|
|
}
|
|
|
|
|
|
- public void Scale(float s) => DrawingBackendApi.Current.CanvasOperations.Scale(s, s);
|
|
|
+ public void Scale(float s) => DrawingBackendApi.Current.CanvasImplementation.Scale(s, s);
|
|
|
|
|
|
/// <param name="sx">The amount to scale in the x-direction.</param>
|
|
|
/// <param name="sy">The amount to scale in the y-direction.</param>
|
|
|
/// <summary>Pre-concatenates the current matrix with the specified scale.</summary>
|
|
|
- public void Scale(float sx, float sy) => DrawingBackendApi.Current.CanvasOperations.Scale(sx, sy);
|
|
|
+ public void Scale(float sx, float sy) => DrawingBackendApi.Current.CanvasImplementation.Scale(sx, sy);
|
|
|
|
|
|
/// <param name="size">The amount to scale.</param>
|
|
|
/// <summary>Pre-concatenates the current matrix with the specified scale.</summary>
|
|
|
- public void Scale(Point size) => DrawingBackendApi.Current.CanvasOperations.Scale(size.X, size.Y);
|
|
|
+ public void Scale(Point size) => DrawingBackendApi.Current.CanvasImplementation.Scale(size.X, size.Y);
|
|
|
|
|
|
/// <param name="sx">The amount to scale in the x-direction.</param>
|
|
|
/// <param name="sy">The amount to scale in the y-direction.</param>
|
|
@@ -60,29 +60,29 @@ namespace PixiEditor.DrawingApi.Core.Surface
|
|
|
|
|
|
public void Translate(float translationX, float translationY)
|
|
|
{
|
|
|
- DrawingBackendApi.Current.CanvasOperations.Translate(translationX, translationY);
|
|
|
+ DrawingBackendApi.Current.CanvasImplementation.Translate(translationX, translationY);
|
|
|
}
|
|
|
|
|
|
public void Translate(VecD vector) => Translate((float)vector.X, (float)vector.Y);
|
|
|
|
|
|
public void DrawPath(VectorPath path, Paint paint)
|
|
|
{
|
|
|
- DrawingBackendApi.Current.CanvasOperations.DrawPath(path, paint);
|
|
|
+ DrawingBackendApi.Current.CanvasImplementation.DrawPath(path, paint);
|
|
|
}
|
|
|
|
|
|
public void DrawPoint(VecI pos, Paint paint)
|
|
|
{
|
|
|
- DrawingBackendApi.Current.CanvasOperations.DrawPoint(pos, paint);
|
|
|
+ DrawingBackendApi.Current.CanvasImplementation.DrawPoint(pos, paint);
|
|
|
}
|
|
|
|
|
|
public void DrawPoints(PointMode pointMode, Point[] points, Paint paint)
|
|
|
{
|
|
|
- DrawingBackendApi.Current.CanvasOperations.DrawPoints(pointMode, points, paint);
|
|
|
+ DrawingBackendApi.Current.CanvasImplementation.DrawPoints(pointMode, points, paint);
|
|
|
}
|
|
|
|
|
|
public void DrawRect(int x, int y, int width, int height, Paint paint)
|
|
|
{
|
|
|
- DrawingBackendApi.Current.CanvasOperations.DrawRect(x, y, width, height, paint);
|
|
|
+ DrawingBackendApi.Current.CanvasImplementation.DrawRect(x, y, width, height, paint);
|
|
|
}
|
|
|
|
|
|
public void DrawRect(RectI rect, Paint paint) => DrawRect(rect.X, rect.Y, rect.Width, rect.Height, paint);
|
|
@@ -94,57 +94,57 @@ namespace PixiEditor.DrawingApi.Core.Surface
|
|
|
|
|
|
public void ClipPath(VectorPath clipPath, ClipOperation clipOperation, bool antialias)
|
|
|
{
|
|
|
- DrawingBackendApi.Current.CanvasOperations.ClipPath(clipPath, clipOperation, antialias);
|
|
|
+ DrawingBackendApi.Current.CanvasImplementation.ClipPath(clipPath, clipOperation, antialias);
|
|
|
}
|
|
|
|
|
|
public void ClipRect(RectD rect, ClipOperation clipOperation = ClipOperation.Intersect)
|
|
|
{
|
|
|
- DrawingBackendApi.Current.CanvasOperations.ClipRect(rect, clipOperation);
|
|
|
+ DrawingBackendApi.Current.CanvasImplementation.ClipRect(rect, clipOperation);
|
|
|
}
|
|
|
|
|
|
public void Clear()
|
|
|
{
|
|
|
- DrawingBackendApi.Current.CanvasOperations.Clear();
|
|
|
+ DrawingBackendApi.Current.CanvasImplementation.Clear();
|
|
|
}
|
|
|
|
|
|
public void Clear(Color color)
|
|
|
{
|
|
|
- DrawingBackendApi.Current.CanvasOperations.Clear(color);
|
|
|
+ DrawingBackendApi.Current.CanvasImplementation.Clear(color);
|
|
|
}
|
|
|
|
|
|
public void DrawLine(VecI from, VecI to, Paint paint)
|
|
|
{
|
|
|
- DrawingBackendApi.Current.CanvasOperations.DrawLine(from, to, paint);
|
|
|
+ DrawingBackendApi.Current.CanvasImplementation.DrawLine(from, to, paint);
|
|
|
}
|
|
|
|
|
|
public void Flush()
|
|
|
{
|
|
|
- DrawingBackendApi.Current.CanvasOperations.Flush();
|
|
|
+ DrawingBackendApi.Current.CanvasImplementation.Flush();
|
|
|
}
|
|
|
|
|
|
public void SetMatrix(Matrix3X3 finalMatrix)
|
|
|
{
|
|
|
- DrawingBackendApi.Current.CanvasOperations.SetMatrix(finalMatrix);
|
|
|
+ DrawingBackendApi.Current.CanvasImplementation.SetMatrix(finalMatrix);
|
|
|
}
|
|
|
|
|
|
public void RestoreToCount(int count)
|
|
|
{
|
|
|
- DrawingBackendApi.Current.CanvasOperations.RestoreToCount(count);
|
|
|
+ DrawingBackendApi.Current.CanvasImplementation.RestoreToCount(count);
|
|
|
}
|
|
|
|
|
|
public void DrawColor(Color color, BlendMode paintBlendMode)
|
|
|
{
|
|
|
- DrawingBackendApi.Current.CanvasOperations.DrawColor(color, paintBlendMode);
|
|
|
+ DrawingBackendApi.Current.CanvasImplementation.DrawColor(color, paintBlendMode);
|
|
|
}
|
|
|
|
|
|
public void RotateRadians(float dataAngle, float centerX, float centerY)
|
|
|
{
|
|
|
- DrawingBackendApi.Current.CanvasOperations.RotateRadians(dataAngle, centerX, centerY);
|
|
|
+ DrawingBackendApi.Current.CanvasImplementation.RotateRadians(dataAngle, centerX, centerY);
|
|
|
}
|
|
|
|
|
|
public void DrawBitmap(Bitmap bitmap, int x, int y)
|
|
|
{
|
|
|
- DrawingBackendApi.Current.CanvasOperations.DrawBitmap(bitmap, x, y);
|
|
|
+ DrawingBackendApi.Current.CanvasImplementation.DrawBitmap(bitmap, x, y);
|
|
|
}
|
|
|
}
|
|
|
}
|