зеркало из https://github.com/mono/SkiaSharp.git
Whitespace style
This commit is contained in:
Родитель
af3cb0635d
Коммит
06dea91d4b
|
@ -240,7 +240,7 @@ namespace SkiaSharp
|
|||
if (paint == null)
|
||||
throw new ArgumentNullException ("paint");
|
||||
|
||||
var bytes = Util.GetEncodedText(text, paint.TextEncoding);
|
||||
var bytes = Util.GetEncodedText (text, paint.TextEncoding);
|
||||
SkiaApi.sk_canvas_draw_text (Handle, bytes, bytes.Length, x, y, paint.Handle);
|
||||
}
|
||||
|
||||
|
@ -253,55 +253,55 @@ namespace SkiaSharp
|
|||
if (points == null)
|
||||
throw new ArgumentNullException ("points");
|
||||
|
||||
var bytes = Util.GetEncodedText(text, paint.TextEncoding);
|
||||
SkiaApi.sk_canvas_draw_pos_text(Handle, bytes, bytes.Length, points, paint.Handle);
|
||||
var bytes = Util.GetEncodedText (text, paint.TextEncoding);
|
||||
SkiaApi.sk_canvas_draw_pos_text (Handle, bytes, bytes.Length, points, paint.Handle);
|
||||
}
|
||||
|
||||
public void DrawText (IntPtr buffer, int length, SKPath path, float hOffset, float vOffset, SKPaint paint)
|
||||
{
|
||||
if (buffer == IntPtr.Zero)
|
||||
throw new ArgumentNullException("buffer");
|
||||
throw new ArgumentNullException ("buffer");
|
||||
if (paint == null)
|
||||
throw new ArgumentNullException ("paint");
|
||||
if (paint == null)
|
||||
throw new ArgumentNullException ("paint");
|
||||
|
||||
SkiaApi.sk_canvas_draw_text_on_path(Handle, buffer, length, path.Handle, hOffset, vOffset, paint.Handle);
|
||||
SkiaApi.sk_canvas_draw_text_on_path (Handle, buffer, length, path.Handle, hOffset, vOffset, paint.Handle);
|
||||
}
|
||||
|
||||
public void DrawText(IntPtr buffer, int length, float x, float y, SKPaint paint)
|
||||
public void DrawText (IntPtr buffer, int length, float x, float y, SKPaint paint)
|
||||
{
|
||||
if (buffer == IntPtr.Zero)
|
||||
throw new ArgumentNullException("buffer");
|
||||
throw new ArgumentNullException ("buffer");
|
||||
if (paint == null)
|
||||
throw new ArgumentNullException("paint");
|
||||
throw new ArgumentNullException ("paint");
|
||||
|
||||
SkiaApi.sk_canvas_draw_text(Handle, buffer, length, x, y, paint.Handle);
|
||||
SkiaApi.sk_canvas_draw_text (Handle, buffer, length, x, y, paint.Handle);
|
||||
}
|
||||
|
||||
public void DrawText(IntPtr buffer, int length, SKPoint[] points, SKPaint paint)
|
||||
public void DrawText (IntPtr buffer, int length, SKPoint[] points, SKPaint paint)
|
||||
{
|
||||
if (buffer == IntPtr.Zero)
|
||||
throw new ArgumentNullException("buffer");
|
||||
throw new ArgumentNullException ("buffer");
|
||||
if (paint == null)
|
||||
throw new ArgumentNullException("paint");
|
||||
throw new ArgumentNullException ("paint");
|
||||
if (points == null)
|
||||
throw new ArgumentNullException("points");
|
||||
throw new ArgumentNullException ("points");
|
||||
|
||||
SkiaApi.sk_canvas_draw_pos_text(Handle, buffer, length, points, paint.Handle);
|
||||
SkiaApi.sk_canvas_draw_pos_text (Handle, buffer, length, points, paint.Handle);
|
||||
}
|
||||
|
||||
public void DrawText(string text, SKPath path, float hOffset, float vOffset, SKPaint paint)
|
||||
public void DrawText (string text, SKPath path, float hOffset, float vOffset, SKPaint paint)
|
||||
{
|
||||
if (text == null)
|
||||
throw new ArgumentNullException("text");
|
||||
throw new ArgumentNullException ("text");
|
||||
if (paint == null)
|
||||
throw new ArgumentNullException("paint");
|
||||
throw new ArgumentNullException ("paint");
|
||||
if (paint == null)
|
||||
throw new ArgumentNullException("paint");
|
||||
throw new ArgumentNullException ("paint");
|
||||
|
||||
var bytes = Util.GetEncodedText(text, paint.TextEncoding);
|
||||
SkiaApi.sk_canvas_draw_text_on_path(Handle, bytes, bytes.Length, path.Handle, hOffset, vOffset, paint.Handle);
|
||||
var bytes = Util.GetEncodedText (text, paint.TextEncoding);
|
||||
SkiaApi.sk_canvas_draw_text_on_path (Handle, bytes, bytes.Length, path.Handle, hOffset, vOffset, paint.Handle);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -194,40 +194,40 @@ namespace SkiaSharp
|
|||
}
|
||||
}
|
||||
|
||||
public float MeasureText(string text)
|
||||
public float MeasureText (string text)
|
||||
{
|
||||
if (text == null)
|
||||
throw new ArgumentNullException("text");
|
||||
throw new ArgumentNullException ("text");
|
||||
|
||||
var bytes = System.Text.Encoding.UTF8.GetBytes(text);
|
||||
var bytes = Util.GetEncodedText (text, TextEncoding);
|
||||
|
||||
return SkiaApi.sk_paint_measure_text(Handle, bytes, (IntPtr) bytes.Length, IntPtr.Zero);
|
||||
return SkiaApi.sk_paint_measure_text (Handle, bytes, (IntPtr) bytes.Length, IntPtr.Zero);
|
||||
}
|
||||
|
||||
public float MeasureText(IntPtr buffer, IntPtr length)
|
||||
public float MeasureText (IntPtr buffer, IntPtr length)
|
||||
{
|
||||
if (buffer == IntPtr.Zero)
|
||||
throw new ArgumentNullException("buffer");
|
||||
throw new ArgumentNullException ("buffer");
|
||||
|
||||
return SkiaApi.sk_paint_measure_text(Handle, buffer, length, IntPtr.Zero);
|
||||
return SkiaApi.sk_paint_measure_text (Handle, buffer, length, IntPtr.Zero);
|
||||
}
|
||||
|
||||
public float MeasureText(string text, ref SKRect bounds)
|
||||
public float MeasureText (string text, ref SKRect bounds)
|
||||
{
|
||||
if (text == null)
|
||||
throw new ArgumentNullException("text");
|
||||
throw new ArgumentNullException ("text");
|
||||
|
||||
var bytes = Util.GetEncodedText(text, TextEncoding);
|
||||
var bytes = Util.GetEncodedText (text, TextEncoding);
|
||||
|
||||
return SkiaApi.sk_paint_measure_text(Handle, bytes, (IntPtr) bytes.Length, ref bounds);
|
||||
return SkiaApi.sk_paint_measure_text (Handle, bytes, (IntPtr) bytes.Length, ref bounds);
|
||||
}
|
||||
|
||||
public float MeasureText(IntPtr buffer, IntPtr length, ref SKRect bounds)
|
||||
public float MeasureText (IntPtr buffer, IntPtr length, ref SKRect bounds)
|
||||
{
|
||||
if (buffer == IntPtr.Zero)
|
||||
throw new ArgumentNullException("buffer");
|
||||
throw new ArgumentNullException ("buffer");
|
||||
|
||||
return SkiaApi.sk_paint_measure_text(Handle, buffer, length, ref bounds);
|
||||
return SkiaApi.sk_paint_measure_text (Handle, buffer, length, ref bounds);
|
||||
}
|
||||
|
||||
public long BreakText (string text, float maxWidth)
|
||||
|
@ -241,18 +241,18 @@ namespace SkiaSharp
|
|||
if (text == null)
|
||||
throw new ArgumentNullException ("text");
|
||||
|
||||
var bytes = Util.GetEncodedText(text, TextEncoding);
|
||||
var bytes = Util.GetEncodedText (text, TextEncoding);
|
||||
|
||||
return (long) SkiaApi.sk_paint_break_text(Handle, bytes, (IntPtr) bytes.Length, maxWidth, out measuredWidth);
|
||||
return (long) SkiaApi.sk_paint_break_text (Handle, bytes, (IntPtr) bytes.Length, maxWidth, out measuredWidth);
|
||||
}
|
||||
|
||||
|
||||
public long BreakText(IntPtr buffer, IntPtr length, float maxWidth, out float measuredWidth)
|
||||
public long BreakText (IntPtr buffer, IntPtr length, float maxWidth, out float measuredWidth)
|
||||
{
|
||||
if (buffer == IntPtr.Zero)
|
||||
throw new ArgumentNullException("buffer");
|
||||
throw new ArgumentNullException ("buffer");
|
||||
|
||||
return (long)SkiaApi.sk_paint_break_text(Handle, buffer, length, maxWidth, out measuredWidth);
|
||||
return (long)SkiaApi.sk_paint_break_text (Handle, buffer, length, maxWidth, out measuredWidth);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_BEFORE_ARRAY_ACCESS_BRACKETS/@EntryValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_BEFORE_EMPTY_METHOD_CALL_PARENTHESES/@EntryValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_BEFORE_EMPTY_METHOD_PARENTHESES/@EntryValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_BEFORE_METHOD_CALL_PARENTHESES/@EntryValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_BEFORE_METHOD_PARENTHESES/@EntryValue">True</s:Boolean></wpf:ResourceDictionary>
|
Загрузка…
Ссылка в новой задаче