[转]CPoint+CSize+CRect学习大纲
2012-07-13 20:24
309 查看
CPoint+CSize+CRect学习大纲。
////////////////////////////////////////////////////////////////////////////////
熟知CPoint、CSize、CRect类的基类
class CPoint : public tagPOINT
class CSize : public tagSIZE
class CRect : public tagRECT
////////////////////////////////////////////////////////////////////////////////
留意CPoint、CSize、CRect之间的互操作,什么样的操作会涉及这些类型中的两个或多个。
Point - Point => Size
Point - Size => Point
Point - Rect => Rect
Point + Point => Point
Point + Size => Point
Point + Rect => Rect
Size - Point => Point
Size - Size
=> Size
Size - Rect
=> Rect
Size + Point => Point
Size + Size
=> Size
Size + Rect
=> Rect
Rect - Point => Rect
Rect - Size
=> Rect
Rect - Rect
=> Rect
Rect + Point => Rect
Rect + Size
=> Rect
Rect + Rect
=> Rect
////////////////////////////////////////////////////////////////////////////////
掌握CPoint类以下成员
// 数据
x
y
// 构造
CPoint
// 运算
Offset
operator –
operator +
operator +=
operator –=
// 比较
operator !=
operator ==
////////////////////////////////////////////////////////////////////////////////
掌握CSize类以下成员
// 数据
cx
cy
// 构造
CSize
// 运算
operator –
operator +
operator +=
operator –=
// 比较
operator !=
operator ==
////////////////////////////////////////////////////////////////////////////////
掌握CRect类以下成员
// 数据
left
top
right
bottom
// 构造
CRect
SetRect
CopyRect
// 属性
TopLeft
BottomRight
Width
Height
Size
CenterPoint
// 存在性
IsRectEmpty
SetRectEmpty
IsRectNull
// 比较
PtInRect
EqualRect
// 修改
MoveToX
MoveToY
MoveToXY
OffsetRect
InflateRect
DeflateRect
NormalizeRect
SubtractRect
IntersectRect
UnionRect
// 运算符
operator LPCRECT
operator LPRECT
operator =
operator !=
operator ==
operator –
operator +
operator &
operator |
operator +=
operator –=
operator &=
operator |=
////////////////////////////////////////////////////////////////////////////////
掌握CPoint、CSize、CRect之间的互操作,什么样的操作会涉及这些类型中的两个或多个。
Point - Point => Size
Point - Size => Point
Point - Rect => Rect
Point + Point => Point
Point + Size => Point
Point + Rect => Rect
Size - Point => Point
Size - Size
=> Size
Size - Rect
=> Rect
Size + Point => Point
Size + Size
=> Size
Size + Rect
=> Rect
Rect - Point => Rect
Rect - Size
=> Rect
Rect - Rect
=> Rect
Rect + Point => Rect
Rect + Size
=> Rect
Rect + Rect
=> Rect
* 加法满足交换律
* 运算不可以移项
* 与Rect有交的运算都产生Rect
////////////////////////////////////////////////////////////////////////////////
熟知CPoint、CSize、CRect类的基类
class CPoint : public tagPOINT
class CSize : public tagSIZE
class CRect : public tagRECT
////////////////////////////////////////////////////////////////////////////////
留意CPoint、CSize、CRect之间的互操作,什么样的操作会涉及这些类型中的两个或多个。
Point - Point => Size
Point - Size => Point
Point - Rect => Rect
Point + Point => Point
Point + Size => Point
Point + Rect => Rect
Size - Point => Point
Size - Size
=> Size
Size - Rect
=> Rect
Size + Point => Point
Size + Size
=> Size
Size + Rect
=> Rect
Rect - Point => Rect
Rect - Size
=> Rect
Rect - Rect
=> Rect
Rect + Point => Rect
Rect + Size
=> Rect
Rect + Rect
=> Rect
////////////////////////////////////////////////////////////////////////////////
掌握CPoint类以下成员
// 数据
x
y
// 构造
CPoint
// 运算
Offset
operator –
operator +
operator +=
operator –=
// 比较
operator !=
operator ==
////////////////////////////////////////////////////////////////////////////////
掌握CSize类以下成员
// 数据
cx
cy
// 构造
CSize
// 运算
operator –
operator +
operator +=
operator –=
// 比较
operator !=
operator ==
////////////////////////////////////////////////////////////////////////////////
掌握CRect类以下成员
// 数据
left
top
right
bottom
// 构造
CRect
SetRect
CopyRect
// 属性
TopLeft
BottomRight
Width
Height
Size
CenterPoint
// 存在性
IsRectEmpty
SetRectEmpty
IsRectNull
// 比较
PtInRect
EqualRect
// 修改
MoveToX
MoveToY
MoveToXY
OffsetRect
InflateRect
DeflateRect
NormalizeRect
SubtractRect
IntersectRect
UnionRect
// 运算符
operator LPCRECT
operator LPRECT
operator =
operator !=
operator ==
operator –
operator +
operator &
operator |
operator +=
operator –=
operator &=
operator |=
////////////////////////////////////////////////////////////////////////////////
掌握CPoint、CSize、CRect之间的互操作,什么样的操作会涉及这些类型中的两个或多个。
Point - Point => Size
Point - Size => Point
Point - Rect => Rect
Point + Point => Point
Point + Size => Point
Point + Rect => Rect
Size - Point => Point
Size - Size
=> Size
Size - Rect
=> Rect
Size + Point => Point
Size + Size
=> Size
Size + Rect
=> Rect
Rect - Point => Rect
Rect - Size
=> Rect
Rect - Rect
=> Rect
Rect + Point => Rect
Rect + Size
=> Rect
Rect + Rect
=> Rect
* 加法满足交换律
* 运算不可以移项
* 与Rect有交的运算都产生Rect
相关文章推荐
- Duilib界面库中的CSize、CPoint、CRect和afxwin.h冲突
- VC学习: CPoint,CSize,CRect类说明
- VC学习:CPoint,CSize,CRect类说明
- CPoint,CSize,CRect类说明收藏
- 学习《Office Sharepoint Server 2007 开发入门指南》
- Python学习路线(课程大纲+Python视频教程+下载地址)
- Python学习笔记--大纲
- java 学习:101软件开发工程师(JAVA)初级考试大纲《2》
- 实时流计算学习大纲
- [HTML5学习]HTML5课程大纲介绍_JavaScrpt知识点整理
- Java 学习大纲
- Libevent开源框架学习大纲
- 学习:How To Use Filters in SharePoint to show items in the current Calendar Month(转)
- 步步为营 SharePoint 开发学习笔记系列 七、SharePoint Timer Job 开发
- 《SharePoint Portal Server 2003 深入指南》即将完稿 & 大纲
- Spring Security教程(大纲)----学习过程分享
- Linux C++开发工程师 ---从大纲看学习规划
- Linux C++开发工程师 ---从大纲看学习规划
- PCL(point cloud library) 学习——简介