TRect 有没有可以代替它的浮点型
TRect 有没有可以代替它的浮点型 问题点数:10、回复次数:2Top
1 楼gigilee(gigilee)回复于 2004-08-19 16:04:33 得分 0
upTop
2 楼qiuafa()回复于 2004-08-19 16:17:57 得分 10
// 自定义
struct TFloatRect
{
TFloatRect() {}
TFloatRect(float l, float t, float r, float b) { left=l; top=t; right=r; bottom=b; }
TFloatRect(RECT& r)
{
left = r.left;
top = r.top;
right = r.right;
bottom = r.bottom;
}
float Width () const { return right - left; }
float Height() const { return bottom - top ; }
bool operator ==(const TFloatRect& rc) const
{
return left == rc.left && top==rc.top &&
right == rc.right && bottom==rc.bottom;
}
bool operator !=(const TFloatRect& rc) const
{ return !(rc==*this); }
__property float Left = { read=left, write=left };
__property float Top = { read=top, write=top };
__property float Right = { read=right, write=right };
__property float Bottom = { read=bottom, write=bottom };
};
Top




