Exemple #1
0
        public YogaNode()
        {
            YogaLogger.Initialize();

            _ygNode = Native.YGNodeNew();
            if (_ygNode.IsInvalid)
            {
                throw new InvalidOperationException("Failed to allocate native memory");
            }
        }
Exemple #2
0
        public YogaNode(YogaConfig config)
        {
            YogaLogger.Initialize();

            _ygNode = Native.YGNodeNewWithConfig(config.Handle);
            if (_ygNode.IsInvalid)
            {
                throw new InvalidOperationException("Failed to allocate native memory");
            }
        }