我如何绘制在PictureBox一个圆和直线? [英] How do I draw a circle and line in the picturebox?

查看:132
本文介绍了我如何绘制在PictureBox一个圆和直线?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何绘制在PictureBox一个圆和直线?

How do I draw a circle and line in the picturebox?

推荐答案

在PictureBox是控制并具有图像来源 - 所以你必须在图像上绘制和图像手来控制,以显示它

the picturebox is a control and has an image as source - so you have to draw on the image and hand the image to the control to show it

MyImage = new Bitmap(fileToDisplay);
pictureBox1.ClientSize = new Size(xSize, ySize);
pictureBox1.Image = MyImage;

这篇关于我如何绘制在PictureBox一个圆和直线?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆