Esempio n. 1
0
        public CTGlyphInfo(CGFontIndex cid, CTCharacterCollection collection, string baseString)
        {
            if (baseString == null)
            {
                throw ConstructorError.ArgumentNull(this, "baseString");
            }

            using (var bs = new NSString(baseString))
                handle = CTGlyphInfoCreateWithCharacterIdentifier(cid, collection, bs.Handle);

            if (handle == IntPtr.Zero)
            {
                throw ConstructorError.Unknown(this);
            }
        }
Esempio n. 2
0
        static IntPtr Create(CGFontIndex cid, CTCharacterCollection collection, string baseString)
        {
            if (baseString is null)
            {
                throw new ArgumentNullException(nameof(baseString));
            }

            var bsHandle = CFString.CreateNative(baseString);

            try {
                return(CTGlyphInfoCreateWithCharacterIdentifier(cid, collection, bsHandle));
            } finally {
                CFString.ReleaseNative(bsHandle);
            }
        }
Esempio n. 3
0
		public CTGlyphInfo (CGFontIndex cid, CTCharacterCollection collection, string baseString)
		{
			if (baseString == null)
				throw ConstructorError.ArgumentNull (this, "baseString");

			using (var bs = new NSString (baseString))
				handle = CTGlyphInfoCreateWithCharacterIdentifier (cid, collection, bs.Handle);

			if (handle == IntPtr.Zero)
				throw ConstructorError.Unknown (this);
		}
Esempio n. 4
0
		static extern IntPtr CTGlyphInfoCreateWithCharacterIdentifier (CGFontIndex cid, CTCharacterCollection collection, IntPtr baseString);
Esempio n. 5
0
 static extern IntPtr CTGlyphInfoCreateWithCharacterIdentifier(CGFontIndex cid, CTCharacterCollection collection, IntPtr baseString);
Esempio n. 6
0
 public CTGlyphInfo(CGFontIndex cid, CTCharacterCollection collection, string baseString)
     : base(Create(cid, collection, baseString), true, true)
 {
 }