コード例 #1
0
        public void Evaluate(int SpreadMax)
        {
            this.spreadMax = SpreadMax;

            if (this.rebuildCache[0] || this.textCache == null)
            {
                this.textObjects.Sync();
                this.textFormat.Sync();

                if (this.textCache != null)
                {
                    this.textCache.Dispose();
                    this.textCache = null;
                }

                var defaultTextFormat = this.textFormat[0];

                this.cacheList.Clear();
                for (int i = 0; i < this.textObjects.SliceCount; i++)
                {
                    TextObject to      = this.textObjects[i];
                    var        tFormat = to.TextFormat != null ? to.TextFormat : defaultTextFormat;

                    TextLayout tl = new TextLayout(this.dwFactory, to.Text, tFormat);

                    SlimDX.Color4 c = to.Color;

                    DX11CachedText ct = new DX11CachedText(tl, to.Matrix, c);
                    cacheList.Add(ct);
                }

                this.textCache = new DX11TextObjectCache(cacheList);
            }
        }
コード例 #2
0
 public void Dispose()
 {
     if (this.textCache != null)
     {
         this.textCache.Dispose();
         this.textCache = null;
     }
 }