Наследование: SKStreamSeekable
Пример #1
0
 public SKStreamAsset OpenStream(out int ttcIndex)
 {
     fixed(int *ttc = &ttcIndex)
     {
         return(SKStreamAsset.GetObject(SkiaApi.sk_typeface_open_stream(Handle, ttc)));
     }
 }
Пример #2
0
		public static SKTypeface FromStream (SKStreamAsset stream, int index = 0)
		{
			if (stream == null)
				throw new ArgumentNullException (nameof (stream));
			var typeface = GetObject<SKTypeface> (SkiaApi.sk_typeface_create_from_stream (stream.Handle, index));
			stream.RevokeOwnership (typeface);
			return typeface;
		}
Пример #3
0
 public static SKTypeface FromStream(SKStreamAsset stream, int index = 0)
 {
     if (stream == null)
     {
         throw new ArgumentNullException("stream");
     }
     return(GetObject <SKTypeface> (SkiaApi.sk_typeface_create_from_stream(stream.Handle, index)));
 }
Пример #4
0
        public static SKTypeface FromStream(SKStreamAsset stream, int index = 0)
        {
            if (stream == null)
            {
                throw new ArgumentNullException(nameof(stream));
            }
            var typeface = GetObject <SKTypeface> (SkiaApi.sk_typeface_create_from_stream(stream.Handle, index));

            stream.RevokeOwnership();
            return(typeface);
        }
Пример #5
0
        public SKTypeface CreateTypeface(SKStreamAsset stream, int index = 0)
        {
            if (stream == null)
            {
                throw new ArgumentNullException(nameof(stream));
            }

            if (stream is SKManagedStream managed)
            {
                stream = managed.ToMemoryStream();
                managed.Dispose();
            }

            var typeface = GetObject <SKTypeface> (SkiaApi.sk_fontmgr_create_from_stream(Handle, stream.Handle, index));

            stream.RevokeOwnership(typeface);
            return(typeface);
        }