Ejemplo n.º 1
0
        public void BeginEntity(object entity)
        {
            var font = default(Font);

            if (_eshape != null)
            {
                _eshape.End();
                font    = _eshape.CurrentFont;
                _eshape = null;
            }

            EntityShapes eshape = null;

            if (!_shapes.TryGetValue(entity, out eshape))
            {
                eshape          = new EntityShapes(entity, _canvas);
                _shapes[entity] = eshape;
            }
            _eshape = eshape;
            if (font != null)
            {
                _eshape.SetFont(font);
            }
            _drawnShapes.Add(entity, _eshape);
            _eshape.Begin();
        }
Ejemplo n.º 2
0
        public void EndDrawing()
        {
            if (_eshape != null)
            {
                _eshape.End();
                _eshape = null;
            }

            var toRemove = new List <object> ();

            foreach (var k in _shapes.Keys)
            {
                if (!_drawnShapes.ContainsKey(k))
                {
                    toRemove.Add(k);
                }
            }
            foreach (var k in toRemove)
            {
                // Log.println ("Clearing " + k);
                var s = _shapes[k];
                s.Clear();
                _shapes.Remove(k);
            }
        }
Ejemplo n.º 3
0
        public void EndDrawing()
        {
            if (_eshape != null) {
                _eshape.End ();
                _eshape = null;
            }

            var toRemove = new List<object> ();
            foreach (var k in _shapes.Keys) {
                if (!_drawnShapes.ContainsKey (k)) {
                    toRemove.Add (k);
                }
            }
            foreach (var k in toRemove) {
                // Log.println ("Clearing " + k);
                var s = _shapes[k];
                s.Clear ();
                _shapes.Remove (k);
            }
        }
Ejemplo n.º 4
0
        public void BeginEntity(object entity)
        {
            var font = default(Font);

            if (_eshape != null) {
                _eshape.End ();
                font = _eshape.CurrentFont;
                _eshape = null;
            }

            EntityShapes eshape = null;
            if (!_shapes.TryGetValue (entity, out eshape)) {
                eshape = new EntityShapes (entity, _canvas);
                _shapes[entity] = eshape;
            }
            _eshape = eshape;
            if (font != null) _eshape.SetFont(font);
            _drawnShapes.Add (entity, _eshape);
            _eshape.Begin ();
        }