作业帮 > 综合 > 作业

c# 关于 Pen 的使用

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/13 11:53:10
c# 关于 Pen 的使用
课本上讲 画个矩形 是这样的 objGraphics.DrawRectangl(pen ,x,y.width..height) x表示左上角X的值 Y表示左上角的Y值
可是下面的代码 X Y对应的值怎么也可以这么吗 表示左上角的X值 右下角的Y值吗
objGraphics.DrawRectangle(Pens .Blue ,
picShowPicture .Left - 1 ,picShowPicture .Top - 1 ,
picShowPicture .Width + 1 ,picShowPicture .Height + 1);
那我如果想表示左下角的X值 右上角的Y值 怎么样呢
左下:picShowPicture .Left - 1 ,picShowPicture .Top + picShowPicture.Height + 1 右上:picShowPicture .Left + picShowPicture .Width + 1 ,picShowPicture .Top - 1