如何撤消矩形部分 [英] How to backout section of a rectangle

查看:123
本文介绍了如何撤消矩形部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基本上试图绘制一个填充的矩形并删除内部矩形的一部分.例如,从矩形的中心绘制一个100PX x 100PX并删除一个50PX x 50PX的正方形.最终结果看起来像墙上的窗户.谢谢

Basically trying to draw a filled rectangle and remove a part of the inner rectangle. For example drawing a 100PX by 100PX and removing a 50PX by 50PX square from the center of the rectangle. The end result would look like a window in a wall. Thanks

推荐答案

只需在第一个矩形内绘制第二个矩形,并用白色或其他能提供所需外观的颜色填充它即可.
Just draw a second rectangle inside the first and fill it with white, or some other colour that gives the look you want.


在这里看看:

Region.Exclude方法 [
Have a look here:

Region.Exclude Method[^]

There is a good example that shows how to do it.


这篇关于如何撤消矩形部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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