Exemplo n.º 1
0
        /// <summary>
        /// Raises the <see cref="EventBroker.ImageDrawing"/> event and
        /// renders the <see cref="PresentationImage"/>.
        /// </summary>
        /// <param name="drawArgs"></param>
        /// <remarks>
        /// For internal Framework use only.
        /// </remarks>
        /// <exception cref="RenderingException">Thrown if any <see cref="Exception"/> is encountered while rendering the image.</exception>
        public virtual void Draw(DrawArgs drawArgs)
        {
            drawArgs.SceneGraph = this.SceneGraph;
            _clientRectangle    = drawArgs.RenderingSurface.ClientRectangle;

            // Let others know that we're about to draw
            ImageDrawingEventArgs args = new ImageDrawingEventArgs(this);

            if (this.ImageViewer != null && this.ImageViewer.EventBroker != null)
            {
                this.ImageViewer.EventBroker.OnImageDrawing(args);
            }

            OnDrawing();

            this.ImageRenderer.Draw(drawArgs);
        }
Exemplo n.º 2
0
 internal void OnImageDrawing(ImageDrawingEventArgs args)
 {
     EventsHelper.Fire(_imageDrawingEvent, this, args);
 }