Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make two DrawText methods obsolete because of #3122 #3165

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions binding/SkiaSharp/SKCanvas.cs
Original file line number Diff line number Diff line change
@@ -619,6 +619,7 @@ public void DrawText (string text, SKPoint p, SKPaint paint) =>
public void DrawText (string text, float x, float y, SKPaint paint) =>
DrawText (text, x, y, paint.TextAlign, paint.GetFont (), paint);

[Obsolete ("Use DrawText(string text, SKPoint p, SKTextAlign textAlign, SKFont font, SKPaint paint) instead.")]
public void DrawText (string text, SKPoint p, SKFont font, SKPaint paint) =>
#pragma warning disable CS0618 // Type or member is obsolete (TODO: replace paint.TextAlign with SKTextAlign.Left)
DrawText (text, p, paint.TextAlign, font, paint);
@@ -627,6 +628,7 @@ public void DrawText (string text, SKPoint p, SKFont font, SKPaint paint) =>
public void DrawText (string text, SKPoint p, SKTextAlign textAlign, SKFont font, SKPaint paint) =>
DrawText (text, p.X, p.Y, textAlign, font, paint);

[Obsolete ("Use DrawText(string text, float x, float y, SKTextAlign textAlign, SKFont font, SKPaint paint) instead.")]
public void DrawText (string text, float x, float y, SKFont font, SKPaint paint) =>
#pragma warning disable CS0618 // Type or member is obsolete (TODO: replace paint.TextAlign with SKTextAlign.Left)
DrawText (text, x, y, paint.TextAlign, font, paint);