Beispiel #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);
            }
        }
Beispiel #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);
            }
        }
		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);
		}
		static extern IntPtr CTGlyphInfoCreateWithCharacterIdentifier (CGFontIndex cid, CTCharacterCollection collection, IntPtr baseString);
Beispiel #5
0
 static extern IntPtr CTGlyphInfoCreateWithCharacterIdentifier(CGFontIndex cid, CTCharacterCollection collection, IntPtr baseString);
Beispiel #6
0
 public CTGlyphInfo(CGFontIndex cid, CTCharacterCollection collection, string baseString)
     : base(Create(cid, collection, baseString), true, true)
 {
 }