public Bitmap GetBitmap() { Bitmap bitmap = new Bitmap(mRoot.mRectangle.Width, mRoot.mRectangle.Height); Graphics graphics = Graphics.FromImage(bitmap); graphics.Clear(Color.FromArgb(0, 0, 0, 0)); mRoot.Render(graphics); graphics.Dispose(); return(bitmap); }
/// <summary> /// Renders the node /// </summary> /// <param name="graphics"></param> public void Render(Graphics graphics) { if (mImage != null) { graphics.DrawImage(mImage, mRectangle); } if (mLeft != null) { mLeft.Render(graphics); } if (mRight != null) { mRight.Render(graphics); } }