예제 #1
0
 protected virtual void OnDrawLayerGrid(DrawLayerEventArgs e)
 {
     if (DrawLayerGrid != null) {
         DrawLayerGrid(this, e);
     }
 }
예제 #2
0
 protected virtual void OnDrawExtra(DrawLayerEventArgs e)
 {
     if (DrawExtra != null) {
         DrawExtra(this, e);
     }
 }
예제 #3
0
 protected virtual void OnDrawLayerContent(DrawLayerEventArgs e)
 {
     if (DrawLayerContent != null) {
         DrawLayerContent(this, e);
     }
 }
예제 #4
0
        protected override void Draw()
        {
            GraphicsDevice.Clear(_backColor);

            DrawLayerEventArgs e = new DrawLayerEventArgs(_spriteBatch, _zoom);

            if (_canvasLayer != null)
                _canvasLayer.DrawContent(_spriteBatch);

            foreach (BaseControlLayer layer in _layers) {
                layer.DrawContent(_spriteBatch);
            }
            OnDrawLayerContent(e);

            if (ShowGrid) {
                foreach (BaseControlLayer layer in _layers) {
                    layer.DrawGrid(_spriteBatch);
                }
                OnDrawLayerGrid(e);
            }

            foreach (BaseControlLayer layer in _layers) {
                layer.DrawExtra(_spriteBatch);
            }
            OnDrawExtra(e);

            if (_annotLayer != null)
                _annotLayer.DrawContent(_spriteBatch);
        }