Пример #1
0
        public BMPAlloc AllocTextCoreSettings(TextCoreSettings settings)
        {
            if (!m_StorageReallyCreated)
            {
                ReallyCreateStorage();
            }

            return(m_TextSettingsAllocator.Allocate(m_Storage));
        }
        public BMPAlloc AllocTextCoreSettings(TextCoreSettings settings)
        {
            if (!m_AtlasReallyCreated)
            {
                ReallyCreateAtlas();
            }

            return(m_TextSettingsAllocator.Allocate(m_Atlas));
        }
        public void SetTextCoreSettingValue(BMPAlloc alloc, TextCoreSettings settings)
        {
            Debug.Assert(alloc.IsValid());

            var allocXY       = AllocToTexelCoord(ref m_TextSettingsAllocator, alloc);
            var settingValues = new Color(-settings.underlayOffset.x, settings.underlayOffset.y, settings.underlaySoftness, settings.outlineWidth);

            m_Atlas.EnqueueBlit(UIRenderDevice.whiteTexel, allocXY.x, allocXY.y + 0, false, settings.outlineColor);
            m_Atlas.EnqueueBlit(UIRenderDevice.whiteTexel, allocXY.x, allocXY.y + 1, false, settings.underlayColor);
            m_Atlas.EnqueueBlit(UIRenderDevice.whiteTexel, allocXY.x, allocXY.y + 2, false, settingValues);
        }
Пример #4
0
        public void SetTextCoreSettingValue(BMPAlloc alloc, TextCoreSettings settings)
        {
            Debug.Assert(alloc.IsValid());

            var allocXY       = AllocToTexelCoord(ref m_TextSettingsAllocator, alloc);
            var settingValues = new Color(-settings.underlayOffset.x, settings.underlayOffset.y, settings.underlaySoftness, settings.outlineWidth);

            m_Storage.SetTexel(allocXY.x, allocXY.y + 0, settings.faceColor);
            m_Storage.SetTexel(allocXY.x, allocXY.y + 1, settings.outlineColor);
            m_Storage.SetTexel(allocXY.x, allocXY.y + 2, settings.underlayColor);
            m_Storage.SetTexel(allocXY.x, allocXY.y + 3, settingValues);
        }