示例#1
0
        internal Font(swig.Font coreInstance)
        {
#if DEBUG
            // 唯一の対応するクラスであることを保証
            if (GC.Fonts.Contains(coreInstance.GetPtr()))
            {
                Particular.Helper.ThrowException("");
            }
#endif
            CoreInstance = coreInstance;
        }
示例#2
0
        internal Font(swig.Font swig)
        {
#if DEBUG
            // 唯一の対応するクラスであることを保証
            if (GC.Fonts.GetObject(swig.GetPtr()) != null)
            {
                Particular.Helper.ThrowException("");
            }
#endif
            CoreInstance = swig;
        }
示例#3
0
        /// <summary>
        /// ネイティブのインスタンスからラッパー側のインスタンスを生成する。
        /// </summary>
        /// <param name="o"></param>
        /// <param name="type"></param>
        internal static Font GenerateFont(swig.Font o, GenerationType type)
        {
            if (o == null)
            {
                return(null);
            }
            var p = o.GetPtr();

            var existing = GC.Fonts.GetObject(p);

            existing = GenerateInternal(existing, o, type);
            if (existing != null)
            {
                return(existing);
            }

            var ret = new Font(o);

            GC.Fonts.AddObject(p, ret);
            return(ret);
        }