зеркало из https://github.com/mono/SkiaSharp.git
Родитель
e18d7677f2
Коммит
adccd31c4f
|
@ -31,7 +31,7 @@ Xamarin.Forms reference 4.4.0.991757
|
|||
# - milestone: the skia milestone determined by Google/Chromium
|
||||
# - increment: the C API version increment caused by new APIs
|
||||
libSkiaSharp milestone 80
|
||||
libSkiaSharp increment 0
|
||||
libSkiaSharp increment 1
|
||||
|
||||
# native sonames
|
||||
libSkiaSharp soname 80.0.0
|
||||
|
|
|
@ -315,7 +315,9 @@ namespace SkiaSharp
|
|||
if (!ValidateTextArgs (text, length, encoding))
|
||||
return 0;
|
||||
|
||||
return SkiaApi.sk_font_measure_text (Handle, text, (IntPtr)length, encoding, bounds, paint?.Handle ?? IntPtr.Zero);
|
||||
float measuredWidth;
|
||||
SkiaApi.sk_font_measure_text_no_return (Handle, text, (IntPtr)length, encoding, bounds, paint?.Handle ?? IntPtr.Zero, &measuredWidth);
|
||||
return measuredWidth;
|
||||
}
|
||||
|
||||
// MeasureText (glyphs)
|
||||
|
|
|
@ -3945,6 +3945,20 @@ namespace SkiaSharp
|
|||
(sk_font_measure_text_delegate ??= GetSymbol<Delegates.sk_font_measure_text> ("sk_font_measure_text")).Invoke (font, text, byteLength, encoding, bounds, paint);
|
||||
#endif
|
||||
|
||||
// void sk_font_measure_text_no_return(const sk_font_t* font, const void* text, size_t byteLength, sk_text_encoding_t encoding, sk_rect_t* bounds, const sk_paint_t* paint, float* measuredWidth)
|
||||
#if !USE_DELEGATES
|
||||
[DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern void sk_font_measure_text_no_return (sk_font_t font, void* text, /* size_t */ IntPtr byteLength, SKTextEncoding encoding, SKRect* bounds, sk_paint_t paint, Single* measuredWidth);
|
||||
#else
|
||||
private partial class Delegates {
|
||||
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||||
internal delegate void sk_font_measure_text_no_return (sk_font_t font, void* text, /* size_t */ IntPtr byteLength, SKTextEncoding encoding, SKRect* bounds, sk_paint_t paint, Single* measuredWidth);
|
||||
}
|
||||
private static Delegates.sk_font_measure_text_no_return sk_font_measure_text_no_return_delegate;
|
||||
internal static void sk_font_measure_text_no_return (sk_font_t font, void* text, /* size_t */ IntPtr byteLength, SKTextEncoding encoding, SKRect* bounds, sk_paint_t paint, Single* measuredWidth) =>
|
||||
(sk_font_measure_text_no_return_delegate ??= GetSymbol<Delegates.sk_font_measure_text_no_return> ("sk_font_measure_text_no_return")).Invoke (font, text, byteLength, encoding, bounds, paint, measuredWidth);
|
||||
#endif
|
||||
|
||||
// sk_font_t* sk_font_new()
|
||||
#if !USE_DELEGATES
|
||||
[DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)]
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 4fa635eb7f02f95ef846642cff42c0f138b849ec
|
||||
Subproject commit e85c747b9bb4232435b994d5e286ca689ce3ea88
|
Загрузка…
Ссылка в новой задаче