IsRectEmpty与IsRectNull

简介:

1.IsRectEmpty:

检测矩形区域是否为空。如果矩形的宽和高为0或者为一个负值,则说明此矩形为空,返回非0值,否则,返回0.

2.IsRectNull:

检测矩形是否为Null。如果矩形的四个坐标均为0,则返回非0值,否则,返回0.

例如:

CRect  rect1(10,10,10,10);

CRect  rect2(0,0,0,0);

IsRectEmpty(rect1) //返回非0值

IsRectEmpty(rect2) //返回非0值

IsRectNull(rect1)    //返回0

IsRectNull(rect2)    //返回非0值



本文转自 韬光星夜 51CTO博客,原文链接:http://blog.51cto.com/xfqxj/541559,如需转载请自行联系原作者

相关文章
|
10月前
|
SQL 数据库
浅谈null
前言: 我们平时对SQL的数值处理的过程中,经常会纠结一个问题,要不要设置为null?那么null到底是什么意思?在这篇文章中,我将为大家简单的介绍一下我们使用的null。
5814 0
浅谈null
Helpful Maths
Helpful Maths
74 0
Helpful Maths
|
人工智能
Colorful Slimes
题目描述 Snuke lives in another world, where slimes are real creatures and kept by some people. Slimes come in N colors. Those colors are conveniently numbered 1 through N. Snuke currently has no slime. His objective is to have slimes of all the colors together.
74 0
|
Web App开发 前端开发 JavaScript
gulp
gulp 1. 安装 npm install --g gulp 2. 初始化 npm init 3.
1030 0
|
JavaScript 前端开发

热门文章

最新文章