/// <summary>
 /// Raises the render complete event.
 /// </summary>
 /// <param name="renderInfo">The render information.</param>
 private void RaiseRenderCompleteEvent(PixelBufferRenderInfo renderInfo)
 {
     if (this.RenderComplete != null)
     {
         this.RenderComplete(renderInfo);
     }
 }
 /// <summary>
 /// Raises the render begin event.
 /// </summary>
 /// <param name="renderInfo">The render information.</param>
 private void RaiseRenderBeginEvent(PixelBufferRenderInfo renderInfo)
 {
     if (this.RenderBegin != null)
     {
         this.RenderBegin(renderInfo);
     }
 }
        /// <summary>
        /// Renders the specified render information.
        /// </summary>
        /// <param name="renderInfo">The render information.</param>
        /// <param name="x">The x.</param>
        /// <param name="y">The y.</param>
        /// <param name="width">The width.</param>
        /// <param name="height">The height.</param>
        public override void Render(PixelBufferRenderInfo renderInfo, float x, float y, float width, float height)
        {
            RaiseRenderBeginEvent(renderInfo);

            if (!this.UseTransparentBackground)
            {
                renderInfo.Graphics.FillRectangle(backColorBrush, x, y, width, height);
            }
            using (System.Drawing.Bitmap bmp = pixelBuffer.ToBitmap())
            {
                renderInfo.Graphics.DrawImage(bmp, x, y, width, height);
            }

            RaiseRenderCompleteEvent(renderInfo);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Renderers the render begin.
 /// </summary>
 /// <param name="renderInfo">The render information.</param>
 void Renderer_RenderBegin(PixelBufferRenderInfo renderInfo)
 {
     pixelBuffer.CopyBitmap(_bmp);
 }
 /// <summary>
 /// Renders the specified render information.
 /// </summary>
 /// <param name="renderInfo">The render information.</param>
 /// <param name="x">The x.</param>
 /// <param name="y">The y.</param>
 public override void Render(PixelBufferRenderInfo renderInfo, float x, float y)
 {
     this.Render(renderInfo, x, y, pixelBuffer.Width, pixelBuffer.Height);
 }
 /// <summary>
 /// Renders the specified render information.
 /// </summary>
 /// <param name="renderInfo">The render information.</param>
 /// <param name="x">The x.</param>
 /// <param name="y">The y.</param>
 /// <param name="width">The width.</param>
 /// <param name="height">The height.</param>
 public abstract void Render(PixelBufferRenderInfo renderInfo, float x, float y, float width, float height);
 /// <summary>
 /// Renders the specified render information.
 /// </summary>
 /// <param name="renderInfo">The render information.</param>
 /// <param name="x">The x.</param>
 /// <param name="y">The y.</param>
 public abstract void Render(PixelBufferRenderInfo renderInfo, float x, float y);
 /// <summary>
 /// Renders the specified render information.
 /// </summary>
 /// <param name="renderInfo">The render information.</param>
 /// <param name="x">The x.</param>
 /// <param name="y">The y.</param>
 /// <param name="width">The width.</param>
 /// <param name="height">The height.</param>
 public abstract void Render(PixelBufferRenderInfo renderInfo, int x, int y, int width, int height);
 /// <summary>
 /// Renders the specified render information.
 /// </summary>
 /// <param name="renderInfo">The render information.</param>
 /// <param name="x">The x.</param>
 /// <param name="y">The y.</param>
 public abstract void Render(PixelBufferRenderInfo renderInfo, int x, int y);