Hi,
I have a picturebox with graphics drawn from different objects. In one object I used
In another object I used graphicspath and paint to the picturebox using onpaint
I could save the graphics of the first object in picturebox image using
image.Image.Sav e(saveFileDialo g2.FileName, ImageFormat.Jpe g);
but I don't know how to combine the graphics of the first and second object. My question is how do I save the picturebox with both graphics drawn by two different objects? My first object is the main form.
Thanks advance for any help,
eddie
I have a picturebox with graphics drawn from different objects. In one object I used
Code:
Pen P1; P1 = new Pen(Color.Blue, 3); Graphics g = null; g = Graphics.FromImage(image.Image); g.DrawPath(P1, Wirepath[j-1]); P1.Dispose(); g.Dispose();
Code:
protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) { base.OnPaint(e); if (path != null) { e.Graphics.SmoothingMode = SmoothingMode.AntiAlias; e.Graphics.FillPath(new SolidBrush(this.BackColor), path); e.Graphics.DrawPath(new Pen(this.ForeColor, 4), path); } }
image.Image.Sav e(saveFileDialo g2.FileName, ImageFormat.Jpe g);
but I don't know how to combine the graphics of the first and second object. My question is how do I save the picturebox with both graphics drawn by two different objects? My first object is the main form.
Thanks advance for any help,
eddie
Comment