How can i draw in picturebox a polygon which is marked on the edges

泄露秘密 提交于 2019-12-06 09:54:04

Create an xOffset variable, set it to be 30, and add that to every X value. Let yOffset equal 50 and add it to all your Ys.

Simply do this to your graphics object:

g.TranslateTransform(30, 40);

before drawing onto it.

And of course you shouldn't use PictureBox1.CreateGraphics(); but draw things you want to persist in the Paint event with e.Graphics !..

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!