示例#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();
        }
示例#2
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 ();
        }
示例#3
0
 public void SetFont(Font font)
 {
     _eshape.SetFont(font);
 }